Skip to content

Fix docs Swagger UI rendering for REST API pages#3729

Merged
peterschmidt85 merged 1 commit intomasterfrom
fix/docs-swagger-openapi-generation
Apr 2, 2026
Merged

Fix docs Swagger UI rendering for REST API pages#3729
peterschmidt85 merged 1 commit intomasterfrom
fix/docs-swagger-openapi-generation

Conversation

@peterschmidt85
Copy link
Copy Markdown
Contributor

Summary

  • Fix render_swagger plugin not finding OpenAPI JSON files generated by mkdocs_gen_files (which writes to a temp dir, not the real filesystem)
  • Replace mkdocs_gen_files.open() with direct file writes so render_swagger can resolve the files
  • Fix rest plugin spec output path (rest_plugin/rest/) to match the page directory
  • Remove committed openapi.json in favor of always generating at build time
  • Skip writing when content is unchanged to avoid livereload infinite loops

Fixes #3724
Fixes #3725

Test plan

  • mkdocs build -s passes with no SWAGGER ERROR in output site
  • Clean build (no pre-existing JSON files) works correctly
  • mkdocs serve renders both Swagger pages without errors
  • No livereload loop when serving locally

🤖 Generated with Claude Code

Replace mkdocs_gen_files.open() with direct file writes so that
render_swagger can find the JSON files on the real filesystem.
Also fix the rest plugin output path (rest_plugin/ -> rest/) and
remove the committed openapi.json in favor of always generating it.
Skip writing when content is unchanged to avoid livereload loops.

Fixes #3724
Fixes #3725

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@peterschmidt85 peterschmidt85 merged commit 64bb005 into master Apr 2, 2026
28 checks passed
@peterschmidt85 peterschmidt85 deleted the fix/docs-swagger-openapi-generation branch April 2, 2026 08:10
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.

[Bug]: REST plugin reference is broken on the website [Bug]: REST API reference is outdated on the website

1 participant