feat: add new fields to file upload response DTOs - #334
Merged
Conversation
Add 7 new fields to FileUploadResponse and UploadFileInfoResponse to match the complete Dify API specification: - previewUrl: Preview URL for the file - sourceUrl: Source URL of the file - originalUrl: Original URL of the file - userId: User ID who uploaded the file - tenantId: Tenant ID associated with the file - conversationId: Conversation ID (nullable, for chat context) - fileKey: File storage key/path Changes: - feat(chat): add 7 new fields to FileUploadResponse - feat(dataset): add 7 new fields to UploadFileInfoResponse - fix(dataset): correct typo in @JsonAlias from "mine_type" to "mime_type" - test(chat): update FileUploadResponseTest to cover new fields - test(dataset): create UploadFileInfoResponseTest with comprehensive coverage - docs: update Chinese and English documentation for both response DTOs All fields are nullable (optional) to maintain backward compatibility. Jackson automatically handles JSON deserialization for the new fields. Breaking Changes: - Equals/hashCode behavior changes due to new fields in DTOs - Fixed mime_type alias (was incorrectly "mine_type")
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
=========================================
Coverage 92.27% 92.27%
Complexity 2459 2459
=========================================
Files 185 185
Lines 6917 6917
Branches 795 795
=========================================
Hits 6383 6383
Misses 353 353
Partials 181 181
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add new fields to file upload response DTOs
Add 7 new fields to FileUploadResponse and UploadFileInfoResponse to match the complete Dify API specification:
Changes:
All fields are nullable (optional) to maintain backward compatibility. Jackson automatically handles JSON deserialization for the new fields.
Breaking Changes:
Summary
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.
Resolves #333
Tip
Close issue syntax:
Fixes #<issue number>orResolves #<issue number>,see documentation
Screenshots
Checklist
Important
Please review the checklist below before submitting your pull request.
change.