(schema: EnumSchema, value: string)
| 128 | * Get label for a specific enum value |
| 129 | */ |
| 130 | export function getEnumLabel(schema: EnumSchema, value: string): string { |
| 131 | const index = getEnumValues(schema).indexOf(value) |
| 132 | return index >= 0 ? (getEnumLabels(schema)[index] ?? value) : value |
| 133 | } |
| 134 | |
| 135 | function getZodSchema(schema: PrimitiveSchemaDefinition): z.ZodTypeAny { |
| 136 | if (isEnumSchema(schema)) { |
no test coverage detected