File tree 3 files changed +5
-7
lines changed 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,6 @@ function createAjv(
61
61
for ( let [ formatName , formatDefinition ] of Object . entries ( options . formats ) ) {
62
62
ajv . addFormat ( formatName , formatDefinition ) ;
63
63
}
64
- ajv . removeKeyword ( 'propertyNames' ) ;
65
- ajv . removeKeyword ( 'contains' ) ;
66
- ajv . removeKeyword ( 'const' ) ;
67
64
68
65
if ( options . serDesMap ) {
69
66
// Alias for `type` that can execute AFTER x-eov-res-serdes
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ export interface NormalizedOpenApiValidatorOpts extends OpenApiValidatorOpts {
194
194
195
195
export namespace OpenAPIV3 {
196
196
export interface DocumentV3 {
197
- openapi : string ;
197
+ openapi : `3.0.${ string } ` ;
198
198
info : InfoObject ;
199
199
servers ?: ServerObject [ ] ;
200
200
paths : PathsObject ;
@@ -208,7 +208,8 @@ export namespace OpenAPIV3 {
208
208
pathItems ?: { [ path : string ] : PathItemObject | ReferenceObject }
209
209
}
210
210
211
- export interface DocumentV3_1 extends Omit < DocumentV3 , 'paths' | 'info' | 'components' > {
211
+ export interface DocumentV3_1 extends Omit < DocumentV3 , 'paths' | 'info' | 'components' | "openapi" > {
212
+ openapi : `3.1.${string } `;
212
213
paths ?: DocumentV3 [ 'paths' ] ;
213
214
info : InfoObjectV3_1 ;
214
215
components : ComponentsV3_1 ;
Original file line number Diff line number Diff line change @@ -343,8 +343,8 @@ class Security {
343
343
apiDocs : OpenAPIV3 . DocumentV3 | OpenAPIV3 . DocumentV3_1 ,
344
344
schema : OperationObject ,
345
345
) : string [ ] {
346
- const hasPathSecurity = schema . security ?. length > 0 ?? false ;
347
- const hasRootSecurity = apiDocs . security ?. length > 0 ?? false ;
346
+ const hasPathSecurity = schema . security ? schema . security . length > 0 : false ;
347
+ const hasRootSecurity = apiDocs . security ? apiDocs . security . length > 0 : false ;
348
348
349
349
let usedSecuritySchema : SecurityRequirementObject [ ] = [ ] ;
350
350
if ( hasPathSecurity ) {
You can’t perform that action at this time.
0 commit comments