Closed
Description
Hi I'm trying to generate the a enum from the following swagger/openapi definition
"Test": {
"enum": [
"Start",
"Step1",
"Step2",
"Step3",
"Step4"
],
"type": "string"
},
But even when i use the --enums
flag it generates a type instead?
export type Test = 'Start' | 'Step1' | 'Step2' | 'Step3' | 'Step4';
I was expecting something like
export enum Test {
START = 'Start',
STEP1 = 'Step1',
....
}
I'm running the following command: cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 openapi-rq --enums -i https://localhost:44353/swagger/v1/swagger.json -o src/openapi/