Closed
Description
There's basically tow options.The first is use another field likeenumNames:string[]
in OpenApiSchema
to generate enums with custom names.
Schema like this:
"state": {
"title": "State",
"enum": [
0,
1,
2
],
"type": "integer",
"default": 0,
"enumNames": ["initial", "working", "finished"]
}
Generated code:
enum state {
INITIAL = 0,
WORKING = 1,
FINISHED = 2
}
But enumNames is not a valid openapi schema field.
Another option is expanding the getEnumFromDescription
.
Metadata
Metadata
Assignees
Labels
No labels