Skip to content

Restore old openapi-typescript-codegen enum behaviour #557

@alessiomatricardi

Description

@alessiomatricardi

Description

I'm attepting to migrate from openapi-typescript-codegen to this new library (which seems very complete, bravo!)
But I feel that new enums working structure is not complete as the old one.

With the old library, I was able to have enums exported with type namespace eg
image
While now it appears as below
image
I lost the ability of write Order.status.PLACED which was referring to placed value

Also, I don't notice any difference between "javascipt" and "typescript" value for types.enums

OpenAPI specification (optional)

https://petstore3.swagger.io/api/v3/openapi.json

Configuration

OLD
openapi -i /home/amatricardi/Downloads/openapi.json -o src/models/pets --exportCore false --exportServices false --indent 2

NEW
openapi-ts -i /home/amatricardi/Downloads/openapi.json -o src/models/pets2 --exportCore false --services false --schemas false --format prettier --lint eslint

System information (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🔥Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions