swagger-api / swagger-api/swagger-ui
OpenAPI 3.1 operation expansion is very slow in Swagger UI
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
OpenAPI 3.1 operation expansion is very slow in Swagger UI (3.0.3 is fast)
How to reproduce
- Fork/clone this repo: https://github.com/abrunner94/swagger-test, which has the OpenAPI spec
- Run
npm run start - Switch between Swagger and OpenAPI versions to verify the slowness
Q&A (please complete the following information)
- OS: macOS
- Browser: Chrome
- Version: 122
- Method of installation: dist assets via unpkg CDN (
swagger-ui-dist) - Swagger-UI version:
5.17.0,5.32.0(regression observed);5.1.0(baseline fast) - Swagger/OpenAPI version: OpenAPI
3.1.0(same spec rendered as3.0.3is fast)
Content & configuration
Full repro uses a large real-world openapi.json / openapi.yml with openapi: 3.1.0 and reproduces consistently.
How can we help?
We are seeing a major performance regression when expanding operations for OpenAPI 3.1 specs in newer Swagger UI versions.
Steps to reproduce
- Load a large OpenAPI
3.1.0spec. - Render with
swagger-ui-dist@5.32.0(also reproducible on5.17.0). - Expand any operation.
- Observe multi-second delay/hang.
- Render the same spec as
3.0.3and expand the same operation. - Observe near-instant expansion.
Expected behavior
Operation expansion should remain responsive for OpenAPI 3.1 and be comparable to OpenAPI 3.0.3 for the same content.
Actual behavior
OpenAPI 3.1 operation expansion is significantly slower (multi-second delay), while OpenAPI 3.0.3 remains fast.
Could you confirm whether this is a known regression in the OAS 3.1 processing path and suggest a fix or recommended workaround?
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 with the linked swagger-test repository and run npm run start using the large OpenAPI 3.1 spec. Compare operation expansion in Swagger UI 5.32.0 or 5.17.0 against 5.1.0 and the same content represented as OpenAPI 3.0.3; done means expansion is responsive and comparable to the 3.0.3 behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100