Skip to content

Pin OpenAPI schema so docs show the real version, not 0.1.0#117

Merged
maximusunc merged 1 commit into
mainfrom
claude/openapi-version-number-idg3yj
Jul 10, 2026
Merged

Pin OpenAPI schema so docs show the real version, not 0.1.0#117
maximusunc merged 1 commit into
mainfrom
claude/openapi-version-number-idg3yj

Conversation

@maximusunc

Copy link
Copy Markdown
Collaborator

The served /openapi.json calls app.openapi(). Modern FastAPI's openapi() no longer just returns a pre-assigned app.openapi_schema: it compares a cached routes-version marker and, when it doesn't match, regenerates the schema from scratch using app.version (FastAPI's 0.1.0 default), discarding the version and extensions set from openapi-config.yaml. Assigning app.openapi_schema directly stopped taking effect once the floating fastapi ~=0.110 pin resolved to a newer release with this behavior.

Override the openapi method itself (the supported way to pin a custom schema) instead of assigning the attribute, for the main app and each mounted ARA sub-app.

Claude-Session: https://claude.ai/code/session_01PqGpkg7dAzxbcHBi1rGsvv

The served /openapi.json calls app.openapi(). Modern FastAPI's openapi()
no longer just returns a pre-assigned app.openapi_schema: it compares a
cached routes-version marker and, when it doesn't match, regenerates the
schema from scratch using app.version (FastAPI's 0.1.0 default), discarding
the version and extensions set from openapi-config.yaml. Assigning
app.openapi_schema directly stopped taking effect once the floating
fastapi ~=0.110 pin resolved to a newer release with this behavior.

Override the openapi method itself (the supported way to pin a custom
schema) instead of assigning the attribute, for the main app and each
mounted ARA sub-app.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PqGpkg7dAzxbcHBi1rGsvv
@maximusunc
maximusunc merged commit 74853ec into main Jul 10, 2026
1 of 2 checks passed
@maximusunc
maximusunc deleted the claude/openapi-version-number-idg3yj branch July 10, 2026 14:44
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.09%. Comparing base (9594469) to head (daba009).
⚠️ Report is 37 commits behind head on main.

Files with missing lines Patch % Lines
shepherd_server/openapi.py 0.00% 6 Missing ⚠️
shepherd_server/server.py 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
shepherd_server/server.py 0.00% <0.00%> (ø)
shepherd_server/openapi.py 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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