@mintlify/validation 0.1.330 → 0.1.332
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.
- package/dist/mint-config/schemas/v2/index.d.ts +0 -70
- package/dist/mint-config/schemas/v2/properties/errors.d.ts +0 -10
- package/dist/mint-config/schemas/v2/properties/errors.js +0 -2
- package/dist/mint-config/schemas/v2/themes/linden.d.ts +0 -14
- package/dist/mint-config/schemas/v2/themes/maple.d.ts +0 -14
- package/dist/mint-config/schemas/v2/themes/mint.d.ts +0 -14
- package/dist/mint-config/schemas/v2/themes/palm.d.ts +0 -14
- package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +0 -10
- package/dist/mint-config/schemas/v2/themes/willow.d.ts +0 -14
- package/dist/mint-config/validateConfig.d.ts +0 -20
- package/dist/openapi/IncrementalEvaluator.js +9 -0
- package/dist/openapi/SchemaConverter.js +8 -0
- package/dist/openapi/SecurityConverter.js +2 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -196,6 +196,7 @@ export function combineSimpleSchemas(schemas, componentSchemas, location) {
|
|
|
196
196
|
copyKeyIfDefined('description', curr, acc);
|
|
197
197
|
copyKeyIfDefined('format', curr, acc);
|
|
198
198
|
copyKeyIfDefined('default', curr, acc);
|
|
199
|
+
copyKeyIfDefined('x-default', curr, acc);
|
|
199
200
|
copyKeyIfDefined('const', curr, acc);
|
|
200
201
|
combineKeyIfDefined('multipleOf', curr, acc, lcm);
|
|
201
202
|
combineKeyIfDefined('maxLength', curr, acc, Math.min);
|
|
@@ -317,6 +318,7 @@ function convertCombinedSchema(schema, required) {
|
|
|
317
318
|
case 'boolean':
|
|
318
319
|
const booleanProps = sharedProps;
|
|
319
320
|
copyKeyIfDefined('default', schema, booleanProps);
|
|
321
|
+
copyKeyIfDefined('x-default', schema, booleanProps);
|
|
320
322
|
copyExampleIfDefined(schema, booleanProps);
|
|
321
323
|
return Object.assign({ type: schema.type }, booleanProps);
|
|
322
324
|
case 'number':
|
|
@@ -324,6 +326,7 @@ function convertCombinedSchema(schema, required) {
|
|
|
324
326
|
if (schema.enum) {
|
|
325
327
|
const numberEnumProps = sharedProps;
|
|
326
328
|
copyKeyIfDefined('default', schema, numberEnumProps);
|
|
329
|
+
copyKeyIfDefined('x-default', schema, numberEnumProps);
|
|
327
330
|
copyExampleIfDefined(schema, numberEnumProps);
|
|
328
331
|
return Object.assign({ type: schema.type === 'number' ? 'enum<number>' : 'enum<integer>', enum: schema.enum.filter((option) => typeof option === 'number') }, numberEnumProps);
|
|
329
332
|
}
|
|
@@ -334,12 +337,14 @@ function convertCombinedSchema(schema, required) {
|
|
|
334
337
|
copyKeyIfDefined('minimum', schema, numberProps);
|
|
335
338
|
copyKeyIfDefined('exclusiveMinimum', schema, numberProps);
|
|
336
339
|
copyKeyIfDefined('default', schema, numberProps);
|
|
340
|
+
copyKeyIfDefined('x-default', schema, numberProps);
|
|
337
341
|
copyExampleIfDefined(schema, numberProps);
|
|
338
342
|
return Object.assign({ type: schema.type }, numberProps);
|
|
339
343
|
case 'string':
|
|
340
344
|
if (schema.enum) {
|
|
341
345
|
const stringEnumProps = sharedProps;
|
|
342
346
|
copyKeyIfDefined('default', schema, stringEnumProps);
|
|
347
|
+
copyKeyIfDefined('x-default', schema, stringEnumProps);
|
|
343
348
|
copyExampleIfDefined(schema, stringEnumProps);
|
|
344
349
|
return Object.assign({ type: 'enum<string>', enum: schema.enum.filter((option) => typeof option === 'string') }, stringEnumProps);
|
|
345
350
|
}
|
|
@@ -353,6 +358,7 @@ function convertCombinedSchema(schema, required) {
|
|
|
353
358
|
copyKeyIfDefined('maxLength', schema, stringProps);
|
|
354
359
|
copyKeyIfDefined('minLength', schema, stringProps);
|
|
355
360
|
copyKeyIfDefined('default', schema, stringProps);
|
|
361
|
+
copyKeyIfDefined('x-default', schema, stringProps);
|
|
356
362
|
copyKeyIfDefined('const', schema, stringProps);
|
|
357
363
|
copyExampleIfDefined(schema, stringProps);
|
|
358
364
|
return Object.assign({ type: schema.type }, stringProps);
|
|
@@ -362,6 +368,7 @@ function convertCombinedSchema(schema, required) {
|
|
|
362
368
|
copyKeyIfDefined('minItems', schema, arrayProps);
|
|
363
369
|
copyKeyIfDefined('uniqueItems', schema, arrayProps);
|
|
364
370
|
copyKeyIfDefined('default', schema, arrayProps);
|
|
371
|
+
copyKeyIfDefined('x-default', schema, arrayProps);
|
|
365
372
|
copyExampleIfDefined(schema, arrayProps);
|
|
366
373
|
return Object.assign({ type: schema.type, items: (_a = schema.items) !== null && _a !== void 0 ? _a : {} }, arrayProps);
|
|
367
374
|
case 'object':
|
|
@@ -371,11 +378,13 @@ function convertCombinedSchema(schema, required) {
|
|
|
371
378
|
copyKeyIfDefined('maxProperties', schema, objectProperties);
|
|
372
379
|
copyKeyIfDefined('minProperties', schema, objectProperties);
|
|
373
380
|
copyKeyIfDefined('default', schema, objectProperties);
|
|
381
|
+
copyKeyIfDefined('x-default', schema, objectProperties);
|
|
374
382
|
copyExampleIfDefined(schema, objectProperties);
|
|
375
383
|
return Object.assign({ type: schema.type, properties: (_b = schema.properties) !== null && _b !== void 0 ? _b : {} }, objectProperties);
|
|
376
384
|
case 'null':
|
|
377
385
|
const nullProps = sharedProps;
|
|
378
386
|
copyKeyIfDefined('default', schema, nullProps);
|
|
387
|
+
copyKeyIfDefined('x-default', schema, nullProps);
|
|
379
388
|
copyExampleIfDefined(schema, nullProps);
|
|
380
389
|
return Object.assign({ type: schema.type }, nullProps);
|
|
381
390
|
default:
|
|
@@ -358,6 +358,7 @@ export class SchemaConverter extends BaseConverter {
|
|
|
358
358
|
case 'boolean':
|
|
359
359
|
const booleanProps = sharedProps;
|
|
360
360
|
copyKeyIfDefined('default', schema, booleanProps);
|
|
361
|
+
copyKeyIfDefined('x-default', schema, booleanProps);
|
|
361
362
|
copyExampleIfDefined(schema, booleanProps);
|
|
362
363
|
return Object.assign({ type: schema.type }, booleanProps);
|
|
363
364
|
case 'number':
|
|
@@ -365,6 +366,7 @@ export class SchemaConverter extends BaseConverter {
|
|
|
365
366
|
if (schema.enum) {
|
|
366
367
|
const numberEnumProps = sharedProps;
|
|
367
368
|
copyKeyIfDefined('default', schema, numberEnumProps);
|
|
369
|
+
copyKeyIfDefined('x-default', schema, numberEnumProps);
|
|
368
370
|
copyExampleIfDefined(schema, numberEnumProps);
|
|
369
371
|
return Object.assign({ type: schema.type === 'number' ? 'enum<number>' : 'enum<integer>', enum: schema.enum.filter((option) => typeof option === 'number') }, numberEnumProps);
|
|
370
372
|
}
|
|
@@ -375,12 +377,14 @@ export class SchemaConverter extends BaseConverter {
|
|
|
375
377
|
copyKeyIfDefined('minimum', schema, numberProps);
|
|
376
378
|
copyKeyIfDefined('exclusiveMinimum', schema, numberProps);
|
|
377
379
|
copyKeyIfDefined('default', schema, numberProps);
|
|
380
|
+
copyKeyIfDefined('x-default', schema, numberProps);
|
|
378
381
|
copyExampleIfDefined(schema, numberProps);
|
|
379
382
|
return Object.assign({ type: schema.type }, numberProps);
|
|
380
383
|
case 'string':
|
|
381
384
|
if (schema.enum) {
|
|
382
385
|
const stringEnumProps = sharedProps;
|
|
383
386
|
copyKeyIfDefined('default', schema, stringEnumProps);
|
|
387
|
+
copyKeyIfDefined('x-default', schema, stringEnumProps);
|
|
384
388
|
copyExampleIfDefined(schema, stringEnumProps);
|
|
385
389
|
return Object.assign({ type: 'enum<string>', enum: schema.enum.filter((option) => typeof option === 'string') }, stringEnumProps);
|
|
386
390
|
}
|
|
@@ -394,6 +398,7 @@ export class SchemaConverter extends BaseConverter {
|
|
|
394
398
|
copyKeyIfDefined('maxLength', schema, stringProps);
|
|
395
399
|
copyKeyIfDefined('minLength', schema, stringProps);
|
|
396
400
|
copyKeyIfDefined('default', schema, stringProps);
|
|
401
|
+
copyKeyIfDefined('x-default', schema, stringProps);
|
|
397
402
|
copyKeyIfDefined('const', schema, stringProps);
|
|
398
403
|
copyExampleIfDefined(schema, stringProps);
|
|
399
404
|
return Object.assign({ type: schema.type }, stringProps);
|
|
@@ -417,6 +422,7 @@ export class SchemaConverter extends BaseConverter {
|
|
|
417
422
|
copyKeyIfDefined('minItems', schema, arrayProps);
|
|
418
423
|
copyKeyIfDefined('uniqueItems', schema, arrayProps);
|
|
419
424
|
copyKeyIfDefined('default', schema, arrayProps);
|
|
425
|
+
copyKeyIfDefined('x-default', schema, arrayProps);
|
|
420
426
|
copyExampleIfDefined(schema, arrayProps);
|
|
421
427
|
return Object.assign({ type: schema.type, items }, arrayProps);
|
|
422
428
|
case 'object':
|
|
@@ -440,11 +446,13 @@ export class SchemaConverter extends BaseConverter {
|
|
|
440
446
|
copyKeyIfDefined('maxProperties', schema, objectProperties);
|
|
441
447
|
copyKeyIfDefined('minProperties', schema, objectProperties);
|
|
442
448
|
copyKeyIfDefined('default', schema, objectProperties);
|
|
449
|
+
copyKeyIfDefined('x-default', schema, objectProperties);
|
|
443
450
|
copyExampleIfDefined(schema, objectProperties);
|
|
444
451
|
return Object.assign({ type: schema.type, properties }, objectProperties);
|
|
445
452
|
case 'null':
|
|
446
453
|
const nullProps = sharedProps;
|
|
447
454
|
copyKeyIfDefined('default', schema, nullProps);
|
|
455
|
+
copyKeyIfDefined('x-default', schema, nullProps);
|
|
448
456
|
copyExampleIfDefined(schema, nullProps);
|
|
449
457
|
return Object.assign({ type: schema.type }, nullProps);
|
|
450
458
|
default:
|
|
@@ -51,6 +51,7 @@ export class SecurityConverter extends BaseConverter {
|
|
|
51
51
|
const paramGroup = securityScheme.in;
|
|
52
52
|
const schema = { type: 'apiKey' };
|
|
53
53
|
copyKeyIfDefined('description', securityScheme, schema);
|
|
54
|
+
copyKeyIfDefined('x-default', securityScheme, schema);
|
|
54
55
|
parameterSections[paramGroup][securityScheme.name] = schema;
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
@@ -62,6 +63,7 @@ export class SecurityConverter extends BaseConverter {
|
|
|
62
63
|
scheme,
|
|
63
64
|
};
|
|
64
65
|
copyKeyIfDefined('description', securityScheme, schema);
|
|
66
|
+
copyKeyIfDefined('x-default', securityScheme, schema);
|
|
65
67
|
parameterSections.header['Authorization'] = schema;
|
|
66
68
|
}
|
|
67
69
|
else {
|