swagger-api / swagger-api/swagger-ui
Issue: $dynamicRef is not supported in Swagger UI / OpenAPI 3.1
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Hi, I'm using OpenAPI 3.1 with JSON Schema 2020-12 features to model generic types using $dynamicRef and $dynamicAnchor. Swagger UI correctly renders the schema, but the Interaction panel ("Try it out") does not support it at all.
Schema view works
The schema containing $dynamicRef / $dynamicAnchor renders normally in the Schema section.
Swagger UI accepts the structure and shows the generic type correctly.
Interaction view does not work
However, in the Interaction panel (request body editor):
$dynamicRef is ignored
The resolved schema is not applied
The generated example becomes null, {}, or an empty schema
Validation does not work
UI behaves as if $dynamicRef is not part of the spec
This makes $dynamicRef unusable for any API interaction, even though the Schema tab displays it perfectly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Swagger UI's Interaction panel and request body editor, using an OpenAPI 3.1 schema with $dynamicRef and $dynamicAnchor like the issue describes. Compare the Schema section with generated examples and validation; done means the resolved schema is applied in Try it out instead of producing null, empty, or unvalidated content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100