swagger-api / swagger-api/swagger-ui

Angular 19 build error with immutable package and SwaggerUI

Open
#10,223 4 comments 2 reactions 0 assignees View on GitHub

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:

  1. With angular 19 and swaggerUI 5.18.2 installed, try to display a swagger doc
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.