Switch to new renderer#150
Open
stephenfin wants to merge 4 commits into
Open
Conversation
stephenfin
commented
Feb 13, 2024
Member
- pre-commit: Update hooks
- Add support for Python 3.12, drop 3.7
- Bump action versions
- docs: Trivial fixes
- docs: Add docs for new renderer
- Switch default renderer to new renderer
Signed-off-by: Stephen Finucane <stephen@that.guru>
Ahead of rework for switch to new directive. Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Stephen Finucane <stephen@that.guru>
We add the ability to use the old renderer in some tests. Signed-off-by: Stephen Finucane <stephen@that.guru>
a5dc436 to
6cb06ec
Compare
dmpayton
added a commit
to SJVAir/sjvair-python
that referenced
this pull request
Jul 8, 2026
The package defaults to the old renderer, which doesn't support the generate-examples-from-schemas option. Switching (via the openapi_default_renderer config value -- undocumented until sphinx-contrib/openapi#150) plus enabling that option gets us actual example response bodies, matching what sjvair.com's own Scalar-based API docs already show, since the live spec has no explicit examples of its own. Also works around a crash in that option: the spec is OpenAPI 3.1 and expresses nullable fields as `type: [X, "null"]` (JSON Schema 2020-12 style), which the renderer's example generator can't hash. Flattening those to a single type before writing the spec avoids the crash without changing what's documented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.