Kevin Locke df0c54d043 Support the empty string as an enumeration value (#4450)
When a string enumeration has the empty string as one of its available
values, the generated code for many languages is invalid because the
empty string can not be used as an identifier.  As with numbers and
symbols, provide a mapping to an English name which can be used as a
replacement.  In this case, "empty" for the empty string/empty value.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-06 19:30:47 +08:00

810 B

EnumTest

Properties

Name Type Description Notes
enumString EnumStringEnum [optional]
enumInteger EnumIntegerEnum [optional]
enumNumber EnumNumberEnum [optional]
outerEnum OuterEnum [optional]

Enum: EnumStringEnum

Name Value
UPPER "UPPER"
LOWER "lower"
EMPTY ""

Enum: EnumIntegerEnum

Name Value
NUMBER_1 1
NUMBER_MINUS_1 -1

Enum: EnumNumberEnum

Name Value
NUMBER_1_DOT_1 1.1
NUMBER_MINUS_1_DOT_2 -1.2