Closed
Description
I want to define a property as an enum. But I don't want to enter the enum values in the schema. The values will be fetched from a database and will be dynamic in nature.
I want to do something like this:
"TAG": { "type": "enum" }
The schema will be used to auto-generate api code and database queries. (So I need to know that it is an enum property - so the generated code will query the constants table in the db). What is the best way to do this?
I'm currenty followung the openAPI spec, so I'm doing this right now (using a custom extension) :
properties: {
...
},
"x-enums": [ "GENDER", "TAG", "COUNTRY" ]
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Closed