Enum Values¶
Enum Values
is a Schema Constraint that checks enum fields and structures and confirms that their defined value is a possible enum value.
Usage Example¶
enum:
name: AlarmNoise
package: alarm_clock
description: List of available alarm noises
values:
- SONIC_BOOM
- SIREN
- KLAXON
- DOG_BARKING
In the above example, AlarmNoise
is an enum, and must be defined as either SONIC_BOOM
, SIREN
, KLAXON
, or DOG_BARKING
. If the defined value is not one of these, the Enum Values
constraint will fail.