swagger-api / swagger-api/swagger-ui

Model Title disappears in Schemas for Enums when DefaultModelsExpandDepth > 1

Open
#9,463 0 comments 2 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 (please complete the following information)
  • OS: Windows 11 21H2
  • Browser: Chrome 120.0.6099.199; Firefox 121.0
  • Method of installation: NuGet Swashbuckle.AspNetCore 6.5.0
  • Swagger-UI version: 4.15.5
  • Swagger/OpenAPI version: 2.0, 3.0
Content & configuration

app.UseSwaggerUI(c =>
{
.....
c.DefaultModelExpandDepth(4);
.....
});

Describe the bug you're encountering

Model Title disappears in Schemas for Enums when DefaultModelsExpandDepth > 1

To reproduce...
  1. Go to Schemas
  2. Click on any Enum.
  3. Enum schema will expand and title will disappear
Screenshots

SwaggerUI

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

Reproduce the issue in Swagger UI with DefaultModelsExpandDepth greater than 1, then open Schemas and expand an enum. Trace the enum schema rendering path and verify that the model title remains visible after expansion; confirm the behavior for the reported Swagger/OpenAPI versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.