Skip to content

[TypeScript-Angular] Override keyword needed in encoder.ts file #11852

@thisisthemurph

Description

@thisisthemurph
Description

When generating the Angular TypeScript api from my swagger.yaml file I have to manually fix the below error, which is presented when running ng serve to serve the application.

error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'HttpUrlEncodingCodec'.

This fix is to navigate to the generated encoder.ts file and manually prepend the two methods with the override keyword.

Swagger-codegen version

2.4.27 (current stable)

Command line used for generation
java -jar ../swagger-codegen-cli.jar generate -i ./swagger.yaml -l typescript-angular -o ../web-ui/src/app/shared/data-access/api-client -c ./swagger-config.json
Steps to reproduce
  1. Generate typescript-angular api from swagger file
  2. Serve the Angular application
  3. Review error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions