[PR #435] [MERGED] Add file-preview API to OpenAPI specifications #503

Closed
opened 2026-02-16 06:15:41 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-docs/pull/435
Author: @lyzno1
Created: 8/23/2025
Status: Merged
Merged: 9/5/2025
Merged by: @crazywoola

Base: mainHead: feat/add-file-preview-api


📝 Commits (3)

  • 5056d7c feat(en): add file-preview API to OpenAPI specifications
  • bc15563 feat(ja-jp): add file-preview API to Japanese OpenAPI specifications
  • 3e6e7bf feat(zh-hans): add file-preview API to Chinese OpenAPI specifications

📊 Changes

9 files changed (+1206 additions, -9 deletions)

View changed files

📝 en/openapi_chat.json (+134 -1)
📝 en/openapi_chatflow.json (+134 -1)
📝 en/openapi_workflow.json (+134 -1)
📝 ja-jp/openapi_chat.json (+134 -1)
📝 ja-jp/openapi_chatflow.json (+134 -1)
📝 ja-jp/openapi_workflow.json (+134 -1)
📝 zh-hans/openapi_chat.json (+134 -1)
📝 zh-hans/openapi_chatflow.json (+134 -1)
📝 zh-hans/openapi_workflow.json (+134 -1)

📄 Description

Summary

Add the missing GET /files/{file_id}/preview endpoint to OpenAPI specifications for chat, chatflow, and workflow APIs across all language versions (English, Japanese, Chinese).

Changes

  • Added file preview endpoint with as_attachment query parameter
  • Included proper error handling (400, 403, 404, 500)
  • Updated Files tag descriptions to include preview operations
  • Maintained language-specific naming conventions and translations

Test Plan

  • JSON syntax validation passed for all files
  • Verified unique operationIds across all APIs
  • Confirmed alignment with existing API patterns

Fixes #389


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-docs/pull/435 **Author:** [@lyzno1](https://github.com/lyzno1) **Created:** 8/23/2025 **Status:** ✅ Merged **Merged:** 9/5/2025 **Merged by:** [@crazywoola](https://github.com/crazywoola) **Base:** `main` ← **Head:** `feat/add-file-preview-api` --- ### 📝 Commits (3) - [`5056d7c`](https://github.com/langgenius/dify-docs/commit/5056d7c03efc4a4b925d8ec56b6c232ae6ad0ad7) feat(en): add file-preview API to OpenAPI specifications - [`bc15563`](https://github.com/langgenius/dify-docs/commit/bc15563a6d2d1e31acc65c8292509e99e7eea862) feat(ja-jp): add file-preview API to Japanese OpenAPI specifications - [`3e6e7bf`](https://github.com/langgenius/dify-docs/commit/3e6e7bfef5b9d6a248e4b4dd3ad62de7879049bf) feat(zh-hans): add file-preview API to Chinese OpenAPI specifications ### 📊 Changes **9 files changed** (+1206 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `en/openapi_chat.json` (+134 -1) 📝 `en/openapi_chatflow.json` (+134 -1) 📝 `en/openapi_workflow.json` (+134 -1) 📝 `ja-jp/openapi_chat.json` (+134 -1) 📝 `ja-jp/openapi_chatflow.json` (+134 -1) 📝 `ja-jp/openapi_workflow.json` (+134 -1) 📝 `zh-hans/openapi_chat.json` (+134 -1) 📝 `zh-hans/openapi_chatflow.json` (+134 -1) 📝 `zh-hans/openapi_workflow.json` (+134 -1) </details> ### 📄 Description ## Summary Add the missing `GET /files/{file_id}/preview` endpoint to OpenAPI specifications for chat, chatflow, and workflow APIs across all language versions (English, Japanese, Chinese). ## Changes - Added file preview endpoint with `as_attachment` query parameter - Included proper error handling (400, 403, 404, 500) - Updated Files tag descriptions to include preview operations - Maintained language-specific naming conventions and translations ## Test Plan - [x] JSON syntax validation passed for all files - [x] Verified unique operationIds across all APIs - [x] Confirmed alignment with existing API patterns Fixes #389 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 06:15:41 -05:00
yindo closed this issue 2026-02-16 06:15:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs#503