enumeration function

SchemaType enumeration(
  1. List<String> values
)

Creates a schema type representing an enumeration of the given string values.

Implementation

SchemaType enumeration(List<String> values) {
  return SchemaType.string.property(SchemaProperties.$enum, values);
}