docs: document default OpenAPI schema endpoints#4908
Conversation
Fixes pre-commit validate failure on PR litestar-org#4830. Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify JSON is served by default, YAML requires YamlRenderPlugin, and document custom paths, route conflicts, and programmatic access. Fixes litestar-org#3941 Co-authored-by: Cursor <cursoragent@cursor.com>
|
@all-contributors please add @Brohammad for doc |
|
I've put up a pull request to add @Brohammad! 🎉 |
Co-authored-by: Janek Nouvertné <provinzkraut@posteo.de>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4908 +/- ##
=======================================
Coverage 67.29% 67.29%
=======================================
Files 293 293
Lines 15228 15228
Branches 1728 1728
=======================================
Hits 10248 10248
Misses 4833 4833
Partials 147 147 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@all-contributors please add @Brohammad for doc |
|
@Brohammad already contributed before to doc |
|
All checks pass, no conflicts, and review feedback is applied. Ready to merge when convenient. |
|
@codex please review this PR. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@Brohammad Your behaviour of opening, closing, re-opening PRs, not taking into account feedback, and submitting redundant PR is highly disruptive. Furthermore, you repeatedly ignore our AI policy. You'll be blocked from further contributions in this organisation |
Summary
GET /schema/openapi.jsonis always available by default (via automaticJsonRenderPluginregistration)YamlRenderPluginconfiguration and thelitestar[yaml]extraapp.openapi_schemaFixes #3941
Context
This addresses the same issue as #4830 with corrections for factual accuracy (YAML is not served by default, which is covered by
test_openapi_yaml_not_allowedin the test suite). Happy to close this in favor of updating #4830 if maintainers prefer.Test plan
pre-commit run --files docs/usage/openapi/index.rstpre-commit run --all-filessphinx-build -b html -n docs docs/_build/html(no warnings on changed page)📚 Documentation preview 📚: https://litestar-org.github.io/litestar-docs-preview/4908