Skip to content

Switch to new renderer#150

Open
stephenfin wants to merge 4 commits into
sphinx-contrib:masterfrom
stephenfin:switch-to-new-renderer
Open

Switch to new renderer#150
stephenfin wants to merge 4 commits into
sphinx-contrib:masterfrom
stephenfin:switch-to-new-renderer

Conversation

@stephenfin

Copy link
Copy Markdown
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>
@stephenfin stephenfin force-pushed the switch-to-new-renderer branch from a5dc436 to 6cb06ec Compare November 21, 2024 14:54
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.
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