Skip to content

feat: 从 drf_yasg 迁移到 drf_spectacular,修复子路径部署问题#128

Merged
dengyh merged 1 commit into
TencentBlueKing:masterfrom
dengyh:feat/main_url_fix
Apr 10, 2026
Merged

feat: 从 drf_yasg 迁移到 drf_spectacular,修复子路径部署问题#128
dengyh merged 1 commit into
TencentBlueKing:masterfrom
dengyh:feat/main_url_fix

Conversation

@dengyh

@dengyh dengyh commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator
  • urls.py: 将 drf_yasg 替换为 drf_spectacular 的 SpectacularAPIView/SwaggerView/RedocView
  • default.py: 添加子路径支持(FORCE_SCRIPT_NAME/STATIC_URL),添加 SPECTACULAR_SETTINGS 配置
  • schema.py: 新增 IgnoreExcludeAutoSchema 和 extend_schema patch,使 exclude=True 不生效
  • pyproject.toml: 移除 drf-yasg 依赖

@codecov-commenter

codecov-commenter commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@aefc776). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #128   +/-   ##
=========================================
  Coverage          ?   90.97%           
=========================================
  Files             ?       38           
  Lines             ?     1330           
  Branches          ?        0           
=========================================
  Hits              ?     1210           
  Misses            ?      120           
  Partials          ?        0           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aefc776...ab28503. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- urls.py: 将 drf_yasg 替换为 drf_spectacular 的 SpectacularAPIView/SwaggerView/RedocView
- default.py: 添加子路径支持(FORCE_SCRIPT_NAME/STATIC_URL),添加 SPECTACULAR_SETTINGS 配置
- schema.py: 新增 IgnoreExcludeAutoSchema 和 extend_schema patch,使 exclude=True 不生效
- pyproject.toml: 移除 drf-yasg 依赖
@dengyh dengyh force-pushed the feat/main_url_fix branch from 9a238ec to ab28503 Compare April 10, 2026 06:35
@dengyh dengyh merged commit da6b118 into TencentBlueKing:master Apr 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants