schemaTypeToString function

String schemaTypeToString(
  1. SchemaType type
)

Converts SchemaType enum to string.

Implementation

String schemaTypeToString(SchemaType type) {
  return switch (type) {
    SchemaType.string => 'STRING',
    SchemaType.number => 'NUMBER',
    SchemaType.integer => 'INTEGER',
    SchemaType.boolean => 'BOOLEAN',
    SchemaType.array => 'ARRAY',
    SchemaType.object => 'OBJECT',
    SchemaType.unspecified => 'TYPE_UNSPECIFIED',
  };
}