swagger-api / swagger-api/swagger-ui
OpenAPI 3.1.0 support: Schemas titles are no more displayed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A
- Method of installation: unpkg.com dist assets
- Swagger-UI version:
5.9.0 - OpenAPI version:
3.1.0
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.1.0
...
components:
schemas:
response-wrapper:
title: ResponseWrapper
type: object
Swagger-UI configuration options:
SwaggerUIBundle({
url: "open-api.yaml",
dom_id: "#swagger-ui",
filter: true,
docExpansion: "list",
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset,
],
plugins: [SwaggerUIBundle.plugins.DownloadUrl],
});
Describe the bug you're encountering
While upgrading to OpenAPI version 3.1.0, the titles of the schemas are no longer displayed.
Instead, I see the path specified in the components/schemas (response-wrapper).
If I revert to version 3.0.0, it works again.
To reproduce...
Steps to reproduce the behavior:
Upgrade to OpenAPI version 3.1.0.
Expected behavior
I should see the contents of the title property displayed:
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 by reproducing the supplied OpenAPI 3.1.0 schema in Swagger UI 5.9.0, then compare its rendered title with the same schema under 3.0.0. Trace the schema display path used for components/schemas; done means the ResponseWrapper title is shown instead of response-wrapper, with regression coverage if the existing test structure identifies a suitable location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- api, documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100