Extensible enums
Open enum used across status fields like citizenship, employment, and program status. A typed variant `ExtensibleEnumT<T>` constrains `value` to a caller-supplied type.
ExtensibleEnum
Section titled “ExtensibleEnum”An open enum: an optional `value` of unspecified shape plus a free-form
`description`. Use this when the value set is open-ended and a typed
constraint isn't appropriate. For typed variants, see `ExtensibleEnumT
| Property | Type | Required | Description |
|---|---|---|---|
value | unknown | Yes | The selected value. May be from a predefined set or a caller-defined value. |
customValue | string | No | Caller-defined value when `value` does not fit a predefined option. |
description | string | No | Human-readable description or annotation for the value. |
{ "value": "us_citizen", "description": "U.S. citizen by birth"}$schema: https://json-schema.org/draft/2020-12/schema$id: ExtensibleEnum.yamltype: objectproperties: value: description: The selected value. May be from a predefined set or a caller-defined value. customValue: type: string description: Caller-defined value when `value` does not fit a predefined option. description: type: string description: Human-readable description or annotation for the value.required: - valueexamples: - value: us_citizen description: U.S. citizen by birthdescription: |- An open enum: an optional `value` of unspecified shape plus a free-form `description`. Use this when the value set is open-ended and a typed constraint isn't appropriate. For typed variants, see `ExtensibleEnumT<T>`./** An open enum: an optional `value` of unspecified shape plus a free-form * `description`. Use this when the value set is open-ended and a typed * constraint isn't appropriate. For typed variants, see `ExtensibleEnumT<T>`. */@example(Examples.ExtensibleEnum.customStatus)@Versioning.added(Versions.v0_1)model ExtensibleEnum { /** The selected value. May be from a predefined set or a caller-defined value. */ value: unknown;
/** Caller-defined value when `value` does not fit a predefined option. */ customValue?: string;
/** Human-readable description or annotation for the value. */ description?: string;}