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
f0e71769a4 fix(ja-jp): establish strong dependency between transfer_method and file parameters
- 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`
- Applied same fix pattern as English version to all Japanese OpenAPI files
- Prevents invalid combinations like remote_url + upload_file_id

Fixed files:
- ja-jp/openapi_workflow.json (InputFileObjectWorkflowJp)
- ja-jp/openapi_chatflow.json (InputFileObjectJp)
- ja-jp/openapi_chat.json (BasicInputFileObjectJa)
- ja-jp/openapi_completion.json (InputFileObjectJp)
2025-08-05 20:25:55 +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