swagger-api / swagger-api/swagger-ui
Angular 19 build error with immutable package and SwaggerUI
Open
Nobody has claimed this yet.
Workaround available
- 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: macOS
- Browser: chrome
- Version: 124.0.6367.78
- Method of installation: npm
- Swagger-UI version: 5.18.2
- Swagger/OpenAPI version: Swagger 2.0
Content & configuration
Swagger-UI configuration options:
SwaggerUI({
domNode: document.getElementById('swagger-ui-item'),
url: 'https://petstore.swagger.io/v2/swagger.json',
});
Describe the bug you're encountering
To reproduce...
Steps to reproduce the behavior:
- With angular 19 and swaggerUI 5.18.2 installed, try to display a swagger doc
- When page loads, it will point you to a map call on immutable which doesn't exist in the swaggerUI version.
Expected behavior
SwaggerUI should not throw an error and display the swagger doc.
Screenshots
Console error printed above
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 by reproducing the failure with Angular 19, npm, and Swagger UI 5.18.2 using the configuration in the issue. Inspect the Angular call in swagger.component.ts:35 and the related immutable handling in swagger-ui.js, then verify that the Swagger document renders without the reported console error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100