Commit Graph

5 Commits

Author SHA1 Message Date
lyzno1
95ace3d9af Add file-preview API to OpenAPI specifications (#435)
* feat(en): add file-preview API to OpenAPI specifications

- Add GET /files/{file_id}/preview endpoint to chat, chatflow, and workflow APIs
- Support file preview and download with as_attachment parameter
- Include proper error handling (400, 403, 404, 500)
- Update Files tag descriptions to include preview operations
- Maintain unique operationIds for each API type
- Align with existing API patterns and template specifications

Resolves: #389

* feat(ja-jp): add file-preview API to Japanese OpenAPI specifications

- Add GET /files/{file_id}/preview endpoint to chat, chatflow, and workflow APIs
- Use Japanese descriptions and maintain "Ja"/"Jp" operationId suffixes
- Support file preview and download with as_attachment parameter
- Include proper error handling with Japanese error messages
- Update Files tag descriptions to include preview operations
- Maintain consistency with existing Japanese API patterns

Related: #389

* feat(zh-hans): add file-preview API to Chinese OpenAPI specifications

- Add GET /files/{file_id}/preview endpoint to chat, chatflow, and workflow APIs
- Use Chinese descriptions and maintain "Cn" operationId suffixes
- Support file preview and download with as_attachment parameter
- Include proper error handling with Chinese error messages
- Update Files tag descriptions to include preview operations
- Maintain consistency with existing Chinese API patterns

Related: #389
2025-09-05 19:05:59 +08:00
lyzno1
3a7c36a527 fix: establish strong dependency between transfer_method and file parameters
Fixes #344

- Replace loose `oneOf` validation with strict conditional dependencies using `anyOf`
- `transfer_method: "remote_url"` now requires `url` and prohibits `upload_file_id`
- `transfer_method: "local_file"` now requires `upload_file_id` and prohibits `url`
- Aligns OpenAPI schema with documentation requirements in template_workflow.en.mdx
- Uses OpenAPI 3.0.1 compatible syntax instead of JSON Schema Draft 7 features
- Prevents invalid combinations like remote_url + upload_file_id
2025-08-05 20:18:08 +08:00
Alter-xyz
9d659d0924 doc 2025-06-13 18:12:46 +08:00
Alter-xyz
2c5f8902e7 chore: default base url 2025-05-19 16:30:20 +08:00
Alter-xyz
49ab02c0b8 feat: api access 2025-05-19 16:11:34 +08:00