swagger-api / swagger-api/swagger-ui

Angular must call super constructor in derived

Open
#9,326 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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: Windows
  • Browser: All
  • Version: 5.9.0
  • Method of installation: npm
  • Swagger-UI version: 5.9.0
  • Swagger/OpenAPI version: 2.0
Content & configuration

I am using angular and swagger-ui-dist library to add swagger-ui to my page.
While selecting enpoint I get error:
Could not render Vx, see the console.

And in console:
main.cc71d1475dd2fcfc1d8a.js:1 ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor

Swagger/OpenAPI definition:
NA

Swagger-UI configuration options:
{
spec: api2,
domNode: this.api2Element?.nativeElement,
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset.slice(1)],
layout: 'StandaloneLayout',
docExpansion: 'none',
operationsSorter: 'alpha',
tryItOutEnabled: false,
deepLinking: true,
displayOperationId: true,
supportedSubmitMethods: [],
}

Screenshots

image
image

How can we help?

Provide solution.

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

The issue provides no repository file, test, or minimal reproduction; it only identifies an Angular integration using swagger-ui-dist 5.9.0 and a console error when selecting an endpoint. Start by reproducing that integration and inspecting the rendering path for the reported derived-constructor error. Done means identifying the compatibility cause and providing a verified fix or clear usage guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.