Skip to content

Describe generated OpenAPI schemas through bootstrapper settings - #161

Merged
vrslev merged 3 commits into
mainfrom
feature/openapi-metadata
Oct 22, 2026
Merged

vrslev merged 3 commits into
mainfrom
feature/openapi-metadata

Conversation

@vrslev

@vrslev vrslev commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Agent:

Generated framework errors leave OpenAPI fields undocumented, so applications repeat schema cleanup. The FastAPI and Litestar bootstrappers now add these descriptions automatically when openapi_descriptions_enabled is enabled in settings or SwaggerConfig. The option defaults to false and uses the existing settings environment prefix.

FastAPI applies the descriptions when its schema is generated, including routes registered after bootstrap. Litestar enriches its generated document when OpenAPI is enabled. Existing descriptions and runtime response shapes are preserved; application-specific metadata and authentication policy remain with the application. Health descriptions live beside the microbootstrap type that owns them. Regression tests cover both setting states, environment configuration, actual HTTP responses, cached generation, composite schemas and references.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 99.42% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
microbootstrap/bootstrappers/fastapi.py 100.00% <100.00%> (ø)
microbootstrap/bootstrappers/litestar.py 99.01% <100.00%> (+0.21%) ⬆️
...obootstrap/instruments/health_checks_instrument.py 100.00% <100.00%> (ø)
microbootstrap/instruments/swagger_instrument.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

@vrslev vrslev changed the title Add reusable OpenAPI metadata helpers Describe generated OpenAPI schemas through bootstrapper settings Oct 22, 2026
@vrslev
vrslev marked this pull request as ready for review October 22, 2026 19:00
@vrslev
vrslev merged commit 86ac7c1 into main Oct 22, 2026
21 checks passed
@vrslev
vrslev deleted the feature/openapi-metadata branch October 22, 2026 19:02
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.

1 participant