swagger-api / swagger-api/swagger-ui

OpenAPI 3.1.0 support: Schemas titles are no more displayed

Open
#9,308 2 comments 9 reactions 0 assignees View on GitHub

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.

image

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:

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.