Skip to content

Add one API metadata setting to web bootstrappers - #162

Merged
vrslev merged 2 commits into
mainfrom
feature/http-error-titles
Oct 22, 2026
Merged

vrslev merged 2 commits into
mainfrom
feature/http-error-titles

Conversation

@vrslev

@vrslev vrslev commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Agent:

Default HTTP errors lack a short summary, while generated validation schemas need useful field descriptions. Add one disabled-by-default api_metadata_enabled setting to the FastAPI and Litestar settings classes. The bootstrappers apply both schema descriptions and HTTP status titles; no separate instrument configuration is needed. Custom error handlers retain ownership of their payloads, headers and schemas, and native debug tracebacks are preserved.

This replaces the openapi_descriptions_enabled option released in 1.8.0. Existing callers must migrate their settings and environment variables to the new name; enabling it also extends default HTTP error bodies with title. The README documents that migration. The setting works independently of Swagger UI and does not certify conformance to an API standard.

@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.45% <100.00%> (+0.03%) ⬆️

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.22% <100.00%> (+0.21%) ⬆️
microbootstrap/helpers.py 98.48% <100.00%> (+0.15%) ⬆️
microbootstrap/instruments/swagger_instrument.py 100.00% <ø> (ø)
microbootstrap/settings.py 100.00% <100.00%> (ø)
🚀 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 configurable HTTP error titles to web bootstrappers Add one API metadata setting to web bootstrappers Oct 22, 2026
@vrslev
vrslev marked this pull request as ready for review October 22, 2026 21:05
@vrslev
vrslev merged commit 0b34fb1 into main Oct 22, 2026
21 checks passed
@vrslev
vrslev deleted the feature/http-error-titles branch October 22, 2026 21:19
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