2
2
AnyJsonSchema ,
3
3
ArrayJsonSchema ,
4
4
BooleanJsonSchema ,
5
- IntegerJsonSchema , isAnyJsonSchema , isArrayJsonSchema ,
5
+ IntegerJsonSchema , isArrayJsonSchema ,
6
6
isBooleanJsonSchema , isIntegerJsonSchema ,
7
7
isNullJsonSchema ,
8
8
isNumberJsonSchema , isObjectJsonSchema ,
@@ -18,7 +18,7 @@ import { ExternalDocumentation } from './externalDocumentation';
18
18
import { Reference } from './reference' ;
19
19
import { XML } from './xml' ;
20
20
21
- export interface OasSchema extends JsonSchema {
21
+ export interface OasSchema < T = any > extends JsonSchema < T > {
22
22
externalDocs ?: ExternalDocumentation ,
23
23
xml ?: XML ;
24
24
}
@@ -34,7 +34,7 @@ export function isNullOasSchema(schema: any): schema is NullOasSchema {
34
34
return isNullJsonSchema ( schema ) ;
35
35
}
36
36
37
- export interface BooleanOasSchema extends BooleanJsonSchema , OasSchema {
37
+ export interface BooleanOasSchema extends BooleanJsonSchema , OasSchema < boolean > {
38
38
allOf ?: Array < BooleanOasSchema | Reference > ;
39
39
anyOf ?: Array < BooleanOasSchema | Reference > ;
40
40
not ?: BooleanOasSchema | Reference ;
@@ -45,7 +45,7 @@ export function isBooleanOasSchema(schema: any): schema is BooleanOasSchema {
45
45
return isBooleanJsonSchema ( schema ) ;
46
46
}
47
47
48
- export interface StringOasSchema extends StringJsonSchema , OasSchema {
48
+ export interface StringOasSchema extends StringJsonSchema , OasSchema < string > {
49
49
allOf ?: Array < StringOasSchema | Reference > ;
50
50
anyOf ?: Array < StringOasSchema | Reference > ;
51
51
not ?: StringOasSchema | Reference ;
@@ -56,7 +56,7 @@ export function isStringOasSchema(schema: any): schema is StringOasSchema {
56
56
return isStringJsonSchema ( schema ) ;
57
57
}
58
58
59
- export interface NumberOasSchema extends NumberJsonSchema , OasSchema {
59
+ export interface NumberOasSchema extends NumberJsonSchema , OasSchema < number > {
60
60
allOf ?: Array < NumberOasSchema | Reference > ;
61
61
anyOf ?: Array < NumberOasSchema | Reference > ;
62
62
not ?: NumberOasSchema | Reference ;
@@ -67,7 +67,7 @@ export function isNumberOasSchema(schema: any): schema is NumberOasSchema {
67
67
return isNumberJsonSchema ( schema ) ;
68
68
}
69
69
70
- export interface IntegerOasSchema extends IntegerJsonSchema , OasSchema {
70
+ export interface IntegerOasSchema extends IntegerJsonSchema , OasSchema < number > {
71
71
allOf ?: Array < IntegerOasSchema | Reference > ;
72
72
anyOf ?: Array < IntegerOasSchema | Reference > ;
73
73
not ?: IntegerOasSchema | Reference ;
@@ -78,7 +78,7 @@ export function isIntegerOasSchema(schema: any): schema is IntegerOasSchema {
78
78
return isIntegerJsonSchema ( schema ) ;
79
79
}
80
80
81
- export interface ArrayOasSchema extends ArrayJsonSchema , OasSchema {
81
+ export interface ArrayOasSchema extends ArrayJsonSchema , OasSchema < Array < any > > {
82
82
allOf ?: Array < ArrayOasSchema | Reference > ;
83
83
anyOf ?: Array < ArrayOasSchema | Reference > ;
84
84
contains ?: OasSchema | Reference ;
@@ -92,7 +92,7 @@ export function isArrayOasSchema(schema: any): schema is ArrayOasSchema {
92
92
return isArrayJsonSchema ( schema ) ;
93
93
}
94
94
95
- export interface ObjectOasSchema extends ObjectJsonSchema , OasSchema {
95
+ export interface ObjectOasSchema extends ObjectJsonSchema , OasSchema < Record < string , any > > {
96
96
allOf ?: Array < ObjectOasSchema | Reference > ;
97
97
anyOf ?: Array < ObjectOasSchema | Reference > ;
98
98
discriminator ?: Discriminator ;
@@ -117,7 +117,3 @@ export interface AnyOasSchema extends AnyJsonSchema, OasSchema {
117
117
not ?: OasSchema | Reference ;
118
118
oneOf ?: Array < OasSchema | Reference > ;
119
119
}
120
-
121
- export function isAnyOasSchema ( schema : any ) : schema is AnyOasSchema {
122
- return isAnyJsonSchema ( schema ) ;
123
- }
0 commit comments