Skip to content

[typescript-angular] not generating enums as enum type #10875

@Mattieeec3

Description

@Mattieeec3
Description

I have an enum in my swagger scheme, but after generating the typescript-angular client with swagger codegen, the generated 'enum' looks like below:

image

The generator should use the typescript enum type instead of creating a custom object.

Swagger-codegen version

2.4.17

Swagger declaration file content or url

https://pastebin.com/h9MK0NEQ

Command line used for generation

java -jar swagger-codegen-cli.jar generate -i http://localhost:54371/swagger/v1/swagger.json -l typescript-angular -o .

Steps to reproduce

Generate angular-typescript client with the swagger declaration file

Related issues/PRs

/

Suggest a fix/enhancement

/

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