1- // This file is autogenerated by build\ build-validation.js, do not edit
1+ // This file is autogenerated by build/ build-validation.js, do not edit
22/* c8 ignore start */
33"use strict" ;
44module . exports = validate10 ;
55module . exports . default = validate10 ;
6- const schema11 = { "type" :"object" , "additionalProperties" :false , "properties" :{ "connectionTimeout" :{ "type" :"integer" , "default" :0 } , "keepAliveTimeout" :{ "type" :"integer" , "default" :72000 } , "forceCloseConnections" :{ "oneOf" :[ { "type" :"string" , "pattern" :"idle" } , { "type" :"boolean" } ] } , "maxRequestsPerSocket" :{ "type" :"integer" , "default" :0 , "nullable" :true } , "requestTimeout" :{ "type" :"integer" , "default" :0 } , "bodyLimit" :{ "type" :"integer" , "default" :1048576 } , "caseSensitive" :{ "type" :"boolean" , "default" :true } , "allowUnsafeRegex" :{ "type" :"boolean" , "default" :false } , "http2" :{ "type" :"boolean" } , "https" :{ "if" :{ "not" :{ "oneOf" :[ { "type" :"boolean" } , { "type" :"null" } , { "type" :"object" , "additionalProperties" :false , "required" :[ "allowHTTP1" ] , "properties" :{ "allowHTTP1" :{ "type" :"boolean" } } } ] } } , "then" :{ "setDefaultValue" :true } } , "ignoreTrailingSlash" :{ "type" :"boolean" , "default" :false } , "ignoreDuplicateSlashes" :{ "type" :"boolean" , "default" :false } , "disableRequestLogging" :{ "type" :"boolean" , "default" :false } , "maxParamLength" :{ "type" :"integer" , "default" :100 } , "onProtoPoisoning" :{ "type" :"string" , "default" :"error" } , "onConstructorPoisoning" :{ "type" :"string" , "default" :"error" } , "pluginTimeout" :{ "type" :"integer" , "default" :10000 } , "requestIdHeader" :{ "anyOf" :[ { "type" :"boolean" } , { "type" :"string" } ] , "default" :false } , "requestIdLogLabel" :{ "type" :"string" , "default" :"reqId" } , "http2SessionTimeout" :{ "type" :"integer" , "default" :72000 } , "exposeHeadRoutes" :{ "type" :"boolean" , "default" :true } , "useSemicolonDelimiter" :{ "type" :"boolean" , "default" :false } , "versioning" :{ "type" :"object" , "additionalProperties" :true , "required" :[ "storage" , "deriveVersion" ] , "properties" :{ "storage" :{ } , "deriveVersion" :{ } } } , "constraints" :{ "type" :"object" , "additionalProperties" :{ "type" :"object" , "required" :[ "name" , "storage" , "validate" , "deriveConstraint" ] , "additionalProperties" :true , "properties" :{ "name" :{ "type" :"string" } , "storage" :{ } , "validate" :{ } , "deriveConstraint" :{ } } } } } } ;
6+ const schema11 = { "type" :"object" , "additionalProperties" :false , "properties" :{ "connectionTimeout" :{ "type" :"integer" , "default" :0 } , "keepAliveTimeout" :{ "type" :"integer" , "default" :72000 } , "forceCloseConnections" :{ "oneOf" :[ { "type" :"string" , "pattern" :"idle" } , { "type" :"boolean" } ] } , "maxRequestsPerSocket" :{ "type" :"integer" , "default" :0 , "nullable" :true } , "requestTimeout" :{ "type" :"integer" , "default" :0 } , "bodyLimit" :{ "type" :"integer" , "default" :1048576 } , "caseSensitive" :{ "type" :"boolean" , "default" :true } , "allowUnsafeRegex" :{ "type" :"boolean" , "default" :false } , "http2" :{ "type" :"boolean" } , "https" :{ "if" :{ "not" :{ "oneOf" :[ { "type" :"boolean" } , { "type" :"null" } , { "type" :"object" , "additionalProperties" :false , "required" :[ "allowHTTP1" ] , "properties" :{ "allowHTTP1" :{ "type" :"boolean" } } } ] } } , "then" :{ "setDefaultValue" :true } } , "ignoreTrailingSlash" :{ "type" :"boolean" , "default" :false } , "ignoreDuplicateSlashes" :{ "type" :"boolean" , "default" :false } , "disableRequestLogging" :{ "type" :"boolean" , "default" :false } , "maxParamLength" :{ "type" :"integer" , "default" :100 } , "onProtoPoisoning" :{ "type" :"string" , "default" :"error" } , "onConstructorPoisoning" :{ "type" :"string" , "default" :"error" } , "pluginTimeout" :{ "type" :"integer" , "default" :10000 } , "requestIdHeader" :{ "anyOf" :[ { "type" :"boolean" } , { "type" :"string" } ] , "default" :false } , "requestIdLogLabel" :{ "type" :"string" , "default" :"reqId" } , "http2SessionTimeout" :{ "type" :"integer" , "default" :72000 } , "exposeHeadRoutes" :{ "type" :"boolean" , "default" :true } , "useSemicolonDelimiter" :{ "type" :"boolean" , "default" :false } , "constraints" :{ "type" :"object" , "additionalProperties" :{ "type" :"object" , "required" :[ "name" , "storage" , "validate" , "deriveConstraint" ] , "additionalProperties" :true , "properties" :{ "name" :{ "type" :"string" } , "storage" :{ } , "validate" :{ } , "deriveConstraint" :{ } } } } } } ;
77const func2 = Object . prototype . hasOwnProperty ;
88const pattern0 = new RegExp ( "idle" , "u" ) ;
99
@@ -1002,54 +1002,32 @@ data["useSemicolonDelimiter"] = coerced25;
10021002}
10031003var valid0 = _errs67 === errors ;
10041004if ( valid0 ) {
1005- if ( data . versioning !== undefined ) {
1006- let data23 = data . versioning ;
1005+ if ( data . constraints !== undefined ) {
1006+ let data23 = data . constraints ;
10071007const _errs69 = errors ;
10081008if ( errors === _errs69 ) {
10091009if ( data23 && typeof data23 == "object" && ! Array . isArray ( data23 ) ) {
1010- let missing1 ;
1011- if ( ( ( data23 . storage === undefined ) && ( missing1 = "storage" ) ) || ( ( data23 . deriveVersion === undefined ) && ( missing1 = "deriveVersion" ) ) ) {
1012- validate10 . errors = [ { instancePath :instancePath + "/versioning" , schemaPath :"#/properties/versioning/required" , keyword :"required" , params :{ missingProperty : missing1 } , message :"must have required property '" + missing1 + "'" } ] ;
1013- return false ;
1014- }
1015- }
1016- else {
1017- validate10 . errors = [ { instancePath :instancePath + "/versioning" , schemaPath :"#/properties/versioning/type" , keyword :"type" , params :{ type : "object" } , message :"must be object" } ] ;
1018- return false ;
1019- }
1020- }
1021- var valid0 = _errs69 === errors ;
1022- }
1023- else {
1024- var valid0 = true ;
1025- }
1026- if ( valid0 ) {
1027- if ( data . constraints !== undefined ) {
1028- let data24 = data . constraints ;
1010+ for ( const key2 in data23 ) {
1011+ let data24 = data23 [ key2 ] ;
10291012const _errs72 = errors ;
10301013if ( errors === _errs72 ) {
10311014if ( data24 && typeof data24 == "object" && ! Array . isArray ( data24 ) ) {
1032- for ( const key2 in data24 ) {
1033- let data25 = data24 [ key2 ] ;
1034- const _errs75 = errors ;
1035- if ( errors === _errs75 ) {
1036- if ( data25 && typeof data25 == "object" && ! Array . isArray ( data25 ) ) {
1037- let missing2 ;
1038- if ( ( ( ( ( data25 . name === undefined ) && ( missing2 = "name" ) ) || ( ( data25 . storage === undefined ) && ( missing2 = "storage" ) ) ) || ( ( data25 . validate === undefined ) && ( missing2 = "validate" ) ) ) || ( ( data25 . deriveConstraint === undefined ) && ( missing2 = "deriveConstraint" ) ) ) {
1039- validate10 . errors = [ { instancePath :instancePath + "/constraints/" + key2 . replace ( / ~ / g, "~0" ) . replace ( / \/ / g, "~1" ) , schemaPath :"#/properties/constraints/additionalProperties/required" , keyword :"required" , params :{ missingProperty : missing2 } , message :"must have required property '" + missing2 + "'" } ] ;
1015+ let missing1 ;
1016+ if ( ( ( ( ( data24 . name === undefined ) && ( missing1 = "name" ) ) || ( ( data24 . storage === undefined ) && ( missing1 = "storage" ) ) ) || ( ( data24 . validate === undefined ) && ( missing1 = "validate" ) ) ) || ( ( data24 . deriveConstraint === undefined ) && ( missing1 = "deriveConstraint" ) ) ) {
1017+ validate10 . errors = [ { instancePath :instancePath + "/constraints/" + key2 . replace ( / ~ / g, "~0" ) . replace ( / \/ / g, "~1" ) , schemaPath :"#/properties/constraints/additionalProperties/required" , keyword :"required" , params :{ missingProperty : missing1 } , message :"must have required property '" + missing1 + "'" } ] ;
10401018return false ;
10411019}
10421020else {
1043- if ( data25 . name !== undefined ) {
1044- let data26 = data25 . name ;
1045- if ( typeof data26 !== "string" ) {
1046- let dataType26 = typeof data26 ;
1021+ if ( data24 . name !== undefined ) {
1022+ let data25 = data24 . name ;
1023+ if ( typeof data25 !== "string" ) {
1024+ let dataType26 = typeof data25 ;
10471025let coerced26 = undefined ;
10481026if ( ! ( coerced26 !== undefined ) ) {
10491027if ( dataType26 == "number" || dataType26 == "boolean" ) {
1050- coerced26 = "" + data26 ;
1028+ coerced26 = "" + data25 ;
10511029}
1052- else if ( data26 === null ) {
1030+ else if ( data25 === null ) {
10531031coerced26 = "" ;
10541032}
10551033else {
@@ -1058,9 +1036,9 @@ return false;
10581036}
10591037}
10601038if ( coerced26 !== undefined ) {
1061- data26 = coerced26 ;
1062- if ( data25 !== undefined ) {
1063- data25 [ "name" ] = coerced26 ;
1039+ data25 = coerced26 ;
1040+ if ( data24 !== undefined ) {
1041+ data24 [ "name" ] = coerced26 ;
10641042}
10651043}
10661044}
@@ -1072,7 +1050,7 @@ validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/
10721050return false ;
10731051}
10741052}
1075- var valid7 = _errs75 === errors ;
1053+ var valid7 = _errs72 === errors ;
10761054if ( ! valid7 ) {
10771055break ;
10781056}
@@ -1083,7 +1061,7 @@ validate10.errors = [{instancePath:instancePath+"/constraints",schemaPath:"#/pro
10831061return false ;
10841062}
10851063}
1086- var valid0 = _errs72 === errors ;
1064+ var valid0 = _errs69 === errors ;
10871065}
10881066else {
10891067var valid0 = true ;
@@ -1112,7 +1090,6 @@ var valid0 = true;
11121090}
11131091}
11141092}
1115- }
11161093else {
11171094validate10 . errors = [ { instancePath, schemaPath :"#/type" , keyword :"type" , params :{ type : "object" } , message :"must be object" } ] ;
11181095return false ;
0 commit comments