An enum type is a special data type that enables for a field to be a set of predefined constants.
Akwatype allows you to define enums that can then be used like any other type.
In the following example the size of the Pizza can only take the values small, medium and family
For example, this will be translated into OpenAPI
Advanced enum definition
It is also possible to add properties to enum value. This can be useful, for example, when using Akwatype export for code generation, or if you wish to add a label for each value.
Standard enum value properties :
- label (String)
- short description of the value
- num (String)
- Integer value associated with enum value
- Comment related to this value