fastify 4.0.0-rc.3 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +2 -1
  2. package/build/build-validation.js +14 -2
  3. package/docs/Guides/Ecosystem.md +23 -11
  4. package/docs/Guides/Index.md +1 -1
  5. package/docs/Guides/Migration-Guide-V3.md +1 -1
  6. package/docs/Guides/Plugins-Guide.md +3 -3
  7. package/docs/Guides/Prototype-Poisoning.md +1 -1
  8. package/docs/Guides/Recommendations.md +2 -2
  9. package/docs/Guides/Serverless.md +5 -5
  10. package/docs/Guides/Testing.md +3 -1
  11. package/docs/Guides/Write-Plugin.md +3 -3
  12. package/docs/Migration-Guide-V4.md +1 -1
  13. package/docs/Reference/Logging.md +10 -5
  14. package/docs/Reference/Middleware.md +3 -3
  15. package/docs/Reference/Routes.md +2 -2
  16. package/docs/Reference/Server.md +59 -10
  17. package/docs/Reference/TypeScript.md +2 -2
  18. package/docs/Reference/Validation-and-Serialization.md +11 -1
  19. package/fastify.d.ts +2 -1
  20. package/fastify.js +38 -14
  21. package/lib/configValidator.js +456 -332
  22. package/lib/errors.js +4 -0
  23. package/lib/request.js +2 -2
  24. package/lib/route.js +5 -2
  25. package/lib/schemas.js +3 -0
  26. package/lib/validation.js +8 -2
  27. package/package.json +34 -34
  28. package/test/close-pipelining.test.js +4 -2
  29. package/test/close.test.js +93 -3
  30. package/test/custom-http-server.test.js +22 -0
  31. package/test/decorator.test.js +146 -0
  32. package/test/internals/initialConfig.test.js +5 -3
  33. package/test/output-validation.test.js +6 -2
  34. package/test/plugin.test.js +177 -14
  35. package/test/route-prefix.test.js +250 -0
  36. package/test/router-options.test.js +61 -0
  37. package/test/schema-feature.test.js +24 -0
  38. package/test/schema-serialization.test.js +57 -0
  39. package/test/types/fastify.test-d.ts +1 -0
  40. package/test/types/instance.test-d.ts +1 -0
  41. package/test/types/logger.test-d.ts +13 -1
  42. package/test/types/route.test-d.ts +14 -0
  43. package/test/types/type-provider.test-d.ts +6 -0
  44. package/types/instance.d.ts +1 -0
  45. package/types/logger.d.ts +3 -1
  46. package/types/route.d.ts +1 -1
  47. package/types/schema.d.ts +1 -1
  48. package/types/type-provider.d.ts +3 -4
@@ -3,8 +3,9 @@
3
3
  "use strict";
4
4
  module.exports = validate10;
5
5
  module.exports.default = validate10;
6
- const schema11 = {"type":"object","additionalProperties":false,"properties":{"connectionTimeout":{"type":"integer","default":0},"keepAliveTimeout":{"type":"integer","default":72000},"forceCloseConnections":{"type":"boolean","default":false},"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},"disableRequestLogging":{"type":"boolean","default":false},"jsonShorthand":{"type":"boolean","default":true},"maxParamLength":{"type":"integer","default":100},"onProtoPoisoning":{"type":"string","default":"error"},"onConstructorPoisoning":{"type":"string","default":"error"},"pluginTimeout":{"type":"integer","default":10000},"requestIdHeader":{"type":"string","default":"request-id"},"requestIdLogLabel":{"type":"string","default":"reqId"},"http2SessionTimeout":{"type":"integer","default":72000},"exposeHeadRoutes":{"type":"boolean","default":true},"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},"jsonShorthand":{"type":"boolean","default":true},"maxParamLength":{"type":"integer","default":100},"onProtoPoisoning":{"type":"string","default":"error"},"onConstructorPoisoning":{"type":"string","default":"error"},"pluginTimeout":{"type":"integer","default":10000},"requestIdHeader":{"type":"string","default":"request-id"},"requestIdLogLabel":{"type":"string","default":"reqId"},"http2SessionTimeout":{"type":"integer","default":72000},"exposeHeadRoutes":{"type":"boolean","default":true},"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":{}}}}}};
7
7
  const func2 = Object.prototype.hasOwnProperty;
8
+ const pattern0 = new RegExp("idle", "u");
8
9
 
9
10
  function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
10
11
  let vErrors = null;
@@ -17,9 +18,6 @@ data.connectionTimeout = 0;
17
18
  if(data.keepAliveTimeout === undefined){
18
19
  data.keepAliveTimeout = 72000;
19
20
  }
20
- if(data.forceCloseConnections === undefined){
21
- data.forceCloseConnections = false;
22
- }
23
21
  if(data.maxRequestsPerSocket === undefined){
24
22
  data.maxRequestsPerSocket = 0;
25
23
  }
@@ -38,6 +36,9 @@ data.allowUnsafeRegex = false;
38
36
  if(data.ignoreTrailingSlash === undefined){
39
37
  data.ignoreTrailingSlash = false;
40
38
  }
39
+ if(data.ignoreDuplicateSlashes === undefined){
40
+ data.ignoreDuplicateSlashes = false;
41
+ }
41
42
  if(data.disableRequestLogging === undefined){
42
43
  data.disableRequestLogging = false;
43
44
  }
@@ -123,20 +124,32 @@ data["keepAliveTimeout"] = coerced1;
123
124
  }
124
125
  var valid0 = _errs4 === errors;
125
126
  if(valid0){
127
+ if(data.forceCloseConnections !== undefined){
126
128
  let data2 = data.forceCloseConnections;
127
129
  const _errs6 = errors;
128
- if(typeof data2 !== "boolean"){
130
+ const _errs7 = errors;
131
+ let valid1 = false;
132
+ let passing0 = null;
133
+ const _errs8 = errors;
134
+ if(typeof data2 !== "string"){
135
+ let dataType2 = typeof data2;
129
136
  let coerced2 = undefined;
130
137
  if(!(coerced2 !== undefined)){
131
- if(data2 === "false" || data2 === 0 || data2 === null){
132
- coerced2 = false;
138
+ if(dataType2 == "number" || dataType2 == "boolean"){
139
+ coerced2 = "" + data2;
133
140
  }
134
- else if(data2 === "true" || data2 === 1){
135
- coerced2 = true;
141
+ else if(data2 === null){
142
+ coerced2 = "";
136
143
  }
137
144
  else {
138
- validate10.errors = [{instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
139
- return false;
145
+ const err0 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};
146
+ if(vErrors === null){
147
+ vErrors = [err0];
148
+ }
149
+ else {
150
+ vErrors.push(err0);
151
+ }
152
+ errors++;
140
153
  }
141
154
  }
142
155
  if(coerced2 !== undefined){
@@ -146,158 +159,243 @@ data["forceCloseConnections"] = coerced2;
146
159
  }
147
160
  }
148
161
  }
162
+ if(errors === _errs8){
163
+ if(typeof data2 === "string"){
164
+ if(!pattern0.test(data2)){
165
+ const err1 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/0/pattern",keyword:"pattern",params:{pattern: "idle"},message:"must match pattern \""+"idle"+"\""};
166
+ if(vErrors === null){
167
+ vErrors = [err1];
168
+ }
169
+ else {
170
+ vErrors.push(err1);
171
+ }
172
+ errors++;
173
+ }
174
+ }
175
+ }
176
+ var _valid0 = _errs8 === errors;
177
+ if(_valid0){
178
+ valid1 = true;
179
+ passing0 = 0;
180
+ }
181
+ const _errs10 = errors;
182
+ if(typeof data2 !== "boolean"){
183
+ let coerced3 = undefined;
184
+ if(!(coerced3 !== undefined)){
185
+ if(data2 === "false" || data2 === 0 || data2 === null){
186
+ coerced3 = false;
187
+ }
188
+ else if(data2 === "true" || data2 === 1){
189
+ coerced3 = true;
190
+ }
191
+ else {
192
+ const err2 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
193
+ if(vErrors === null){
194
+ vErrors = [err2];
195
+ }
196
+ else {
197
+ vErrors.push(err2);
198
+ }
199
+ errors++;
200
+ }
201
+ }
202
+ if(coerced3 !== undefined){
203
+ data2 = coerced3;
204
+ if(data !== undefined){
205
+ data["forceCloseConnections"] = coerced3;
206
+ }
207
+ }
208
+ }
209
+ var _valid0 = _errs10 === errors;
210
+ if(_valid0 && valid1){
211
+ valid1 = false;
212
+ passing0 = [passing0, 1];
213
+ }
214
+ else {
215
+ if(_valid0){
216
+ valid1 = true;
217
+ passing0 = 1;
218
+ }
219
+ }
220
+ if(!valid1){
221
+ const err3 = {instancePath:instancePath+"/forceCloseConnections",schemaPath:"#/properties/forceCloseConnections/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};
222
+ if(vErrors === null){
223
+ vErrors = [err3];
224
+ }
225
+ else {
226
+ vErrors.push(err3);
227
+ }
228
+ errors++;
229
+ validate10.errors = vErrors;
230
+ return false;
231
+ }
232
+ else {
233
+ errors = _errs7;
234
+ if(vErrors !== null){
235
+ if(_errs7){
236
+ vErrors.length = _errs7;
237
+ }
238
+ else {
239
+ vErrors = null;
240
+ }
241
+ }
242
+ }
149
243
  var valid0 = _errs6 === errors;
244
+ }
245
+ else {
246
+ var valid0 = true;
247
+ }
150
248
  if(valid0){
151
249
  let data3 = data.maxRequestsPerSocket;
152
- const _errs8 = errors;
250
+ const _errs12 = errors;
153
251
  if((!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) && (data3 !== null)){
154
- let dataType3 = typeof data3;
155
- let coerced3 = undefined;
156
- if(!(coerced3 !== undefined)){
157
- if(dataType3 === "boolean" || data3 === null
158
- || (dataType3 === "string" && data3 && data3 == +data3 && !(data3 % 1))){
159
- coerced3 = +data3;
252
+ let dataType4 = typeof data3;
253
+ let coerced4 = undefined;
254
+ if(!(coerced4 !== undefined)){
255
+ if(dataType4 === "boolean" || data3 === null
256
+ || (dataType4 === "string" && data3 && data3 == +data3 && !(data3 % 1))){
257
+ coerced4 = +data3;
160
258
  }
161
259
  else if(data3 === "" || data3 === 0 || data3 === false){
162
- coerced3 = null;
260
+ coerced4 = null;
163
261
  }
164
262
  else {
165
263
  validate10.errors = [{instancePath:instancePath+"/maxRequestsPerSocket",schemaPath:"#/properties/maxRequestsPerSocket/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
166
264
  return false;
167
265
  }
168
266
  }
169
- if(coerced3 !== undefined){
170
- data3 = coerced3;
267
+ if(coerced4 !== undefined){
268
+ data3 = coerced4;
171
269
  if(data !== undefined){
172
- data["maxRequestsPerSocket"] = coerced3;
270
+ data["maxRequestsPerSocket"] = coerced4;
173
271
  }
174
272
  }
175
273
  }
176
- var valid0 = _errs8 === errors;
274
+ var valid0 = _errs12 === errors;
177
275
  if(valid0){
178
276
  let data4 = data.requestTimeout;
179
- const _errs11 = errors;
277
+ const _errs15 = errors;
180
278
  if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){
181
- let dataType4 = typeof data4;
182
- let coerced4 = undefined;
183
- if(!(coerced4 !== undefined)){
184
- if(dataType4 === "boolean" || data4 === null
185
- || (dataType4 === "string" && data4 && data4 == +data4 && !(data4 % 1))){
186
- coerced4 = +data4;
279
+ let dataType5 = typeof data4;
280
+ let coerced5 = undefined;
281
+ if(!(coerced5 !== undefined)){
282
+ if(dataType5 === "boolean" || data4 === null
283
+ || (dataType5 === "string" && data4 && data4 == +data4 && !(data4 % 1))){
284
+ coerced5 = +data4;
187
285
  }
188
286
  else {
189
287
  validate10.errors = [{instancePath:instancePath+"/requestTimeout",schemaPath:"#/properties/requestTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
190
288
  return false;
191
289
  }
192
290
  }
193
- if(coerced4 !== undefined){
194
- data4 = coerced4;
291
+ if(coerced5 !== undefined){
292
+ data4 = coerced5;
195
293
  if(data !== undefined){
196
- data["requestTimeout"] = coerced4;
294
+ data["requestTimeout"] = coerced5;
197
295
  }
198
296
  }
199
297
  }
200
- var valid0 = _errs11 === errors;
298
+ var valid0 = _errs15 === errors;
201
299
  if(valid0){
202
300
  let data5 = data.bodyLimit;
203
- const _errs13 = errors;
301
+ const _errs17 = errors;
204
302
  if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){
205
- let dataType5 = typeof data5;
206
- let coerced5 = undefined;
207
- if(!(coerced5 !== undefined)){
208
- if(dataType5 === "boolean" || data5 === null
209
- || (dataType5 === "string" && data5 && data5 == +data5 && !(data5 % 1))){
210
- coerced5 = +data5;
303
+ let dataType6 = typeof data5;
304
+ let coerced6 = undefined;
305
+ if(!(coerced6 !== undefined)){
306
+ if(dataType6 === "boolean" || data5 === null
307
+ || (dataType6 === "string" && data5 && data5 == +data5 && !(data5 % 1))){
308
+ coerced6 = +data5;
211
309
  }
212
310
  else {
213
311
  validate10.errors = [{instancePath:instancePath+"/bodyLimit",schemaPath:"#/properties/bodyLimit/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
214
312
  return false;
215
313
  }
216
314
  }
217
- if(coerced5 !== undefined){
218
- data5 = coerced5;
315
+ if(coerced6 !== undefined){
316
+ data5 = coerced6;
219
317
  if(data !== undefined){
220
- data["bodyLimit"] = coerced5;
318
+ data["bodyLimit"] = coerced6;
221
319
  }
222
320
  }
223
321
  }
224
- var valid0 = _errs13 === errors;
322
+ var valid0 = _errs17 === errors;
225
323
  if(valid0){
226
324
  let data6 = data.caseSensitive;
227
- const _errs15 = errors;
325
+ const _errs19 = errors;
228
326
  if(typeof data6 !== "boolean"){
229
- let coerced6 = undefined;
230
- if(!(coerced6 !== undefined)){
327
+ let coerced7 = undefined;
328
+ if(!(coerced7 !== undefined)){
231
329
  if(data6 === "false" || data6 === 0 || data6 === null){
232
- coerced6 = false;
330
+ coerced7 = false;
233
331
  }
234
332
  else if(data6 === "true" || data6 === 1){
235
- coerced6 = true;
333
+ coerced7 = true;
236
334
  }
237
335
  else {
238
336
  validate10.errors = [{instancePath:instancePath+"/caseSensitive",schemaPath:"#/properties/caseSensitive/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
239
337
  return false;
240
338
  }
241
339
  }
242
- if(coerced6 !== undefined){
243
- data6 = coerced6;
340
+ if(coerced7 !== undefined){
341
+ data6 = coerced7;
244
342
  if(data !== undefined){
245
- data["caseSensitive"] = coerced6;
343
+ data["caseSensitive"] = coerced7;
246
344
  }
247
345
  }
248
346
  }
249
- var valid0 = _errs15 === errors;
347
+ var valid0 = _errs19 === errors;
250
348
  if(valid0){
251
349
  let data7 = data.allowUnsafeRegex;
252
- const _errs17 = errors;
350
+ const _errs21 = errors;
253
351
  if(typeof data7 !== "boolean"){
254
- let coerced7 = undefined;
255
- if(!(coerced7 !== undefined)){
352
+ let coerced8 = undefined;
353
+ if(!(coerced8 !== undefined)){
256
354
  if(data7 === "false" || data7 === 0 || data7 === null){
257
- coerced7 = false;
355
+ coerced8 = false;
258
356
  }
259
357
  else if(data7 === "true" || data7 === 1){
260
- coerced7 = true;
358
+ coerced8 = true;
261
359
  }
262
360
  else {
263
361
  validate10.errors = [{instancePath:instancePath+"/allowUnsafeRegex",schemaPath:"#/properties/allowUnsafeRegex/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
264
362
  return false;
265
363
  }
266
364
  }
267
- if(coerced7 !== undefined){
268
- data7 = coerced7;
365
+ if(coerced8 !== undefined){
366
+ data7 = coerced8;
269
367
  if(data !== undefined){
270
- data["allowUnsafeRegex"] = coerced7;
368
+ data["allowUnsafeRegex"] = coerced8;
271
369
  }
272
370
  }
273
371
  }
274
- var valid0 = _errs17 === errors;
372
+ var valid0 = _errs21 === errors;
275
373
  if(valid0){
276
374
  if(data.http2 !== undefined){
277
375
  let data8 = data.http2;
278
- const _errs19 = errors;
376
+ const _errs23 = errors;
279
377
  if(typeof data8 !== "boolean"){
280
- let coerced8 = undefined;
281
- if(!(coerced8 !== undefined)){
378
+ let coerced9 = undefined;
379
+ if(!(coerced9 !== undefined)){
282
380
  if(data8 === "false" || data8 === 0 || data8 === null){
283
- coerced8 = false;
381
+ coerced9 = false;
284
382
  }
285
383
  else if(data8 === "true" || data8 === 1){
286
- coerced8 = true;
384
+ coerced9 = true;
287
385
  }
288
386
  else {
289
387
  validate10.errors = [{instancePath:instancePath+"/http2",schemaPath:"#/properties/http2/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
290
388
  return false;
291
389
  }
292
390
  }
293
- if(coerced8 !== undefined){
294
- data8 = coerced8;
391
+ if(coerced9 !== undefined){
392
+ data8 = coerced9;
295
393
  if(data !== undefined){
296
- data["http2"] = coerced8;
394
+ data["http2"] = coerced9;
297
395
  }
298
396
  }
299
397
  }
300
- var valid0 = _errs19 === errors;
398
+ var valid0 = _errs23 === errors;
301
399
  }
302
400
  else {
303
401
  var valid0 = true;
@@ -305,131 +403,131 @@ var valid0 = true;
305
403
  if(valid0){
306
404
  if(data.https !== undefined){
307
405
  let data9 = data.https;
308
- const _errs21 = errors;
309
- const _errs22 = errors;
310
- let valid1 = true;
311
- const _errs23 = errors;
312
- const _errs24 = errors;
313
406
  const _errs25 = errors;
314
407
  const _errs26 = errors;
315
- let valid3 = false;
316
- let passing0 = null;
408
+ let valid2 = true;
317
409
  const _errs27 = errors;
410
+ const _errs28 = errors;
411
+ const _errs29 = errors;
412
+ const _errs30 = errors;
413
+ let valid4 = false;
414
+ let passing1 = null;
415
+ const _errs31 = errors;
318
416
  if(typeof data9 !== "boolean"){
319
- let coerced9 = undefined;
320
- if(!(coerced9 !== undefined)){
417
+ let coerced10 = undefined;
418
+ if(!(coerced10 !== undefined)){
321
419
  if(data9 === "false" || data9 === 0 || data9 === null){
322
- coerced9 = false;
420
+ coerced10 = false;
323
421
  }
324
422
  else if(data9 === "true" || data9 === 1){
325
- coerced9 = true;
423
+ coerced10 = true;
326
424
  }
327
425
  else {
328
- const err0 = {};
426
+ const err4 = {};
329
427
  if(vErrors === null){
330
- vErrors = [err0];
428
+ vErrors = [err4];
331
429
  }
332
430
  else {
333
- vErrors.push(err0);
431
+ vErrors.push(err4);
334
432
  }
335
433
  errors++;
336
434
  }
337
435
  }
338
- if(coerced9 !== undefined){
339
- data9 = coerced9;
436
+ if(coerced10 !== undefined){
437
+ data9 = coerced10;
340
438
  if(data !== undefined){
341
- data["https"] = coerced9;
439
+ data["https"] = coerced10;
342
440
  }
343
441
  }
344
442
  }
345
- var _valid1 = _errs27 === errors;
346
- if(_valid1){
347
- valid3 = true;
348
- passing0 = 0;
443
+ var _valid2 = _errs31 === errors;
444
+ if(_valid2){
445
+ valid4 = true;
446
+ passing1 = 0;
349
447
  }
350
- const _errs29 = errors;
448
+ const _errs33 = errors;
351
449
  if(data9 !== null){
352
- let coerced10 = undefined;
353
- if(!(coerced10 !== undefined)){
450
+ let coerced11 = undefined;
451
+ if(!(coerced11 !== undefined)){
354
452
  if(data9 === "" || data9 === 0 || data9 === false){
355
- coerced10 = null;
453
+ coerced11 = null;
356
454
  }
357
455
  else {
358
- const err1 = {};
456
+ const err5 = {};
359
457
  if(vErrors === null){
360
- vErrors = [err1];
458
+ vErrors = [err5];
361
459
  }
362
460
  else {
363
- vErrors.push(err1);
461
+ vErrors.push(err5);
364
462
  }
365
463
  errors++;
366
464
  }
367
465
  }
368
- if(coerced10 !== undefined){
369
- data9 = coerced10;
466
+ if(coerced11 !== undefined){
467
+ data9 = coerced11;
370
468
  if(data !== undefined){
371
- data["https"] = coerced10;
469
+ data["https"] = coerced11;
372
470
  }
373
471
  }
374
472
  }
375
- var _valid1 = _errs29 === errors;
376
- if(_valid1 && valid3){
377
- valid3 = false;
378
- passing0 = [passing0, 1];
473
+ var _valid2 = _errs33 === errors;
474
+ if(_valid2 && valid4){
475
+ valid4 = false;
476
+ passing1 = [passing1, 1];
379
477
  }
380
478
  else {
381
- if(_valid1){
382
- valid3 = true;
383
- passing0 = 1;
479
+ if(_valid2){
480
+ valid4 = true;
481
+ passing1 = 1;
384
482
  }
385
- const _errs31 = errors;
386
- if(errors === _errs31){
483
+ const _errs35 = errors;
484
+ if(errors === _errs35){
387
485
  if(data9 && typeof data9 == "object" && !Array.isArray(data9)){
388
486
  let missing0;
389
487
  if((data9.allowHTTP1 === undefined) && (missing0 = "allowHTTP1")){
390
- const err2 = {};
488
+ const err6 = {};
391
489
  if(vErrors === null){
392
- vErrors = [err2];
490
+ vErrors = [err6];
393
491
  }
394
492
  else {
395
- vErrors.push(err2);
493
+ vErrors.push(err6);
396
494
  }
397
495
  errors++;
398
496
  }
399
497
  else {
400
- const _errs33 = errors;
498
+ const _errs37 = errors;
401
499
  for(const key1 in data9){
402
500
  if(!(key1 === "allowHTTP1")){
403
501
  delete data9[key1];
404
502
  }
405
503
  }
406
- if(_errs33 === errors){
504
+ if(_errs37 === errors){
407
505
  if(data9.allowHTTP1 !== undefined){
408
506
  let data10 = data9.allowHTTP1;
409
507
  if(typeof data10 !== "boolean"){
410
- let coerced11 = undefined;
411
- if(!(coerced11 !== undefined)){
508
+ let coerced12 = undefined;
509
+ if(!(coerced12 !== undefined)){
412
510
  if(data10 === "false" || data10 === 0 || data10 === null){
413
- coerced11 = false;
511
+ coerced12 = false;
414
512
  }
415
513
  else if(data10 === "true" || data10 === 1){
416
- coerced11 = true;
514
+ coerced12 = true;
417
515
  }
418
516
  else {
419
- const err3 = {};
517
+ const err7 = {};
420
518
  if(vErrors === null){
421
- vErrors = [err3];
519
+ vErrors = [err7];
422
520
  }
423
521
  else {
424
- vErrors.push(err3);
522
+ vErrors.push(err7);
425
523
  }
426
524
  errors++;
427
525
  }
428
526
  }
429
- if(coerced11 !== undefined){
430
- data10 = coerced11;
527
+ if(coerced12 !== undefined){
528
+ data10 = coerced12;
431
529
  if(data9 !== undefined){
432
- data9["allowHTTP1"] = coerced11;
530
+ data9["allowHTTP1"] = coerced12;
433
531
  }
434
532
  }
435
533
  }
@@ -438,388 +536,413 @@ data9["allowHTTP1"] = coerced11;
438
536
  }
439
537
  }
440
538
  else {
441
- const err4 = {};
539
+ const err8 = {};
442
540
  if(vErrors === null){
443
- vErrors = [err4];
541
+ vErrors = [err8];
444
542
  }
445
543
  else {
446
- vErrors.push(err4);
544
+ vErrors.push(err8);
447
545
  }
448
546
  errors++;
449
547
  }
450
548
  }
451
- var _valid1 = _errs31 === errors;
452
- if(_valid1 && valid3){
453
- valid3 = false;
454
- passing0 = [passing0, 2];
549
+ var _valid2 = _errs35 === errors;
550
+ if(_valid2 && valid4){
551
+ valid4 = false;
552
+ passing1 = [passing1, 2];
455
553
  }
456
554
  else {
457
- if(_valid1){
458
- valid3 = true;
459
- passing0 = 2;
555
+ if(_valid2){
556
+ valid4 = true;
557
+ passing1 = 2;
460
558
  }
461
559
  }
462
560
  }
463
- if(!valid3){
464
- const err5 = {};
561
+ if(!valid4){
562
+ const err9 = {};
465
563
  if(vErrors === null){
466
- vErrors = [err5];
564
+ vErrors = [err9];
467
565
  }
468
566
  else {
469
- vErrors.push(err5);
567
+ vErrors.push(err9);
470
568
  }
471
569
  errors++;
472
570
  }
473
571
  else {
474
- errors = _errs26;
572
+ errors = _errs30;
475
573
  if(vErrors !== null){
476
- if(_errs26){
477
- vErrors.length = _errs26;
574
+ if(_errs30){
575
+ vErrors.length = _errs30;
478
576
  }
479
577
  else {
480
578
  vErrors = null;
481
579
  }
482
580
  }
483
581
  }
484
- var valid2 = _errs25 === errors;
485
- if(valid2){
486
- const err6 = {};
582
+ var valid3 = _errs29 === errors;
583
+ if(valid3){
584
+ const err10 = {};
487
585
  if(vErrors === null){
488
- vErrors = [err6];
586
+ vErrors = [err10];
489
587
  }
490
588
  else {
491
- vErrors.push(err6);
589
+ vErrors.push(err10);
492
590
  }
493
591
  errors++;
494
592
  }
495
593
  else {
496
- errors = _errs24;
594
+ errors = _errs28;
497
595
  if(vErrors !== null){
498
- if(_errs24){
499
- vErrors.length = _errs24;
596
+ if(_errs28){
597
+ vErrors.length = _errs28;
500
598
  }
501
599
  else {
502
600
  vErrors = null;
503
601
  }
504
602
  }
505
603
  }
506
- var _valid0 = _errs23 === errors;
507
- errors = _errs22;
604
+ var _valid1 = _errs27 === errors;
605
+ errors = _errs26;
508
606
  if(vErrors !== null){
509
- if(_errs22){
510
- vErrors.length = _errs22;
607
+ if(_errs26){
608
+ vErrors.length = _errs26;
511
609
  }
512
610
  else {
513
611
  vErrors = null;
514
612
  }
515
613
  }
516
- if(_valid0){
517
- const _errs36 = errors;
614
+ if(_valid1){
615
+ const _errs40 = errors;
518
616
  data["https"] = true;
519
- var _valid0 = _errs36 === errors;
520
- valid1 = _valid0;
617
+ var _valid1 = _errs40 === errors;
618
+ valid2 = _valid1;
521
619
  }
522
- if(!valid1){
523
- const err7 = {instancePath:instancePath+"/https",schemaPath:"#/properties/https/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
620
+ if(!valid2){
621
+ const err11 = {instancePath:instancePath+"/https",schemaPath:"#/properties/https/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};
524
622
  if(vErrors === null){
525
- vErrors = [err7];
623
+ vErrors = [err11];
526
624
  }
527
625
  else {
528
- vErrors.push(err7);
626
+ vErrors.push(err11);
529
627
  }
530
628
  errors++;
531
629
  validate10.errors = vErrors;
532
630
  return false;
533
631
  }
534
- var valid0 = _errs21 === errors;
632
+ var valid0 = _errs25 === errors;
535
633
  }
536
634
  else {
537
635
  var valid0 = true;
538
636
  }
539
637
  if(valid0){
540
638
  let data11 = data.ignoreTrailingSlash;
541
- const _errs37 = errors;
639
+ const _errs41 = errors;
542
640
  if(typeof data11 !== "boolean"){
543
- let coerced12 = undefined;
544
- if(!(coerced12 !== undefined)){
545
- if(data11 === "false" || data11 === 0 || data11 === null){
546
- coerced12 = false;
547
- }
548
- else if(data11 === "true" || data11 === 1){
549
- coerced12 = true;
550
- }
551
- else {
552
- validate10.errors = [{instancePath:instancePath+"/ignoreTrailingSlash",schemaPath:"#/properties/ignoreTrailingSlash/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
553
- return false;
554
- }
555
- }
556
- if(coerced12 !== undefined){
557
- data11 = coerced12;
558
- if(data !== undefined){
559
- data["ignoreTrailingSlash"] = coerced12;
560
- }
561
- }
562
- }
563
- var valid0 = _errs37 === errors;
564
- if(valid0){
565
- let data12 = data.disableRequestLogging;
566
- const _errs39 = errors;
567
- if(typeof data12 !== "boolean"){
568
641
  let coerced13 = undefined;
569
642
  if(!(coerced13 !== undefined)){
570
- if(data12 === "false" || data12 === 0 || data12 === null){
643
+ if(data11 === "false" || data11 === 0 || data11 === null){
571
644
  coerced13 = false;
572
645
  }
573
- else if(data12 === "true" || data12 === 1){
646
+ else if(data11 === "true" || data11 === 1){
574
647
  coerced13 = true;
575
648
  }
576
649
  else {
577
- validate10.errors = [{instancePath:instancePath+"/disableRequestLogging",schemaPath:"#/properties/disableRequestLogging/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
650
+ validate10.errors = [{instancePath:instancePath+"/ignoreTrailingSlash",schemaPath:"#/properties/ignoreTrailingSlash/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
578
651
  return false;
579
652
  }
580
653
  }
581
654
  if(coerced13 !== undefined){
582
- data12 = coerced13;
655
+ data11 = coerced13;
583
656
  if(data !== undefined){
584
- data["disableRequestLogging"] = coerced13;
657
+ data["ignoreTrailingSlash"] = coerced13;
585
658
  }
586
659
  }
587
660
  }
588
- var valid0 = _errs39 === errors;
661
+ var valid0 = _errs41 === errors;
589
662
  if(valid0){
590
- let data13 = data.jsonShorthand;
591
- const _errs41 = errors;
592
- if(typeof data13 !== "boolean"){
663
+ let data12 = data.ignoreDuplicateSlashes;
664
+ const _errs43 = errors;
665
+ if(typeof data12 !== "boolean"){
593
666
  let coerced14 = undefined;
594
667
  if(!(coerced14 !== undefined)){
595
- if(data13 === "false" || data13 === 0 || data13 === null){
668
+ if(data12 === "false" || data12 === 0 || data12 === null){
596
669
  coerced14 = false;
597
670
  }
598
- else if(data13 === "true" || data13 === 1){
671
+ else if(data12 === "true" || data12 === 1){
599
672
  coerced14 = true;
600
673
  }
601
674
  else {
602
- validate10.errors = [{instancePath:instancePath+"/jsonShorthand",schemaPath:"#/properties/jsonShorthand/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
675
+ validate10.errors = [{instancePath:instancePath+"/ignoreDuplicateSlashes",schemaPath:"#/properties/ignoreDuplicateSlashes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
603
676
  return false;
604
677
  }
605
678
  }
606
679
  if(coerced14 !== undefined){
607
- data13 = coerced14;
680
+ data12 = coerced14;
608
681
  if(data !== undefined){
609
- data["jsonShorthand"] = coerced14;
682
+ data["ignoreDuplicateSlashes"] = coerced14;
610
683
  }
611
684
  }
612
685
  }
613
- var valid0 = _errs41 === errors;
686
+ var valid0 = _errs43 === errors;
614
687
  if(valid0){
615
- let data14 = data.maxParamLength;
616
- const _errs43 = errors;
617
- if(!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))){
618
- let dataType15 = typeof data14;
688
+ let data13 = data.disableRequestLogging;
689
+ const _errs45 = errors;
690
+ if(typeof data13 !== "boolean"){
619
691
  let coerced15 = undefined;
620
692
  if(!(coerced15 !== undefined)){
621
- if(dataType15 === "boolean" || data14 === null
622
- || (dataType15 === "string" && data14 && data14 == +data14 && !(data14 % 1))){
623
- coerced15 = +data14;
693
+ if(data13 === "false" || data13 === 0 || data13 === null){
694
+ coerced15 = false;
695
+ }
696
+ else if(data13 === "true" || data13 === 1){
697
+ coerced15 = true;
624
698
  }
625
699
  else {
626
- validate10.errors = [{instancePath:instancePath+"/maxParamLength",schemaPath:"#/properties/maxParamLength/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
700
+ validate10.errors = [{instancePath:instancePath+"/disableRequestLogging",schemaPath:"#/properties/disableRequestLogging/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
627
701
  return false;
628
702
  }
629
703
  }
630
704
  if(coerced15 !== undefined){
631
- data14 = coerced15;
705
+ data13 = coerced15;
632
706
  if(data !== undefined){
633
- data["maxParamLength"] = coerced15;
707
+ data["disableRequestLogging"] = coerced15;
634
708
  }
635
709
  }
636
710
  }
637
- var valid0 = _errs43 === errors;
711
+ var valid0 = _errs45 === errors;
638
712
  if(valid0){
639
- let data15 = data.onProtoPoisoning;
640
- const _errs45 = errors;
641
- if(typeof data15 !== "string"){
642
- let dataType16 = typeof data15;
713
+ let data14 = data.jsonShorthand;
714
+ const _errs47 = errors;
715
+ if(typeof data14 !== "boolean"){
643
716
  let coerced16 = undefined;
644
717
  if(!(coerced16 !== undefined)){
645
- if(dataType16 == "number" || dataType16 == "boolean"){
646
- coerced16 = "" + data15;
718
+ if(data14 === "false" || data14 === 0 || data14 === null){
719
+ coerced16 = false;
647
720
  }
648
- else if(data15 === null){
649
- coerced16 = "";
721
+ else if(data14 === "true" || data14 === 1){
722
+ coerced16 = true;
650
723
  }
651
724
  else {
652
- validate10.errors = [{instancePath:instancePath+"/onProtoPoisoning",schemaPath:"#/properties/onProtoPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
725
+ validate10.errors = [{instancePath:instancePath+"/jsonShorthand",schemaPath:"#/properties/jsonShorthand/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
653
726
  return false;
654
727
  }
655
728
  }
656
729
  if(coerced16 !== undefined){
657
- data15 = coerced16;
730
+ data14 = coerced16;
658
731
  if(data !== undefined){
659
- data["onProtoPoisoning"] = coerced16;
732
+ data["jsonShorthand"] = coerced16;
660
733
  }
661
734
  }
662
735
  }
663
- var valid0 = _errs45 === errors;
736
+ var valid0 = _errs47 === errors;
664
737
  if(valid0){
665
- let data16 = data.onConstructorPoisoning;
666
- const _errs47 = errors;
667
- if(typeof data16 !== "string"){
668
- let dataType17 = typeof data16;
738
+ let data15 = data.maxParamLength;
739
+ const _errs49 = errors;
740
+ if(!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))){
741
+ let dataType17 = typeof data15;
669
742
  let coerced17 = undefined;
670
743
  if(!(coerced17 !== undefined)){
671
- if(dataType17 == "number" || dataType17 == "boolean"){
672
- coerced17 = "" + data16;
673
- }
674
- else if(data16 === null){
675
- coerced17 = "";
744
+ if(dataType17 === "boolean" || data15 === null
745
+ || (dataType17 === "string" && data15 && data15 == +data15 && !(data15 % 1))){
746
+ coerced17 = +data15;
676
747
  }
677
748
  else {
678
- validate10.errors = [{instancePath:instancePath+"/onConstructorPoisoning",schemaPath:"#/properties/onConstructorPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
749
+ validate10.errors = [{instancePath:instancePath+"/maxParamLength",schemaPath:"#/properties/maxParamLength/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
679
750
  return false;
680
751
  }
681
752
  }
682
753
  if(coerced17 !== undefined){
683
- data16 = coerced17;
754
+ data15 = coerced17;
684
755
  if(data !== undefined){
685
- data["onConstructorPoisoning"] = coerced17;
756
+ data["maxParamLength"] = coerced17;
686
757
  }
687
758
  }
688
759
  }
689
- var valid0 = _errs47 === errors;
760
+ var valid0 = _errs49 === errors;
690
761
  if(valid0){
691
- let data17 = data.pluginTimeout;
692
- const _errs49 = errors;
693
- if(!(((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17))) && (isFinite(data17)))){
694
- let dataType18 = typeof data17;
762
+ let data16 = data.onProtoPoisoning;
763
+ const _errs51 = errors;
764
+ if(typeof data16 !== "string"){
765
+ let dataType18 = typeof data16;
695
766
  let coerced18 = undefined;
696
767
  if(!(coerced18 !== undefined)){
697
- if(dataType18 === "boolean" || data17 === null
698
- || (dataType18 === "string" && data17 && data17 == +data17 && !(data17 % 1))){
699
- coerced18 = +data17;
768
+ if(dataType18 == "number" || dataType18 == "boolean"){
769
+ coerced18 = "" + data16;
770
+ }
771
+ else if(data16 === null){
772
+ coerced18 = "";
700
773
  }
701
774
  else {
702
- validate10.errors = [{instancePath:instancePath+"/pluginTimeout",schemaPath:"#/properties/pluginTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
775
+ validate10.errors = [{instancePath:instancePath+"/onProtoPoisoning",schemaPath:"#/properties/onProtoPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
703
776
  return false;
704
777
  }
705
778
  }
706
779
  if(coerced18 !== undefined){
707
- data17 = coerced18;
780
+ data16 = coerced18;
708
781
  if(data !== undefined){
709
- data["pluginTimeout"] = coerced18;
782
+ data["onProtoPoisoning"] = coerced18;
710
783
  }
711
784
  }
712
785
  }
713
- var valid0 = _errs49 === errors;
786
+ var valid0 = _errs51 === errors;
714
787
  if(valid0){
715
- let data18 = data.requestIdHeader;
716
- const _errs51 = errors;
717
- if(typeof data18 !== "string"){
718
- let dataType19 = typeof data18;
788
+ let data17 = data.onConstructorPoisoning;
789
+ const _errs53 = errors;
790
+ if(typeof data17 !== "string"){
791
+ let dataType19 = typeof data17;
719
792
  let coerced19 = undefined;
720
793
  if(!(coerced19 !== undefined)){
721
794
  if(dataType19 == "number" || dataType19 == "boolean"){
722
- coerced19 = "" + data18;
795
+ coerced19 = "" + data17;
723
796
  }
724
- else if(data18 === null){
797
+ else if(data17 === null){
725
798
  coerced19 = "";
726
799
  }
727
800
  else {
728
- validate10.errors = [{instancePath:instancePath+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/type",keyword:"type",params:{type: "string"},message:"must be string"}];
801
+ validate10.errors = [{instancePath:instancePath+"/onConstructorPoisoning",schemaPath:"#/properties/onConstructorPoisoning/type",keyword:"type",params:{type: "string"},message:"must be string"}];
729
802
  return false;
730
803
  }
731
804
  }
732
805
  if(coerced19 !== undefined){
733
- data18 = coerced19;
806
+ data17 = coerced19;
734
807
  if(data !== undefined){
735
- data["requestIdHeader"] = coerced19;
808
+ data["onConstructorPoisoning"] = coerced19;
736
809
  }
737
810
  }
738
811
  }
739
- var valid0 = _errs51 === errors;
812
+ var valid0 = _errs53 === errors;
740
813
  if(valid0){
741
- let data19 = data.requestIdLogLabel;
742
- const _errs53 = errors;
743
- if(typeof data19 !== "string"){
744
- let dataType20 = typeof data19;
814
+ let data18 = data.pluginTimeout;
815
+ const _errs55 = errors;
816
+ if(!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))){
817
+ let dataType20 = typeof data18;
745
818
  let coerced20 = undefined;
746
819
  if(!(coerced20 !== undefined)){
747
- if(dataType20 == "number" || dataType20 == "boolean"){
748
- coerced20 = "" + data19;
749
- }
750
- else if(data19 === null){
751
- coerced20 = "";
820
+ if(dataType20 === "boolean" || data18 === null
821
+ || (dataType20 === "string" && data18 && data18 == +data18 && !(data18 % 1))){
822
+ coerced20 = +data18;
752
823
  }
753
824
  else {
754
- validate10.errors = [{instancePath:instancePath+"/requestIdLogLabel",schemaPath:"#/properties/requestIdLogLabel/type",keyword:"type",params:{type: "string"},message:"must be string"}];
825
+ validate10.errors = [{instancePath:instancePath+"/pluginTimeout",schemaPath:"#/properties/pluginTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
755
826
  return false;
756
827
  }
757
828
  }
758
829
  if(coerced20 !== undefined){
759
- data19 = coerced20;
830
+ data18 = coerced20;
760
831
  if(data !== undefined){
761
- data["requestIdLogLabel"] = coerced20;
832
+ data["pluginTimeout"] = coerced20;
762
833
  }
763
834
  }
764
835
  }
765
- var valid0 = _errs53 === errors;
836
+ var valid0 = _errs55 === errors;
766
837
  if(valid0){
767
- let data20 = data.http2SessionTimeout;
768
- const _errs55 = errors;
769
- if(!(((typeof data20 == "number") && (!(data20 % 1) && !isNaN(data20))) && (isFinite(data20)))){
770
- let dataType21 = typeof data20;
838
+ let data19 = data.requestIdHeader;
839
+ const _errs57 = errors;
840
+ if(typeof data19 !== "string"){
841
+ let dataType21 = typeof data19;
771
842
  let coerced21 = undefined;
772
843
  if(!(coerced21 !== undefined)){
773
- if(dataType21 === "boolean" || data20 === null
774
- || (dataType21 === "string" && data20 && data20 == +data20 && !(data20 % 1))){
775
- coerced21 = +data20;
844
+ if(dataType21 == "number" || dataType21 == "boolean"){
845
+ coerced21 = "" + data19;
846
+ }
847
+ else if(data19 === null){
848
+ coerced21 = "";
776
849
  }
777
850
  else {
778
- validate10.errors = [{instancePath:instancePath+"/http2SessionTimeout",schemaPath:"#/properties/http2SessionTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
851
+ validate10.errors = [{instancePath:instancePath+"/requestIdHeader",schemaPath:"#/properties/requestIdHeader/type",keyword:"type",params:{type: "string"},message:"must be string"}];
779
852
  return false;
780
853
  }
781
854
  }
782
855
  if(coerced21 !== undefined){
783
- data20 = coerced21;
856
+ data19 = coerced21;
784
857
  if(data !== undefined){
785
- data["http2SessionTimeout"] = coerced21;
858
+ data["requestIdHeader"] = coerced21;
786
859
  }
787
860
  }
788
861
  }
789
- var valid0 = _errs55 === errors;
862
+ var valid0 = _errs57 === errors;
790
863
  if(valid0){
791
- let data21 = data.exposeHeadRoutes;
792
- const _errs57 = errors;
793
- if(typeof data21 !== "boolean"){
864
+ let data20 = data.requestIdLogLabel;
865
+ const _errs59 = errors;
866
+ if(typeof data20 !== "string"){
867
+ let dataType22 = typeof data20;
794
868
  let coerced22 = undefined;
795
869
  if(!(coerced22 !== undefined)){
796
- if(data21 === "false" || data21 === 0 || data21 === null){
797
- coerced22 = false;
870
+ if(dataType22 == "number" || dataType22 == "boolean"){
871
+ coerced22 = "" + data20;
798
872
  }
799
- else if(data21 === "true" || data21 === 1){
800
- coerced22 = true;
873
+ else if(data20 === null){
874
+ coerced22 = "";
801
875
  }
802
876
  else {
803
- validate10.errors = [{instancePath:instancePath+"/exposeHeadRoutes",schemaPath:"#/properties/exposeHeadRoutes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
877
+ validate10.errors = [{instancePath:instancePath+"/requestIdLogLabel",schemaPath:"#/properties/requestIdLogLabel/type",keyword:"type",params:{type: "string"},message:"must be string"}];
804
878
  return false;
805
879
  }
806
880
  }
807
881
  if(coerced22 !== undefined){
808
- data21 = coerced22;
882
+ data20 = coerced22;
809
883
  if(data !== undefined){
810
- data["exposeHeadRoutes"] = coerced22;
884
+ data["requestIdLogLabel"] = coerced22;
811
885
  }
812
886
  }
813
887
  }
814
- var valid0 = _errs57 === errors;
888
+ var valid0 = _errs59 === errors;
889
+ if(valid0){
890
+ let data21 = data.http2SessionTimeout;
891
+ const _errs61 = errors;
892
+ if(!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))){
893
+ let dataType23 = typeof data21;
894
+ let coerced23 = undefined;
895
+ if(!(coerced23 !== undefined)){
896
+ if(dataType23 === "boolean" || data21 === null
897
+ || (dataType23 === "string" && data21 && data21 == +data21 && !(data21 % 1))){
898
+ coerced23 = +data21;
899
+ }
900
+ else {
901
+ validate10.errors = [{instancePath:instancePath+"/http2SessionTimeout",schemaPath:"#/properties/http2SessionTimeout/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];
902
+ return false;
903
+ }
904
+ }
905
+ if(coerced23 !== undefined){
906
+ data21 = coerced23;
907
+ if(data !== undefined){
908
+ data["http2SessionTimeout"] = coerced23;
909
+ }
910
+ }
911
+ }
912
+ var valid0 = _errs61 === errors;
913
+ if(valid0){
914
+ let data22 = data.exposeHeadRoutes;
915
+ const _errs63 = errors;
916
+ if(typeof data22 !== "boolean"){
917
+ let coerced24 = undefined;
918
+ if(!(coerced24 !== undefined)){
919
+ if(data22 === "false" || data22 === 0 || data22 === null){
920
+ coerced24 = false;
921
+ }
922
+ else if(data22 === "true" || data22 === 1){
923
+ coerced24 = true;
924
+ }
925
+ else {
926
+ validate10.errors = [{instancePath:instancePath+"/exposeHeadRoutes",schemaPath:"#/properties/exposeHeadRoutes/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];
927
+ return false;
928
+ }
929
+ }
930
+ if(coerced24 !== undefined){
931
+ data22 = coerced24;
932
+ if(data !== undefined){
933
+ data["exposeHeadRoutes"] = coerced24;
934
+ }
935
+ }
936
+ }
937
+ var valid0 = _errs63 === errors;
815
938
  if(valid0){
816
939
  if(data.versioning !== undefined){
817
- let data22 = data.versioning;
818
- const _errs59 = errors;
819
- if(errors === _errs59){
820
- if(data22 && typeof data22 == "object" && !Array.isArray(data22)){
940
+ let data23 = data.versioning;
941
+ const _errs65 = errors;
942
+ if(errors === _errs65){
943
+ if(data23 && typeof data23 == "object" && !Array.isArray(data23)){
821
944
  let missing1;
822
- if(((data22.storage === undefined) && (missing1 = "storage")) || ((data22.deriveVersion === undefined) && (missing1 = "deriveVersion"))){
945
+ if(((data23.storage === undefined) && (missing1 = "storage")) || ((data23.deriveVersion === undefined) && (missing1 = "deriveVersion"))){
823
946
  validate10.errors = [{instancePath:instancePath+"/versioning",schemaPath:"#/properties/versioning/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];
824
947
  return false;
825
948
  }
@@ -829,49 +952,49 @@ validate10.errors = [{instancePath:instancePath+"/versioning",schemaPath:"#/prop
829
952
  return false;
830
953
  }
831
954
  }
832
- var valid0 = _errs59 === errors;
955
+ var valid0 = _errs65 === errors;
833
956
  }
834
957
  else {
835
958
  var valid0 = true;
836
959
  }
837
960
  if(valid0){
838
961
  if(data.constraints !== undefined){
839
- let data23 = data.constraints;
840
- const _errs62 = errors;
841
- if(errors === _errs62){
842
- if(data23 && typeof data23 == "object" && !Array.isArray(data23)){
843
- for(const key2 in data23){
844
- let data24 = data23[key2];
845
- const _errs65 = errors;
846
- if(errors === _errs65){
962
+ let data24 = data.constraints;
963
+ const _errs68 = errors;
964
+ if(errors === _errs68){
847
965
  if(data24 && typeof data24 == "object" && !Array.isArray(data24)){
966
+ for(const key2 in data24){
967
+ let data25 = data24[key2];
968
+ const _errs71 = errors;
969
+ if(errors === _errs71){
970
+ if(data25 && typeof data25 == "object" && !Array.isArray(data25)){
848
971
  let missing2;
849
- if(((((data24.name === undefined) && (missing2 = "name")) || ((data24.storage === undefined) && (missing2 = "storage"))) || ((data24.validate === undefined) && (missing2 = "validate"))) || ((data24.deriveConstraint === undefined) && (missing2 = "deriveConstraint"))){
972
+ if(((((data25.name === undefined) && (missing2 = "name")) || ((data25.storage === undefined) && (missing2 = "storage"))) || ((data25.validate === undefined) && (missing2 = "validate"))) || ((data25.deriveConstraint === undefined) && (missing2 = "deriveConstraint"))){
850
973
  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+"'"}];
851
974
  return false;
852
975
  }
853
976
  else {
854
- if(data24.name !== undefined){
855
- let data25 = data24.name;
856
- if(typeof data25 !== "string"){
857
- let dataType23 = typeof data25;
858
- let coerced23 = undefined;
859
- if(!(coerced23 !== undefined)){
860
- if(dataType23 == "number" || dataType23 == "boolean"){
861
- coerced23 = "" + data25;
862
- }
863
- else if(data25 === null){
864
- coerced23 = "";
977
+ if(data25.name !== undefined){
978
+ let data26 = data25.name;
979
+ if(typeof data26 !== "string"){
980
+ let dataType25 = typeof data26;
981
+ let coerced25 = undefined;
982
+ if(!(coerced25 !== undefined)){
983
+ if(dataType25 == "number" || dataType25 == "boolean"){
984
+ coerced25 = "" + data26;
985
+ }
986
+ else if(data26 === null){
987
+ coerced25 = "";
865
988
  }
866
989
  else {
867
990
  validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/properties/constraints/additionalProperties/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];
868
991
  return false;
869
992
  }
870
993
  }
871
- if(coerced23 !== undefined){
872
- data25 = coerced23;
873
- if(data24 !== undefined){
874
- data24["name"] = coerced23;
994
+ if(coerced25 !== undefined){
995
+ data26 = coerced25;
996
+ if(data25 !== undefined){
997
+ data25["name"] = coerced25;
875
998
  }
876
999
  }
877
1000
  }
@@ -883,8 +1006,8 @@ validate10.errors = [{instancePath:instancePath+"/constraints/" + key2.replace(/
883
1006
  return false;
884
1007
  }
885
1008
  }
886
- var valid5 = _errs65 === errors;
887
- if(!valid5){
1009
+ var valid6 = _errs71 === errors;
1010
+ if(!valid6){
888
1011
  break;
889
1012
  }
890
1013
  }
@@ -894,7 +1017,7 @@ validate10.errors = [{instancePath:instancePath+"/constraints",schemaPath:"#/pro
894
1017
  return false;
895
1018
  }
896
1019
  }
897
- var valid0 = _errs62 === errors;
1020
+ var valid0 = _errs68 === errors;
898
1021
  }
899
1022
  else {
900
1023
  var valid0 = true;
@@ -923,6 +1046,7 @@ var valid0 = true;
923
1046
  }
924
1047
  }
925
1048
  }
1049
+ }
926
1050
  else {
927
1051
  validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];
928
1052
  return false;
@@ -933,4 +1057,4 @@ return errors === 0;
933
1057
  }
934
1058
 
935
1059
 
936
- module.exports.defaultInitOptions = {"connectionTimeout":0,"keepAliveTimeout":72000,"forceCloseConnections":false,"maxRequestsPerSocket":0,"requestTimeout":0,"bodyLimit":1048576,"caseSensitive":true,"allowUnsafeRegex":false,"disableRequestLogging":false,"jsonShorthand":true,"ignoreTrailingSlash":false,"maxParamLength":100,"onProtoPoisoning":"error","onConstructorPoisoning":"error","pluginTimeout":10000,"requestIdHeader":"request-id","requestIdLogLabel":"reqId","http2SessionTimeout":72000,"exposeHeadRoutes":true}
1060
+ module.exports.defaultInitOptions = {"connectionTimeout":0,"keepAliveTimeout":72000,"maxRequestsPerSocket":0,"requestTimeout":0,"bodyLimit":1048576,"caseSensitive":true,"allowUnsafeRegex":false,"disableRequestLogging":false,"jsonShorthand":true,"ignoreTrailingSlash":false,"ignoreDuplicateSlashes":false,"maxParamLength":100,"onProtoPoisoning":"error","onConstructorPoisoning":"error","pluginTimeout":10000,"requestIdHeader":"request-id","requestIdLogLabel":"reqId","http2SessionTimeout":72000,"exposeHeadRoutes":true}