1
- interface CommonSchema <
1
+ interface CommonJsonSchema <
2
2
SchemaType ,
3
3
MappedTypeScriptType ,
4
4
LogicSubschema ,
@@ -19,35 +19,35 @@ interface CommonSchema<
19
19
writeOnly ?: boolean
20
20
}
21
21
22
- export interface NullSchema extends CommonSchema < 'null' , null , NullSchema > {
22
+ export interface NullJsonSchema extends CommonJsonSchema < 'null' , null , NullJsonSchema > {
23
23
}
24
24
25
- export interface BooleanSchema extends CommonSchema < 'boolean' , boolean , BooleanSchema > {
25
+ export interface BooleanJsonSchema extends CommonJsonSchema < 'boolean' , boolean , BooleanJsonSchema > {
26
26
}
27
27
28
- export interface StringSchema extends CommonSchema < 'string' , string , StringSchema > {
28
+ export interface StringJsonSchema extends CommonJsonSchema < 'string' , string , StringJsonSchema > {
29
29
maxLength ?: number ,
30
30
minLength ?: number ,
31
31
pattern ?: string ,
32
32
}
33
33
34
- export interface NumberSchema extends CommonSchema < 'number' , number , NumberSchema > {
34
+ export interface NumberJsonSchema extends CommonJsonSchema < 'number' , number , NumberJsonSchema > {
35
35
exclusiveMaximum ?: number ,
36
36
exclusiveMinimum ?: number ,
37
37
maximum ?: number ,
38
38
minimum ?: number ,
39
39
multipleOf ?: number ,
40
40
}
41
41
42
- export interface IntegerSchema extends CommonSchema < 'integer' , number , IntegerSchema > {
42
+ export interface IntegerJsonSchema extends CommonJsonSchema < 'integer' , number , IntegerJsonSchema > {
43
43
exclusiveMaximum ?: number ,
44
44
exclusiveMinimum ?: number ,
45
45
maximum ?: number ,
46
46
minimum ?: number ,
47
47
multipleOf ?: number ,
48
48
}
49
49
50
- export interface ArraySchema extends CommonSchema < 'array' , Array < any > , ArraySchema > {
50
+ export interface ArrayJsonSchema extends CommonJsonSchema < 'array' , Array < any > , ArrayJsonSchema > {
51
51
contains ?: JsonSchema ,
52
52
items ?: JsonSchema ,
53
53
maxContains ?: number ,
@@ -58,7 +58,7 @@ export interface ArraySchema extends CommonSchema<'array', Array<any>, ArraySche
58
58
uniqueItems ?: boolean
59
59
}
60
60
61
- export interface ObjectSchema extends CommonSchema < 'object' , Record < string , any > , ObjectSchema > {
61
+ export interface ObjectJsonSchema extends CommonJsonSchema < 'object' , Record < string , any > , ObjectJsonSchema > {
62
62
additionalProperties ?: JsonSchema ,
63
63
dependentRequired ?: Record < string , Array < string > > ,
64
64
maxProperties ?: number ,
@@ -69,16 +69,16 @@ export interface ObjectSchema extends CommonSchema<'object', Record<string, any>
69
69
required ?: Array < string > ,
70
70
}
71
71
72
- type CommonProperties = keyof CommonSchema < any , any , any > ;
72
+ type CommonProperties = keyof CommonJsonSchema < any , any , any > ;
73
73
74
- export interface AnySchema extends Omit < NullSchema , CommonProperties > ,
75
- Omit < BooleanSchema , CommonProperties > ,
76
- Omit < StringSchema , CommonProperties > ,
77
- Omit < NumberSchema , CommonProperties > ,
78
- Omit < IntegerSchema , CommonProperties > ,
79
- Omit < ArraySchema , CommonProperties > ,
80
- Omit < ObjectSchema , CommonProperties > ,
81
- CommonSchema < undefined | Array < 'string' | 'integer' | 'number' | 'array' | 'object' | 'boolean' | 'null' > , any , JsonSchema > {
74
+ export interface AnyJsonSchema extends Omit < NullJsonSchema , CommonProperties > ,
75
+ Omit < BooleanJsonSchema , CommonProperties > ,
76
+ Omit < StringJsonSchema , CommonProperties > ,
77
+ Omit < NumberJsonSchema , CommonProperties > ,
78
+ Omit < IntegerJsonSchema , CommonProperties > ,
79
+ Omit < ArrayJsonSchema , CommonProperties > ,
80
+ Omit < ObjectJsonSchema , CommonProperties > ,
81
+ CommonJsonSchema < undefined | Array < 'string' | 'integer' | 'number' | 'array' | 'object' | 'boolean' | 'null' > , any , JsonSchema > {
82
82
}
83
83
84
- export type JsonSchema = NullSchema | BooleanSchema | StringSchema | NumberSchema | IntegerSchema | ArraySchema | ObjectSchema | AnySchema ;
84
+ export type JsonSchema = NullJsonSchema | BooleanJsonSchema | StringJsonSchema | NumberJsonSchema | IntegerJsonSchema | ArrayJsonSchema | ObjectJsonSchema | AnyJsonSchema ;
0 commit comments