File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,6 @@ function createAjv(
6161 for ( let [ formatName , formatDefinition ] of Object . entries ( options . formats ) ) {
6262 ajv . addFormat ( formatName , formatDefinition ) ;
6363 }
64- ajv . removeKeyword ( 'propertyNames' ) ;
65- ajv . removeKeyword ( 'contains' ) ;
66- ajv . removeKeyword ( 'const' ) ;
6764
6865 if ( options . serDesMap ) {
6966 // 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 {
194194
195195export namespace OpenAPIV3 {
196196 export interface DocumentV3 {
197- openapi : string ;
197+ openapi : `3.0.${ string } ` ;
198198 info : InfoObject ;
199199 servers ?: ServerObject [ ] ;
200200 paths : PathsObject ;
@@ -208,7 +208,8 @@ export namespace OpenAPIV3 {
208208 pathItems ?: { [ path : string ] : PathItemObject | ReferenceObject }
209209 }
210210
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 } `;
212213 paths ?: DocumentV3 [ 'paths' ] ;
213214 info : InfoObjectV3_1 ;
214215 components : ComponentsV3_1 ;
Original file line number Diff line number Diff line change @@ -343,8 +343,8 @@ class Security {
343343 apiDocs : OpenAPIV3 . DocumentV3 | OpenAPIV3 . DocumentV3_1 ,
344344 schema : OperationObject ,
345345 ) : 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 ;
348348
349349 let usedSecuritySchema : SecurityRequirementObject [ ] = [ ] ;
350350 if ( hasPathSecurity ) {
You can’t perform that action at this time.
0 commit comments