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 as 3.0.3 is 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.0 spec.
- Render with
swagger-ui-dist@5.32.0 (also reproducible on 5.17.0).
- Expand any operation.
- Observe multi-second delay/hang.
- Render the same spec as
3.0.3 and 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?
OpenAPI 3.1 operation expansion is very slow in Swagger UI (3.0.3 is fast)
How to reproduce
npm run startQ&A (please complete the following information)
swagger-ui-dist)5.17.0,5.32.0(regression observed);5.1.0(baseline fast)3.1.0(same spec rendered as3.0.3is fast)Content & configuration
Full repro uses a large real-world
openapi.json/openapi.ymlwithopenapi: 3.1.0and 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
3.1.0spec.swagger-ui-dist@5.32.0(also reproducible on5.17.0).3.0.3and expand the same operation.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?