Skip to content

Add option to preserve refs in served spec#2128

Open
chbndrhnns wants to merge 1 commit into
spec-first:mainfrom
chbndrhnns:feature/configurable-served-spec-refs
Open

Add option to preserve refs in served spec#2128
chbndrhnns wants to merge 1 commit into
spec-first:mainfrom
chbndrhnns:feature/configurable-served-spec-refs

Conversation

@chbndrhnns

@chbndrhnns chbndrhnns commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #2127.

Changes proposed in this pull request:

  • Added SwaggerUIOptions(resolve_spec_refs: bool = True) in connexion/options.py:40.
  • Updated the served spec endpoint to return raw when resolve_spec_refs=False in connexion/middleware/swagger_ui.py:72.
  • Added tests covering the default expanded behavior and the new preserved-ref behavior in tests/api/test_bootstrap.py:124.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 94.298% (+0.01%) from 94.288% — chbndrhnns:feature/configurable-served-spec-refs into spec-first:main

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.

Always serves spec with dereferenced entities

2 participants