File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed
Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ export interface SchemaObject {
214214 additionalProperties ?: SchemaObject | ReferenceObject | boolean ;
215215 patternProperties ?: SchemaObject | ReferenceObject | any ;
216216 description ?: string ;
217- format ?: string ;
217+ format ?: OpenAPIFormat ;
218218 default ?: any ;
219219 title ?: string ;
220220 multipleOf ?: number ;
@@ -289,3 +289,37 @@ export type ScopesObject = Record<string, any>;
289289export type SecurityRequirementObject = Record < string , string [ ] > ;
290290
291291export type ExtensionLocation = 'root' | 'info' ;
292+
293+ /**
294+ * OpenAPI format values as defined in the specification.
295+ * @see https://spec.openapis.org/oas/v3.0.3#data-types
296+ * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-7.3
297+ */
298+ export type OpenAPIFormat =
299+ | 'int32'
300+ | 'int64'
301+ | 'float'
302+ | 'double'
303+ | 'byte'
304+ | 'binary'
305+ | 'date'
306+ | 'date-time'
307+ | 'time'
308+ | 'duration'
309+ | 'password'
310+ | 'email'
311+ | 'idn-email'
312+ | 'hostname'
313+ | 'idn-hostname'
314+ | 'ipv4'
315+ | 'ipv6'
316+ | 'uri'
317+ | 'uri-reference'
318+ | 'uri-template'
319+ | 'iri'
320+ | 'iri-reference'
321+ | 'uuid'
322+ | 'json-pointer'
323+ | 'relative-json-pointer'
324+ | 'regex'
325+ | ( string & { } ) ;
You can’t perform that action at this time.
0 commit comments