swagger-api / swagger-api/swagger-ui
Model Title disappears in Schemas for Enums when DefaultModelsExpandDepth > 1
Open
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...
- Go to Schemas
- Click on any Enum.
- Enum schema will expand and title will disappear
Screenshots
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
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