[1.25.x] refactor(dashboard): migrate automatic API docs to OpenAPI 3.1 - #3246
Draft
wklken wants to merge 1 commit into
Draft
[1.25.x] refactor(dashboard): migrate automatic API docs to OpenAPI 3.1#3246wklken wants to merge 1 commit into
wklken wants to merge 1 commit into
Conversation
wklken
marked this pull request as draft
September 7, 2026 02:52
Collaborator
Author
|
for 1.25.x |
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.
Description
Dashboard 自动接口文档目前由 drf-yasg 生成 Swagger 2.0。本 PR 从 upstream/master(fcba90a5b)独立切分,改用 drf-spectacular 生成 OpenAPI 3.1 JSON/YAML,保留现有 DEBUG-only 文档地址。Swagger UI 和 ReDoc 使用 sidecar 本地静态资源。
将现有 schema 标注迁移到原生 extend_schema / extend_schema_field,保留参数、说明和组件命名,并描述 Web/V2、V1、分页、文件上传下载及直接 JSON 响应的实际结构。保留筛选参数、DELETE JSON 请求体,以及现有 PATCH 处理器实际要求的必填字段;支持部分更新的处理器仍生成可选字段。业务接口处理逻辑和资源导入导出路径保持原有行为。资源旧 Swagger 2.0 导出清理由 #2989 单独处理。
验证:
uv run make lint-check通过。uv run make test:3964 passed。uv lock --check通过。Checklist