( schema: PrimitiveSchemaDefinition, )
| 243 | } |
| 244 | |
| 245 | const hasStringFormat = ( |
| 246 | schema: PrimitiveSchemaDefinition, |
| 247 | ): schema is StringSchema & { format: string } => { |
| 248 | return ( |
| 249 | schema.type === 'string' && |
| 250 | 'format' in schema && |
| 251 | typeof schema.format === 'string' |
| 252 | ) |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * Returns a helpful placeholder/hint for a given format |