npm / swagger-ui-react
swagger-ui-react
What changed in swagger-ui-react 5, from its official release notes, upgrade guides and advisories. Also covers @types/swagger-ui-react, swagger-ui-dist. Sources checked 2026-11-23.
5 breaking3 security13 new APIs and options4 performance18 behavior and defaults34 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initswagger-ui-react 577 changes
Breaking changes 5
The JSON Schema document renderer no longer infers a type from OpenAPI number formats.
OpenAPI 3.1 renders Callback operations only.
OpenAPI 3.1 rendering no longer capitalizes the first character of schema component names.
The Info.summary field is rendered as text instead of Markdown.
Schemas are resolved only when expanded in the Schemas section.
Security 3
Addresses the nghttp2-libs vulnerability CVE-2026-27135 in Docker-related artifacts.
Upgraded Alpine packages in Docker to address high-severity CVEs.
The Docker image now uses updated libpng and zlib versions to fix CVE-2026-33416, CVE-2026-33636, and CVE-2026-22184.
New APIs and options 13
Swagger UI can now render standalone JSON Schema 2020-12 documents.
Swagger UI supports additionalOperations in OpenAPI 3.2.
The filter supports searching operations by path.
Adds basic support for OpenAPI 3.2.0.
Swagger UI adds dark mode.
Adds a defaultExpandedLevels option for the JSON Schema 2020-12 renderer.
A new renderer supports JSON Schema 2020-12 in Operations and Webhooks, including its schema keywords and expandable behavior.
Adds the oas31 plugin, concentrating OpenAPI 3.1.0 features in a clear internal and public API.
OpenAPI webhooks are rendered below the paths.
Docker images now support the PORT_IPV6 environment variable.
Adds sample generation support for JSON Schema 2020-12 features, including examples, const, content-related keywords, formats, and schema merging.
The samples plugin can now be overridden for OpenAPI 3.1 support.
The standalone preset is now exported from the npm package, making it available to package users.
Performance 4
Adds virtualization for schemas and operations.
Limit the number of operation rerenders.
Reduced conversion from immutablejs to plain JavaScript objects.
Enables a sub-tree expansion optimization for JSON Schema 2020-12.
Behavior and default changes 18
The JSON Schema document renderer renders definitions like $defs.
The JSON Schema document renderer now renders document info and definitions.
The JSON Schema document renderer now shows $recursiveAnchor and $recursiveRef.
The default supportedSubmitMethods for OAS 3.2 now includes query.
Native browser controls now indicate the dark color scheme.
The Authorization popup can now be closed with the Escape key or by clicking the backdrop.
Copy-to-clipboard buttons now have aria-labels, improving their accessibility to assistive technology users.
The dark-mode toggle button now exposes its name and state for accessibility.
Reduces padding on inline code blocks in markdown, changing their rendered appearance.
Adds a skip-to-operations link and banner and main landmarks to improve navigation for assistive technology users.
Model titles use strong semantics to convey emphasis to assistive technology.
Reverts the change that made Authorization easier to access.
The baseDoc option supports relative references in OpenAPI 3.1.
Cookie-based apiKey authentication is persisted in document.cookie.
Custom OAS 3.1 formats are handled in type inference for JSON Schema 2020-12.
Swagger UI now renders the Info.summary field.
Swagger UI now renders the License.identifier field.
Swagger UI now renders the OpenAPI jsonSchemaDialect field.
Fixes and other changes 34
The JSON Schema document renderer renders dependencies like their successors.
Handles non-Map values in response.
Fixes handling virtualization with path item references.
Fixes visibility of the operation copy-to-clipboard icon.
A scoped DOMPurify instance is used to avoid mutating the global instance.
Buttons now have accessible names, improving accessibility for users of assistive technologies.
Restores icon visibility in Windows High Contrast Mode.
The topbar logo and dark-mode toggle are now visible in Windows High Contrast Mode.
Avoids a crash when an OpenAPI requestBody has no content field.
Parameter inputs no longer fill with invalid array initial values.
Fixes the default text color for Markdown list items in Dark Mode.
Increased the authorization backdrop z-index to fix its layering.
Move the button margin from right to left.
Cache invalidation now accounts for location, preventing stale models components from being reused.
Responsive styling now uses container queries.
A mistakenly added condition was removed from core.
Validated support for OpenAPI 3.1.2.
Sanitizing now handles multi-level relative paths.
Prevents webhooks from crashing when used with OpenAPI 3.0.
Handles complex value stringification in the Property component.
Corrects spec paths for parameters, responses and request bodies.
Fixes expansion margins for OpenAPI 3.1 base dialect keywords.
OpenAPI 3.1 base dialect keywords now have extendable behavior.
JSON Schema 2020-12 boolean schemas are now handled properly.
Expanding a Callback operation no longer causes a browser error.
Fixes collapsible behavior for JSON Schema 2020-12.
The response-body download button is hidden when the content is empty.
Fixes rendering of JSON Schema 2020-12 items keywords.
Model component schema names are decoded when rendered.
Fixes cycle detection for OpenAPI 3.1.0.
OpenAPI 3.1 now detects user edits to request bodies in OpenAPI.paths.
Fixes rendering of OpenAPI 3.1 Path Items containing schemas with cycles.
Fixes rendering of a Schema Object inside an Operation Object in OpenAPI 3.1.
Fixes deep linking for OpenAPI 3.1 Webhooks and Callbacks.