[PR #22719] fix: complete file_upload schema in OpenAPI templates (#22700) #30028

Closed
opened 2026-02-21 20:46:42 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/22719

State: closed
Merged: Yes


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>

Summary

Fixes #22700

This PR addresses missing file upload schema definitions in OpenAPI templates that caused incomplete API documentation generation.

Changes made:

  • Enhanced TypeScript types: Updated FileUpload type in types.ts to include complete field definitions
  • Completed template documentation: Added missing document, audio, video, and custom fields to all template variants (EN/ZH/JA)
  • Standardized technical terminology: Applied consistent backtick usage and comma formatting across templates
  • Improved API documentation: OpenAPI schema now fully reflects all supported file upload types

Files modified:

Impact:

  • Accurate OpenAPI schema generation
  • Correct type generation for downstream tools
  • Complete multi-language documentation for file upload config
  • Improved developer experience

Screenshots

Before After
Only image field in OpenAPI schema Complete schema with all supported file types
Missing fields in template documentation Full definitions for document, audio, video, custom included

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues.
  • I’ve made atomic changes and included necessary tests.
  • I’ve updated documentation accordingly.
  • I ran dev/reformat and cd web && npx lint-staged
**Original Pull Request:** https://github.com/langgenius/dify/pull/22719 **State:** closed **Merged:** Yes --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 2. Ensure there is an associated issue and you have been assigned to it > 3. Use the correct syntax to link this PR: `Fixes #<issue number>` ## Summary Fixes #22700 This PR addresses missing file upload schema definitions in OpenAPI templates that caused incomplete API documentation generation. **Changes made:** - **Enhanced TypeScript types**: Updated `FileUpload` type in [`types.ts`](https://github.com/langgenius/dify/blob/main/web/app/components/base/features/types.ts) to include complete field definitions - **Completed template documentation**: Added missing `document`, `audio`, `video`, and `custom` fields to all template variants (EN/ZH/JA) - **Standardized technical terminology**: Applied consistent backtick usage and comma formatting across templates - **Improved API documentation**: OpenAPI schema now fully reflects all supported file upload types **Files modified:** - [`web/app/components/base/features/types.ts`](https://github.com/langgenius/dify/blob/main/web/app/components/base/features/types.ts) - `web/app/components/develop/template/*.mdx` (12 files) **Impact:** - ✅ Accurate OpenAPI schema generation - ✅ Correct type generation for downstream tools - ✅ Complete multi-language documentation for file upload config - ✅ Improved developer experience ## Screenshots | Before | After | |--------|-------| | Only `image` field in OpenAPI schema | Complete schema with all supported file types | | Missing fields in template documentation | Full definitions for `document`, `audio`, `video`, `custom` included | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. - [x] I’ve made atomic changes and included necessary tests. - [x] I’ve updated documentation accordingly. - [x] I ran `dev/reformat` and `cd web && npx lint-staged`
yindo added the pull-request label 2026-02-21 20:46:42 -05:00
yindo closed this issue 2026-02-21 20:46:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30028