|
1 | 1 | export const dialectIdentifier = 'https://json-schema.org/draft/2020-12/schema';
|
2 | 2 |
|
3 | 3 | type CoreKeywords = {
|
4 |
| - $anchor?: string; |
5 |
| - $comment?: string; |
6 |
| - $defs?: { [key: string]: JsonSchema }; |
7 |
| - $dynamicAnchor?: string; |
8 |
| - $dynamicRef?: string; |
9 |
| - $id?: string; |
10 |
| - $ref?: string; |
11 |
| - $schema?: typeof dialectIdentifier; |
12 |
| - $vocabulary?: { [uri: string]: boolean }; |
| 4 | + $anchor?: undefined | string; |
| 5 | + $comment?: undefined | string; |
| 6 | + $defs?: undefined | { [key: string]: JsonSchema }; |
| 7 | + $dynamicAnchor?: undefined | string; |
| 8 | + $dynamicRef?: undefined | string; |
| 9 | + $id?: undefined | string; |
| 10 | + $ref?: undefined | string; |
| 11 | + $schema?: undefined | typeof dialectIdentifier; |
| 12 | + $vocabulary?: undefined | { [uri: string]: boolean }; |
13 | 13 | };
|
14 | 14 |
|
15 | 15 | type LogicSubschemasKeywords = {
|
16 |
| - allOf?: Array<JsonSchema>; |
17 |
| - anyOf?: Array<JsonSchema>; |
18 |
| - not?: JsonSchema; |
19 |
| - oneOf?: Array<JsonSchema>; |
| 16 | + allOf?: undefined | Array<JsonSchema>; |
| 17 | + anyOf?: undefined | Array<JsonSchema>; |
| 18 | + not?: undefined | JsonSchema; |
| 19 | + oneOf?: undefined | Array<JsonSchema>; |
20 | 20 | };
|
21 | 21 |
|
22 | 22 | type ConditionalSubschemasKeywords = {
|
23 |
| - dependentSchemas?: { [key: string]: JsonSchema }; |
24 |
| - else?: JsonSchema; |
25 |
| - if?: JsonSchema; |
26 |
| - then?: JsonSchema; |
| 23 | + dependentSchemas?: undefined | { [key: string]: JsonSchema }; |
| 24 | + else?: undefined | JsonSchema; |
| 25 | + if?: undefined | JsonSchema; |
| 26 | + then?: undefined | JsonSchema; |
27 | 27 | };
|
28 | 28 |
|
29 | 29 | type MetaDataAnnotationKeywords = {
|
30 |
| - default?: any; |
31 |
| - deprecated?: boolean; |
32 |
| - description?: string; |
33 |
| - examples?: Array<any>; |
34 |
| - readOnly?: boolean; |
35 |
| - title?: string; |
36 |
| - writeOnly?: boolean; |
| 30 | + default?: undefined | any; |
| 31 | + deprecated?: undefined | boolean; |
| 32 | + description?: undefined | string; |
| 33 | + examples?: undefined | Array<any>; |
| 34 | + readOnly?: undefined | boolean; |
| 35 | + title?: undefined | string; |
| 36 | + writeOnly?: undefined | boolean; |
37 | 37 | };
|
38 | 38 |
|
39 | 39 | type FormatKeywords = {
|
40 |
| - format?: string; |
| 40 | + format?: undefined | string; |
41 | 41 | };
|
42 | 42 |
|
43 | 43 | type JsonSchemaType = 'null' | 'boolean' | 'string' | 'integer' | 'number' | 'array' | 'object';
|
44 | 44 |
|
45 | 45 | type CommonValidationKeywords = {
|
46 |
| - const?: any; |
47 |
| - enum?: Array<any>; |
48 |
| - type?: JsonSchemaType | Array<JsonSchemaType>; |
| 46 | + const?: undefined | any; |
| 47 | + enum?: undefined | Array<any>; |
| 48 | + type?: undefined | JsonSchemaType | Array<JsonSchemaType>; |
49 | 49 | };
|
50 | 50 |
|
51 | 51 | type StringValidationKeywords = {
|
52 |
| - maxLength?: number; |
53 |
| - minLength?: number; |
54 |
| - pattern?: string; |
| 52 | + maxLength?: undefined | number; |
| 53 | + minLength?: undefined | number; |
| 54 | + pattern?: undefined | string; |
55 | 55 | };
|
56 | 56 |
|
57 | 57 | type NumericValidationKeywords = {
|
58 |
| - exclusiveMaximum?: number; |
59 |
| - exclusiveMinimum?: number; |
60 |
| - maximum?: number; |
61 |
| - minimum?: number; |
62 |
| - multipleOf?: number; |
| 58 | + exclusiveMaximum?: undefined | number; |
| 59 | + exclusiveMinimum?: undefined | number; |
| 60 | + maximum?: undefined | number; |
| 61 | + minimum?: undefined | number; |
| 62 | + multipleOf?: undefined | number; |
63 | 63 | };
|
64 | 64 |
|
65 | 65 | type ArrayValidationKeywords = {
|
66 |
| - contains?: JsonSchema; |
67 |
| - items?: JsonSchema; |
68 |
| - maxContains?: number; |
69 |
| - maxItems?: number; |
70 |
| - minContains?: number; |
71 |
| - minItems?: number; |
72 |
| - prefixItems?: Array<JsonSchema>; |
73 |
| - uniqueItems?: boolean; |
| 66 | + contains?: undefined | JsonSchema; |
| 67 | + items?: undefined | JsonSchema; |
| 68 | + maxContains?: undefined | number; |
| 69 | + maxItems?: undefined | number; |
| 70 | + minContains?: undefined | number; |
| 71 | + minItems?: undefined | number; |
| 72 | + prefixItems?: undefined | Array<JsonSchema>; |
| 73 | + uniqueItems?: undefined | boolean; |
74 | 74 | };
|
75 | 75 |
|
76 | 76 | type ObjectValidationKeywords = {
|
77 |
| - dependentRequired?: Record<string, Array<string>>; |
78 |
| - maxProperties?: number; |
79 |
| - minProperties?: number; |
80 |
| - required?: string[]; |
| 77 | + dependentRequired?: undefined | Record<string, Array<string>>; |
| 78 | + maxProperties?: undefined | number; |
| 79 | + minProperties?: undefined | number; |
| 80 | + required?: undefined | string[]; |
81 | 81 | };
|
82 | 82 |
|
83 | 83 | type ObjectSubschemaKeywords = {
|
84 |
| - additionalProperties?: JsonSchema; |
85 |
| - patternProperties?: { [propertyNameRegex: string]: JsonSchema }; |
86 |
| - properties?: { [propertyName: string]: JsonSchema }; |
87 |
| - propertyNames?: JsonSchema; |
| 84 | + additionalProperties?: undefined | JsonSchema; |
| 85 | + patternProperties?: undefined | { [propertyNameRegex: string]: JsonSchema }; |
| 86 | + properties?: undefined | { [propertyName: string]: JsonSchema }; |
| 87 | + propertyNames?: undefined | JsonSchema; |
88 | 88 | };
|
89 | 89 |
|
90 | 90 | type UnevaluatedLocationsKeywords = {
|
91 |
| - unevaluatedItems?: JsonSchema; |
92 |
| - unevaluatedProperties?: JsonSchema; |
| 91 | + unevaluatedItems?: undefined | JsonSchema; |
| 92 | + unevaluatedProperties?: undefined | JsonSchema; |
93 | 93 | };
|
94 | 94 |
|
95 | 95 | export type JsonSchemaObject = CoreKeywords &
|
|
0 commit comments