@mintlify/validation 0.1.59 → 0.1.61
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/index.d.ts +5 -6
- package/dist/index.js +17 -41
- package/dist/mint-config/common.js +1 -4
- package/dist/mint-config/flattenUnionErrorMessages.js +1 -5
- package/dist/mint-config/hexadecimalPattern.js +1 -4
- package/dist/mint-config/schemas/analytics.d.ts +0 -104
- package/dist/mint-config/schemas/analytics.js +28 -31
- package/dist/mint-config/schemas/anchorColors.d.ts +0 -1
- package/dist/mint-config/schemas/anchorColors.js +13 -16
- package/dist/mint-config/schemas/anchors.d.ts +7 -56
- package/dist/mint-config/schemas/anchors.js +17 -20
- package/dist/mint-config/schemas/apiReference.d.ts +0 -2
- package/dist/mint-config/schemas/apiReference.js +18 -21
- package/dist/mint-config/schemas/basics.d.ts +0 -11
- package/dist/mint-config/schemas/basics.js +37 -50
- package/dist/mint-config/schemas/colors.d.ts +0 -1
- package/dist/mint-config/schemas/colors.js +18 -21
- package/dist/mint-config/schemas/config.d.ts +13 -14
- package/dist/mint-config/schemas/config.js +38 -41
- package/dist/mint-config/schemas/favicon.js +2 -5
- package/dist/mint-config/schemas/integrations.d.ts +0 -6
- package/dist/mint-config/schemas/integrations.js +4 -7
- package/dist/mint-config/schemas/navigation.d.ts +15 -2
- package/dist/mint-config/schemas/navigation.js +22 -22
- package/dist/mint-config/schemas/tabs.d.ts +0 -13
- package/dist/mint-config/schemas/tabs.js +7 -10
- package/dist/mint-config/schemas/versions.d.ts +0 -13
- package/dist/mint-config/schemas/versions.js +7 -10
- package/dist/mint-config/validateAnchorsWarnings.d.ts +3 -4
- package/dist/mint-config/validateAnchorsWarnings.js +5 -9
- package/dist/mint-config/validateVersionsInNavigation.d.ts +4 -5
- package/dist/mint-config/validateVersionsInNavigation.js +6 -11
- package/dist/openapi/convertOpenApi.d.ts +1 -1
- package/dist/openapi/convertOpenApi.js +23 -31
- package/dist/openapi/convertParameters.d.ts +1 -1
- package/dist/openapi/convertParameters.js +11 -15
- package/dist/openapi/convertSchema.d.ts +1 -1
- package/dist/openapi/convertSchema.js +61 -72
- package/dist/openapi/convertSecurity.d.ts +1 -1
- package/dist/openapi/convertSecurity.js +8 -13
- package/dist/openapi/convertServers.d.ts +1 -1
- package/dist/openapi/convertServers.js +1 -5
- package/dist/openapi/types/endpoint.js +1 -4
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +17 -10
- package/dist/mint-config/types/enums.d.ts +0 -4
- package/dist/mint-config/types/enums.js +0 -4
- package/dist/mint-config/types/index.d.ts +0 -12
- package/dist/mint-config/types/index.js +0 -2
- package/dist/mint-config/types/navigation.d.ts +0 -13
- package/dist/mint-config/types/navigation.js +0 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __assign = (this && this.__assign) || function () {
|
|
3
2
|
__assign = Object.assign || function(t) {
|
|
4
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -19,25 +18,19 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
18
|
}
|
|
20
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
20
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var lcm_1 = __importDefault(require("lcm"));
|
|
28
|
-
var lodash_1 = __importDefault(require("lodash"));
|
|
29
|
-
var convertOpenApi_1 = require("./convertOpenApi");
|
|
30
|
-
var endpoint_1 = require("./types/endpoint");
|
|
31
|
-
var convertSchema = function (path, schema, required) {
|
|
21
|
+
import lcm from 'lcm';
|
|
22
|
+
import _ from 'lodash';
|
|
23
|
+
import { ConversionError, ImpossibleSchemaError, InvalidSchemaError } from './convertOpenApi.js';
|
|
24
|
+
import { typeList, } from './types/endpoint.js';
|
|
25
|
+
export var convertSchema = function (path, schema, required) {
|
|
32
26
|
if (schema === undefined) {
|
|
33
|
-
throw new
|
|
27
|
+
throw new InvalidSchemaError(path, 'schema undefined');
|
|
34
28
|
}
|
|
35
29
|
// TODO(ronan): remove when fully migrated to endpoint type, or don't modify schema in evaluateCompositionsRecursive
|
|
36
|
-
schema =
|
|
30
|
+
schema = _.cloneDeep(schema);
|
|
37
31
|
schema = evaluateCompositionsRecursive(path, schema);
|
|
38
32
|
return convertSchemaRecursive(path, schema, required);
|
|
39
33
|
};
|
|
40
|
-
exports.convertSchema = convertSchema;
|
|
41
34
|
/**
|
|
42
35
|
* This function should be used to reduce strictly `oneOf` and `anyOf` compositions.
|
|
43
36
|
*
|
|
@@ -51,7 +44,7 @@ var evaluateOptionsCompositions = function (path, schemaArray) {
|
|
|
51
44
|
return (_a = evaluateCompositionsRecursive(__spreadArray(__spreadArray([], path, true), [i.toString()], false), subschema).oneOf) !== null && _a !== void 0 ? _a : [];
|
|
52
45
|
}
|
|
53
46
|
catch (error) {
|
|
54
|
-
if (error instanceof
|
|
47
|
+
if (error instanceof ImpossibleSchemaError) {
|
|
55
48
|
return [];
|
|
56
49
|
}
|
|
57
50
|
else {
|
|
@@ -60,7 +53,7 @@ var evaluateOptionsCompositions = function (path, schemaArray) {
|
|
|
60
53
|
}
|
|
61
54
|
});
|
|
62
55
|
if (evaluatedArray.length === 0) {
|
|
63
|
-
throw new
|
|
56
|
+
throw new ImpossibleSchemaError(path, 'no valid options in schema:', JSON.stringify(schemaArray, undefined, 2));
|
|
64
57
|
}
|
|
65
58
|
return evaluatedArray;
|
|
66
59
|
};
|
|
@@ -101,7 +94,7 @@ var evaluateCompositionsRecursive = function (path, schema) {
|
|
|
101
94
|
schema.additionalProperties = evaluateCompositionsRecursive(__spreadArray(__spreadArray([], path, true), ['additionalProperties'], false), schema.additionalProperties);
|
|
102
95
|
}
|
|
103
96
|
catch (error) {
|
|
104
|
-
if (error instanceof
|
|
97
|
+
if (error instanceof ImpossibleSchemaError) {
|
|
105
98
|
// if additionalProperties schema is impossible, rather than error, just disallow additionalProperties
|
|
106
99
|
schema.additionalProperties = false;
|
|
107
100
|
}
|
|
@@ -168,11 +161,11 @@ var multiplySchemaArrays = function (path, a, b) {
|
|
|
168
161
|
var product = a.flatMap(function (schema1) {
|
|
169
162
|
return b.flatMap(function (schema2) {
|
|
170
163
|
try {
|
|
171
|
-
var combinedSchema =
|
|
164
|
+
var combinedSchema = combineTopLevelSchemas(path, schema1, schema2);
|
|
172
165
|
return [combinedSchema];
|
|
173
166
|
}
|
|
174
167
|
catch (error) {
|
|
175
|
-
if (error instanceof
|
|
168
|
+
if (error instanceof ImpossibleSchemaError) {
|
|
176
169
|
return [];
|
|
177
170
|
}
|
|
178
171
|
else {
|
|
@@ -182,7 +175,7 @@ var multiplySchemaArrays = function (path, a, b) {
|
|
|
182
175
|
});
|
|
183
176
|
});
|
|
184
177
|
if (product.length === 0) {
|
|
185
|
-
throw new
|
|
178
|
+
throw new ImpossibleSchemaError(path, 'impossible schema combination:', 'schema array 1:', JSON.stringify(a, undefined, 2), 'schema array 2:', JSON.stringify(b, undefined, 2));
|
|
186
179
|
}
|
|
187
180
|
return product;
|
|
188
181
|
};
|
|
@@ -192,7 +185,7 @@ var combineReducedSchemas = function (path, schema1, schema2) {
|
|
|
192
185
|
oneOf: multiplySchemaArrays(path, ((_a = schema1.oneOf) !== null && _a !== void 0 ? _a : []), ((_b = schema2.oneOf) !== null && _b !== void 0 ? _b : [])),
|
|
193
186
|
};
|
|
194
187
|
};
|
|
195
|
-
var combineTopLevelSchemas = function (path, schema1, schema2) {
|
|
188
|
+
export var combineTopLevelSchemas = function (path, schema1, schema2) {
|
|
196
189
|
var _a, _b;
|
|
197
190
|
var type1 = schema1.type;
|
|
198
191
|
var type2 = schema2.type;
|
|
@@ -204,7 +197,7 @@ var combineTopLevelSchemas = function (path, schema1, schema2) {
|
|
|
204
197
|
type1 = 'integer';
|
|
205
198
|
}
|
|
206
199
|
if (type1 && type2 && type1 !== type2) {
|
|
207
|
-
throw new
|
|
200
|
+
throw new ImpossibleSchemaError(path, "mismatched type in composition: \"".concat(type1, "\" \"").concat(type2, "\""));
|
|
208
201
|
}
|
|
209
202
|
for (var _i = 0, _c = [schema1, schema2]; _i < _c.length; _i++) {
|
|
210
203
|
var schema = _c[_i];
|
|
@@ -231,7 +224,7 @@ var combineTopLevelSchemas = function (path, schema1, schema2) {
|
|
|
231
224
|
title: takeLast(schema1, schema2, 'title'),
|
|
232
225
|
description: takeLast(schema1, schema2, 'description'),
|
|
233
226
|
format: takeLast(schema1, schema2, 'format'),
|
|
234
|
-
multipleOf: combine(schema1, schema2, 'multipleOf',
|
|
227
|
+
multipleOf: combine(schema1, schema2, 'multipleOf', lcm),
|
|
235
228
|
maximum: combine(schema1, schema2, 'maximum', Math.min),
|
|
236
229
|
minimum: combine(schema1, schema2, 'minimum', Math.max),
|
|
237
230
|
maxLength: combine(schema1, schema2, 'maxLength', Math.min),
|
|
@@ -299,19 +292,16 @@ var combineTopLevelSchemas = function (path, schema1, schema2) {
|
|
|
299
292
|
}
|
|
300
293
|
return __assign({ type: type }, combinedSchema);
|
|
301
294
|
};
|
|
302
|
-
|
|
303
|
-
var addKeyIfDefined = function (key, value, destination) {
|
|
295
|
+
export var addKeyIfDefined = function (key, value, destination) {
|
|
304
296
|
if (value !== undefined) {
|
|
305
297
|
destination[key] = value;
|
|
306
298
|
}
|
|
307
299
|
};
|
|
308
|
-
|
|
309
|
-
var copyKeyIfDefined = function (key, source, destination) {
|
|
300
|
+
export var copyKeyIfDefined = function (key, source, destination) {
|
|
310
301
|
if (source[key] !== undefined) {
|
|
311
302
|
destination[key] = source[key];
|
|
312
303
|
}
|
|
313
304
|
};
|
|
314
|
-
exports.copyKeyIfDefined = copyKeyIfDefined;
|
|
315
305
|
var takeLast = function (schema1, schema2, key) {
|
|
316
306
|
var _a;
|
|
317
307
|
return (_a = schema2[key]) !== null && _a !== void 0 ? _a : schema1[key];
|
|
@@ -324,16 +314,16 @@ var combine = function (schema1, schema2, key, transform) {
|
|
|
324
314
|
};
|
|
325
315
|
var convertSchemaRecursive = function (path, schema, required) {
|
|
326
316
|
if (schema.oneOf === undefined || schema.oneOf.length === 0) {
|
|
327
|
-
throw new
|
|
317
|
+
throw new ConversionError(path, 'missing schema definition');
|
|
328
318
|
}
|
|
329
319
|
var schemaArray = schema.oneOf.map(function (schema) {
|
|
330
320
|
var sharedProps = {};
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
321
|
+
addKeyIfDefined('required', required, sharedProps);
|
|
322
|
+
copyKeyIfDefined('title', schema, sharedProps);
|
|
323
|
+
copyKeyIfDefined('description', schema, sharedProps);
|
|
324
|
+
copyKeyIfDefined('readOnly', schema, sharedProps);
|
|
325
|
+
copyKeyIfDefined('writeOnly', schema, sharedProps);
|
|
326
|
+
copyKeyIfDefined('deprecated', schema, sharedProps);
|
|
337
327
|
if (schema.type === undefined) {
|
|
338
328
|
var inferredType = inferType(schema);
|
|
339
329
|
if (inferredType === undefined) {
|
|
@@ -342,80 +332,80 @@ var convertSchemaRecursive = function (path, schema, required) {
|
|
|
342
332
|
schema.type = inferredType;
|
|
343
333
|
}
|
|
344
334
|
var type = schema.type;
|
|
345
|
-
if (!
|
|
346
|
-
throw new
|
|
335
|
+
if (!typeList.includes(type)) {
|
|
336
|
+
throw new InvalidSchemaError(path, "invalid schema type: ".concat(schema.type));
|
|
347
337
|
}
|
|
348
338
|
switch (schema.type) {
|
|
349
339
|
case 'boolean':
|
|
350
340
|
var booleanProps = sharedProps;
|
|
351
|
-
|
|
352
|
-
|
|
341
|
+
copyKeyIfDefined('default', schema, booleanProps);
|
|
342
|
+
copyKeyIfDefined('example', schema, booleanProps);
|
|
353
343
|
return __assign({ type: schema.type }, booleanProps);
|
|
354
344
|
case 'number':
|
|
355
345
|
case 'integer':
|
|
356
346
|
if (schema.enum) {
|
|
357
347
|
var numberEnumProps = sharedProps;
|
|
358
|
-
|
|
359
|
-
|
|
348
|
+
copyKeyIfDefined('default', schema, numberEnumProps);
|
|
349
|
+
copyKeyIfDefined('example', schema, numberEnumProps);
|
|
360
350
|
return __assign({ type: schema.type === 'number' ? 'numberEnum' : 'integerEnum', enum: schema.enum }, numberEnumProps);
|
|
361
351
|
}
|
|
362
352
|
var numberProps = sharedProps;
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
353
|
+
copyKeyIfDefined('multipleOf', schema, numberProps);
|
|
354
|
+
copyKeyIfDefined('maximum', schema, numberProps);
|
|
355
|
+
copyKeyIfDefined('exclusiveMaximum', schema, numberProps);
|
|
356
|
+
copyKeyIfDefined('minimum', schema, numberProps);
|
|
357
|
+
copyKeyIfDefined('exclusiveMinimum', schema, numberProps);
|
|
358
|
+
copyKeyIfDefined('default', schema, numberProps);
|
|
359
|
+
copyKeyIfDefined('example', schema, numberProps);
|
|
370
360
|
return __assign({ type: schema.type }, numberProps);
|
|
371
361
|
case 'string':
|
|
372
362
|
if (schema.enum) {
|
|
373
363
|
var stringEnumProps = sharedProps;
|
|
374
|
-
|
|
375
|
-
|
|
364
|
+
copyKeyIfDefined('default', schema, stringEnumProps);
|
|
365
|
+
copyKeyIfDefined('example', schema, stringEnumProps);
|
|
376
366
|
return __assign({ type: 'stringEnum', enum: schema.enum }, stringEnumProps);
|
|
377
367
|
}
|
|
378
368
|
var stringProps = sharedProps;
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
369
|
+
copyKeyIfDefined('format', schema, stringProps);
|
|
370
|
+
copyKeyIfDefined('pattern', schema, stringProps);
|
|
371
|
+
copyKeyIfDefined('maxLength', schema, stringProps);
|
|
372
|
+
copyKeyIfDefined('minLength', schema, stringProps);
|
|
373
|
+
copyKeyIfDefined('default', schema, stringProps);
|
|
374
|
+
copyKeyIfDefined('example', schema, stringProps);
|
|
385
375
|
return __assign({ type: schema.type }, stringProps);
|
|
386
376
|
case 'array':
|
|
387
377
|
var arrayProps = sharedProps;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
378
|
+
copyKeyIfDefined('maxItems', schema, arrayProps);
|
|
379
|
+
copyKeyIfDefined('minItems', schema, arrayProps);
|
|
380
|
+
copyKeyIfDefined('uniqueItems', schema, arrayProps);
|
|
381
|
+
copyKeyIfDefined('default', schema, arrayProps);
|
|
382
|
+
copyKeyIfDefined('example', schema, arrayProps);
|
|
393
383
|
return __assign({ type: schema.type, items: convertSchemaRecursive(__spreadArray(__spreadArray([], path, true), ['items'], false), schema.items) }, arrayProps);
|
|
394
384
|
case 'object':
|
|
395
|
-
var properties =
|
|
385
|
+
var properties = convertProperties(__spreadArray(__spreadArray([], path, true), ['properties'], false), schema.properties, schema.required);
|
|
396
386
|
var additionalProperties = typeof schema.additionalProperties === 'object' && schema.additionalProperties != null
|
|
397
387
|
? convertSchemaRecursive(__spreadArray(__spreadArray([], path, true), ['additionalProperties'], false), schema.additionalProperties)
|
|
398
388
|
: schema.additionalProperties;
|
|
399
389
|
var objectProperties = sharedProps;
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
390
|
+
addKeyIfDefined('additionalProperties', additionalProperties, objectProperties);
|
|
391
|
+
copyKeyIfDefined('maxProperties', schema, objectProperties);
|
|
392
|
+
copyKeyIfDefined('minProperties', schema, objectProperties);
|
|
393
|
+
copyKeyIfDefined('default', schema, objectProperties);
|
|
394
|
+
copyKeyIfDefined('example', schema, objectProperties);
|
|
405
395
|
return __assign({ type: schema.type, properties: properties }, objectProperties);
|
|
406
396
|
case 'null':
|
|
407
397
|
var nullProps = sharedProps;
|
|
408
|
-
|
|
409
|
-
|
|
398
|
+
copyKeyIfDefined('default', schema, nullProps);
|
|
399
|
+
copyKeyIfDefined('example', schema, nullProps);
|
|
410
400
|
return __assign({ type: schema.type }, nullProps);
|
|
411
401
|
default:
|
|
412
|
-
throw new
|
|
402
|
+
throw new ImpossibleSchemaError(path, "impossible type reached: ".concat(schema.type));
|
|
413
403
|
}
|
|
414
404
|
});
|
|
415
405
|
// must unpack first element to satisfy type
|
|
416
406
|
return __spreadArray([schemaArray[0]], schemaArray.slice(1), true);
|
|
417
407
|
};
|
|
418
|
-
var convertProperties = function (path, properties, required) {
|
|
408
|
+
export var convertProperties = function (path, properties, required) {
|
|
419
409
|
if (properties === undefined) {
|
|
420
410
|
return {};
|
|
421
411
|
}
|
|
@@ -428,7 +418,6 @@ var convertProperties = function (path, properties, required) {
|
|
|
428
418
|
});
|
|
429
419
|
return Object.fromEntries(newEntries);
|
|
430
420
|
};
|
|
431
|
-
exports.convertProperties = convertProperties;
|
|
432
421
|
/**
|
|
433
422
|
* Given an OpenAPI 3.1 schema, this function will attempt to determine the schema type
|
|
434
423
|
* based on the properties present in the schema. This is useful for assigning types to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OpenAPIV3_1 } from 'openapi-types';
|
|
2
|
-
import { SecurityOption } from './types/endpoint';
|
|
2
|
+
import { SecurityOption } from './types/endpoint.js';
|
|
3
3
|
type ConvertSecurityParams = {
|
|
4
4
|
securityRequirements?: OpenAPIV3_1.SecurityRequirementObject[];
|
|
5
5
|
securitySchemes: OpenAPIV3_1.ComponentsObject['securitySchemes'];
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.addSecurityParameters = exports.convertSecurity = void 0;
|
|
4
|
-
var convertOpenApi_1 = require("./convertOpenApi");
|
|
5
|
-
var convertSecurity = function (_a) {
|
|
1
|
+
import { InvalidSchemaError } from './convertOpenApi.js';
|
|
2
|
+
export var convertSecurity = function (_a) {
|
|
6
3
|
var securityRequirements = _a.securityRequirements, securitySchemes = _a.securitySchemes;
|
|
7
4
|
if (securityRequirements === undefined || securityRequirements.length === 0) {
|
|
8
5
|
return [];
|
|
9
6
|
}
|
|
10
7
|
if (securitySchemes === undefined) {
|
|
11
|
-
throw new
|
|
8
|
+
throw new InvalidSchemaError(['#', 'components'], 'securitySchemes not defined');
|
|
12
9
|
}
|
|
13
10
|
// TODO(ronan): make this work for camel-case as well
|
|
14
11
|
return securityRequirements.map(function (security) {
|
|
@@ -24,9 +21,9 @@ var convertSecurity = function (_a) {
|
|
|
24
21
|
Object.keys(security).forEach(function (securityName) {
|
|
25
22
|
var securityScheme = securitySchemes === null || securitySchemes === void 0 ? void 0 : securitySchemes[securityName];
|
|
26
23
|
if (securityScheme === undefined) {
|
|
27
|
-
throw new
|
|
24
|
+
throw new InvalidSchemaError(['#', 'components', 'securitySchemes'], "security scheme not defined: '".concat(securityName, "'"));
|
|
28
25
|
}
|
|
29
|
-
|
|
26
|
+
addSecurityParameters({
|
|
30
27
|
securityName: securityName,
|
|
31
28
|
securityScheme: securityScheme,
|
|
32
29
|
parameterSections: parameterSections,
|
|
@@ -35,14 +32,13 @@ var convertSecurity = function (_a) {
|
|
|
35
32
|
return parameterSections;
|
|
36
33
|
});
|
|
37
34
|
};
|
|
38
|
-
|
|
39
|
-
var addSecurityParameters = function (_a) {
|
|
35
|
+
export var addSecurityParameters = function (_a) {
|
|
40
36
|
var _b, _c;
|
|
41
37
|
var securityName = _a.securityName, securityScheme = _a.securityScheme, parameterSections = _a.parameterSections;
|
|
42
38
|
switch (securityScheme.type) {
|
|
43
39
|
case 'apiKey':
|
|
44
40
|
if (!['header', 'query', 'cookie'].includes(securityScheme.in)) {
|
|
45
|
-
throw new
|
|
41
|
+
throw new InvalidSchemaError(['#', 'components', 'securitySchemes', securityName], "invalid security scheme location provided: '".concat(securityScheme.in, "'"));
|
|
46
42
|
}
|
|
47
43
|
var paramGroup = securityScheme.in;
|
|
48
44
|
parameterSections[paramGroup][securityScheme.name] = {
|
|
@@ -76,7 +72,7 @@ var addSecurityParameters = function (_a) {
|
|
|
76
72
|
};
|
|
77
73
|
}
|
|
78
74
|
else {
|
|
79
|
-
throw new
|
|
75
|
+
throw new InvalidSchemaError(['#', 'components', 'securitySchemes', securityName], "encountered unknown HTTP security scheme: '".concat(securityScheme.scheme, "'"));
|
|
80
76
|
}
|
|
81
77
|
return;
|
|
82
78
|
case 'oauth2':
|
|
@@ -84,4 +80,3 @@ var addSecurityParameters = function (_a) {
|
|
|
84
80
|
return;
|
|
85
81
|
}
|
|
86
82
|
};
|
|
87
|
-
exports.addSecurityParameters = addSecurityParameters;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertServers = void 0;
|
|
4
|
-
var convertServers = function (_a) {
|
|
1
|
+
export var convertServers = function (_a) {
|
|
5
2
|
var servers = _a.servers;
|
|
6
3
|
if (servers === undefined || servers.length === 0) {
|
|
7
4
|
return undefined;
|
|
@@ -15,7 +12,6 @@ var convertServers = function (_a) {
|
|
|
15
12
|
};
|
|
16
13
|
});
|
|
17
14
|
};
|
|
18
|
-
exports.convertServers = convertServers;
|
|
19
15
|
var convertVariables = function (_a) {
|
|
20
16
|
var variables = _a.variables;
|
|
21
17
|
if (variables === undefined || Object.keys(variables).length === 0) {
|