oas 38.6.0 → 38.7.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.
- package/dist/analyzer/index.cjs +22 -22
- package/dist/analyzer/index.cjs.map +1 -1
- package/dist/analyzer/index.js +2 -2
- package/dist/analyzer/types.cjs.map +1 -1
- package/dist/{chunk-5745XRSJ.js → chunk-44RR2TQE.js} +6 -5
- package/dist/{chunk-5745XRSJ.js.map → chunk-44RR2TQE.js.map} +1 -1
- package/dist/chunk-47FD2BIN.cjs.map +1 -1
- package/dist/chunk-COHEPMUP.cjs.map +1 -1
- package/dist/{chunk-RUHLHK66.cjs → chunk-EUTXEYKF.cjs} +140 -139
- package/dist/chunk-EUTXEYKF.cjs.map +1 -0
- package/dist/{chunk-HQEDOVWO.cjs → chunk-I5PRGIKK.cjs} +42 -40
- package/dist/chunk-I5PRGIKK.cjs.map +1 -0
- package/dist/{chunk-XG4HGNCN.js → chunk-IQVLGHQA.js} +1 -1
- package/dist/chunk-IQVLGHQA.js.map +1 -0
- package/dist/{chunk-OBYCSKPS.cjs → chunk-NASFWOIS.cjs} +39 -39
- package/dist/chunk-NASFWOIS.cjs.map +1 -0
- package/dist/{chunk-PZR3GKKO.js → chunk-PIYKHCQX.js} +10 -8
- package/dist/chunk-PIYKHCQX.js.map +1 -0
- package/dist/{chunk-3X7ZLPYE.js → chunk-S333SATE.js} +3 -3
- package/dist/{chunk-3X7ZLPYE.js.map → chunk-S333SATE.js.map} +1 -1
- package/dist/{chunk-7PWF3F2W.cjs → chunk-X7BGCIJN.cjs} +1 -1
- package/dist/chunk-X7BGCIJN.cjs.map +1 -0
- package/dist/extensions.cjs.map +1 -1
- package/dist/index.cjs +71 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/dist/operation/index.cjs +4 -4
- package/dist/operation/index.cjs.map +1 -1
- package/dist/operation/index.js +3 -3
- package/dist/pruner/index.cjs +5 -5
- package/dist/pruner/index.cjs.map +1 -1
- package/dist/pruner/index.js +4 -4
- package/dist/reducer/index.cjs +5 -5
- package/dist/reducer/index.cjs.map +1 -1
- package/dist/reducer/index.js +4 -4
- package/dist/types.cjs +2 -2
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +9 -2
- package/dist/types.d.ts +9 -2
- package/dist/types.js +1 -1
- package/dist/utils.cjs +3 -3
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-7PWF3F2W.cjs.map +0 -1
- package/dist/chunk-HQEDOVWO.cjs.map +0 -1
- package/dist/chunk-OBYCSKPS.cjs.map +0 -1
- package/dist/chunk-PZR3GKKO.js.map +0 -1
- package/dist/chunk-RUHLHK66.cjs.map +0 -1
- package/dist/chunk-XG4HGNCN.js.map +0 -1
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkNASFWOIScjs = require('./chunk-NASFWOIS.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunk47FD2BINcjs = require('./chunk-47FD2BIN.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkX7BGCIJNcjs = require('./chunk-X7BGCIJN.cjs');
|
|
25
25
|
|
|
26
26
|
// src/lib/urls.ts
|
|
27
27
|
var _pathtoregexp = require('path-to-regexp');
|
|
@@ -70,7 +70,7 @@ function normalizeURL(url, urlForProtocolCheck = url) {
|
|
|
70
70
|
}
|
|
71
71
|
function normalizedURLFromServers(servers, selected) {
|
|
72
72
|
const server = _optionalChain([servers, 'optionalAccess', _7 => _7[selected]]);
|
|
73
|
-
const resolvedUrl = _optionalChain([server, 'optionalAccess', _8 => _8.url, 'optionalAccess', _9 => _9.replace, 'call', _10 => _10(
|
|
73
|
+
const resolvedUrl = _optionalChain([server, 'optionalAccess', _8 => _8.url, 'optionalAccess', _9 => _9.replace, 'call', _10 => _10(_chunkNASFWOIScjs.SERVER_VARIABLE_REGEX, (original, key) => {
|
|
74
74
|
return key in (server.variables || {}) ? String(_optionalChain([server, 'access', _11 => _11.variables, 'optionalAccess', _12 => _12[key], 'access', _13 => _13.default])) : original;
|
|
75
75
|
})]);
|
|
76
76
|
return normalizeURL(_optionalChain([server, 'optionalAccess', _14 => _14.url]), resolvedUrl);
|
|
@@ -215,7 +215,7 @@ function dedupeCommonParameters(parameters, commonParameters) {
|
|
|
215
215
|
return !parameters.find((param2) => {
|
|
216
216
|
if (param.name && param2.name) {
|
|
217
217
|
return param.name === param2.name && param.in === param2.in;
|
|
218
|
-
} else if (
|
|
218
|
+
} else if (_chunkX7BGCIJNcjs.isRef.call(void 0, param) && _chunkX7BGCIJNcjs.isRef.call(void 0, param2)) {
|
|
219
219
|
return param.$ref === param2.$ref;
|
|
220
220
|
}
|
|
221
221
|
return false;
|
|
@@ -238,7 +238,7 @@ function usesPolymorphism(schema) {
|
|
|
238
238
|
return false;
|
|
239
239
|
}
|
|
240
240
|
function objectify(thing) {
|
|
241
|
-
if (!
|
|
241
|
+
if (!_chunkNASFWOIScjs.isObject.call(void 0, thing)) {
|
|
242
242
|
return {};
|
|
243
243
|
}
|
|
244
244
|
return thing;
|
|
@@ -298,13 +298,13 @@ function sampleFromSchema(schema, opts = {}) {
|
|
|
298
298
|
const seenRefs = opts.seenRefs || /* @__PURE__ */ new Set();
|
|
299
299
|
let objectifySchema = objectify(schema);
|
|
300
300
|
let refToRelease;
|
|
301
|
-
if (opts.definition &&
|
|
301
|
+
if (opts.definition && _chunkX7BGCIJNcjs.isRef.call(void 0, objectifySchema)) {
|
|
302
302
|
refToRelease = objectifySchema.$ref;
|
|
303
303
|
if (seenRefs.has(refToRelease)) {
|
|
304
304
|
return void 0;
|
|
305
305
|
}
|
|
306
|
-
objectifySchema =
|
|
307
|
-
if (!objectifySchema ||
|
|
306
|
+
objectifySchema = _chunkNASFWOIScjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
|
|
307
|
+
if (!objectifySchema || _chunkX7BGCIJNcjs.isRef.call(void 0, objectifySchema)) {
|
|
308
308
|
return void 0;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
@@ -321,7 +321,7 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
321
321
|
const { example, additionalProperties, properties, items } = schema;
|
|
322
322
|
const { includeReadOnly, includeWriteOnly } = opts;
|
|
323
323
|
if (example !== void 0) {
|
|
324
|
-
return
|
|
324
|
+
return _chunkNASFWOIScjs.dereferenceRefDeep.call(void 0, example, opts.definition, seenRefs);
|
|
325
325
|
}
|
|
326
326
|
const hasPolymorphism = usesPolymorphism(schema);
|
|
327
327
|
if (hasPolymorphism === "allOf") {
|
|
@@ -329,9 +329,9 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
329
329
|
const definition = opts.definition;
|
|
330
330
|
const resolvedAllOf = schema.allOf.map((subSchema) => {
|
|
331
331
|
let sub = objectify(subSchema);
|
|
332
|
-
if (definition &&
|
|
333
|
-
const resolved =
|
|
334
|
-
if (resolved && !
|
|
332
|
+
if (definition && _chunkX7BGCIJNcjs.isRef.call(void 0, sub)) {
|
|
333
|
+
const resolved = _chunkNASFWOIScjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
|
|
334
|
+
if (resolved && !_chunkX7BGCIJNcjs.isRef.call(void 0, resolved)) {
|
|
335
335
|
sub = resolved;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
@@ -441,8 +441,8 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
441
441
|
// src/operation/lib/get-mediatype-examples.ts
|
|
442
442
|
function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {}) {
|
|
443
443
|
if (mediaTypeObject.example) {
|
|
444
|
-
mediaTypeObject.example =
|
|
445
|
-
if (mediaTypeObject.example === void 0 ||
|
|
444
|
+
mediaTypeObject.example = _chunkNASFWOIScjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
|
|
445
|
+
if (mediaTypeObject.example === void 0 || _chunkNASFWOIScjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
|
|
446
446
|
return [];
|
|
447
447
|
}
|
|
448
448
|
return [
|
|
@@ -457,9 +457,9 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
457
457
|
let description;
|
|
458
458
|
let example = examples[key];
|
|
459
459
|
if (example !== null && typeof example === "object") {
|
|
460
|
-
if (
|
|
461
|
-
example =
|
|
462
|
-
if (!example ||
|
|
460
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, example)) {
|
|
461
|
+
example = _chunkNASFWOIScjs.dereferenceRef.call(void 0, example, definition);
|
|
462
|
+
if (!example || _chunkX7BGCIJNcjs.isRef.call(void 0, example)) {
|
|
463
463
|
return false;
|
|
464
464
|
}
|
|
465
465
|
}
|
|
@@ -470,8 +470,8 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
470
470
|
description = example.description;
|
|
471
471
|
}
|
|
472
472
|
if ("value" in example) {
|
|
473
|
-
example.value =
|
|
474
|
-
if (example.value === void 0 ||
|
|
473
|
+
example.value = _chunkNASFWOIScjs.dereferenceRefDeep.call(void 0, example.value, definition);
|
|
474
|
+
if (example.value === void 0 || _chunkNASFWOIScjs.collectRefsInSchema.call(void 0, example.value).size > 0) {
|
|
475
475
|
return false;
|
|
476
476
|
}
|
|
477
477
|
example = example.value;
|
|
@@ -488,7 +488,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
if (mediaTypeObject.schema) {
|
|
491
|
-
if (!
|
|
491
|
+
if (!_chunkNASFWOIScjs.matches_mimetype_default.xml(mediaType)) {
|
|
492
492
|
return [
|
|
493
493
|
{
|
|
494
494
|
value: sampleFromSchema(structuredClone(mediaTypeObject.schema), {
|
|
@@ -508,9 +508,9 @@ function getResponseExamples(operation, definition) {
|
|
|
508
508
|
let response = _optionalChain([operation, 'access', _29 => _29.responses, 'optionalAccess', _30 => _30[status]]);
|
|
509
509
|
let onlyHeaders = false;
|
|
510
510
|
if (!response) return false;
|
|
511
|
-
if (
|
|
512
|
-
response =
|
|
513
|
-
if (!response ||
|
|
511
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, response)) {
|
|
512
|
+
response = _chunkNASFWOIScjs.dereferenceRef.call(void 0, response, definition);
|
|
513
|
+
if (!response || _chunkX7BGCIJNcjs.isRef.call(void 0, response)) return false;
|
|
514
514
|
}
|
|
515
515
|
const mediaTypes = {};
|
|
516
516
|
(_optionalChain([response, 'optionalAccess', _31 => _31.content]) ? Object.keys(response.content) : []).forEach((mediaType) => {
|
|
@@ -548,16 +548,16 @@ function getCallbackExamples(operation, definition) {
|
|
|
548
548
|
const examples = Object.keys(operation.callbacks).map((identifier) => {
|
|
549
549
|
let callback = _optionalChain([operation, 'access', _34 => _34.callbacks, 'optionalAccess', _35 => _35[identifier]]);
|
|
550
550
|
if (!callback) return [];
|
|
551
|
-
if (
|
|
552
|
-
callback =
|
|
553
|
-
if (!callback ||
|
|
551
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, callback)) {
|
|
552
|
+
callback = _chunkNASFWOIScjs.dereferenceRef.call(void 0, callback, definition);
|
|
553
|
+
if (!callback || _chunkX7BGCIJNcjs.isRef.call(void 0, callback)) return [];
|
|
554
554
|
}
|
|
555
555
|
const items = Object.keys(callback).map((expression) => {
|
|
556
556
|
let callbackPath = callback[expression];
|
|
557
557
|
if (!callbackPath) return [];
|
|
558
|
-
if (
|
|
559
|
-
callbackPath =
|
|
560
|
-
if (!callbackPath ||
|
|
558
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, callbackPath)) {
|
|
559
|
+
callbackPath = _chunkNASFWOIScjs.dereferenceRef.call(void 0, callbackPath, definition);
|
|
560
|
+
if (!callbackPath || _chunkX7BGCIJNcjs.isRef.call(void 0, callbackPath)) return [];
|
|
561
561
|
}
|
|
562
562
|
return Object.keys(callbackPath).map((method) => {
|
|
563
563
|
if (["servers", "parameters", "summary", "description"].includes(method)) {
|
|
@@ -638,9 +638,9 @@ function getExampleGroups(operation) {
|
|
|
638
638
|
operation.getParameters().forEach((param) => {
|
|
639
639
|
Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
|
|
640
640
|
let example = paramExample;
|
|
641
|
-
if (
|
|
642
|
-
example =
|
|
643
|
-
if (!example ||
|
|
641
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, example)) {
|
|
642
|
+
example = _chunkNASFWOIScjs.dereferenceRef.call(void 0, example, operation.api);
|
|
643
|
+
if (!example || _chunkX7BGCIJNcjs.isRef.call(void 0, example)) return;
|
|
644
644
|
}
|
|
645
645
|
groups[exampleKey] = {
|
|
646
646
|
...groups[exampleKey],
|
|
@@ -686,10 +686,10 @@ function getRequestBodyExamples(operation, definition) {
|
|
|
686
686
|
let requestBody = operation.requestBody;
|
|
687
687
|
if (!requestBody) {
|
|
688
688
|
return [];
|
|
689
|
-
} else if (
|
|
690
|
-
requestBody =
|
|
689
|
+
} else if (_chunkX7BGCIJNcjs.isRef.call(void 0, requestBody)) {
|
|
690
|
+
requestBody = _chunkNASFWOIScjs.dereferenceRef.call(void 0, requestBody, definition);
|
|
691
691
|
}
|
|
692
|
-
if (!requestBody ||
|
|
692
|
+
if (!requestBody || _chunkX7BGCIJNcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
|
|
693
693
|
return [];
|
|
694
694
|
}
|
|
695
695
|
return Object.keys(requestBody.content || {}).map((mediaType) => {
|
|
@@ -752,7 +752,7 @@ function getOperationId(path, method, operation, opts = {}) {
|
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
// src/operation/transformers/get-response-as-json-schema.ts
|
|
755
|
-
var isJSON =
|
|
755
|
+
var isJSON = _chunkNASFWOIScjs.matches_mimetype_default.json;
|
|
756
756
|
function buildHeadersSchema(response, schemaOptions) {
|
|
757
757
|
const headersSchema = {
|
|
758
758
|
type: "object",
|
|
@@ -764,19 +764,19 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
764
764
|
Object.keys(response.headers).forEach((key) => {
|
|
765
765
|
let headerEntry = _optionalChain([response, 'access', _62 => _62.headers, 'optionalAccess', _63 => _63[key]]);
|
|
766
766
|
if (!headerEntry) return;
|
|
767
|
-
if (
|
|
768
|
-
headerEntry =
|
|
769
|
-
if (!headerEntry ||
|
|
767
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, headerEntry)) {
|
|
768
|
+
headerEntry = _chunkNASFWOIScjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
|
|
769
|
+
if (!headerEntry || _chunkX7BGCIJNcjs.isRef.call(void 0, headerEntry)) return;
|
|
770
770
|
}
|
|
771
771
|
if (headerEntry.schema) {
|
|
772
772
|
const header = headerEntry;
|
|
773
773
|
let headerSchema = header.schema;
|
|
774
774
|
if (!headerSchema) return;
|
|
775
|
-
if (
|
|
776
|
-
headerSchema =
|
|
777
|
-
if (!headerSchema ||
|
|
775
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, headerSchema)) {
|
|
776
|
+
headerSchema = _chunkNASFWOIScjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
|
|
777
|
+
if (!headerSchema || _chunkX7BGCIJNcjs.isRef.call(void 0, headerSchema)) return;
|
|
778
778
|
}
|
|
779
|
-
headersSchema.properties[key] =
|
|
779
|
+
headersSchema.properties[key] = _chunkNASFWOIScjs.toJSONSchema.call(void 0, _chunkNASFWOIScjs.cloneObject.call(void 0, headerSchema), {
|
|
780
780
|
addEnumsToDescriptions: true,
|
|
781
781
|
...schemaOptions
|
|
782
782
|
});
|
|
@@ -830,32 +830,32 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
830
830
|
}
|
|
831
831
|
if (preferredContentType) {
|
|
832
832
|
if (contentTypes.includes(preferredContentType)) {
|
|
833
|
-
const schema2 =
|
|
833
|
+
const schema2 = _chunkNASFWOIScjs.cloneObject.call(void 0, content[preferredContentType].schema);
|
|
834
834
|
if (!schema2) {
|
|
835
835
|
return null;
|
|
836
836
|
}
|
|
837
|
-
return
|
|
837
|
+
return _chunkNASFWOIScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
838
838
|
}
|
|
839
839
|
return null;
|
|
840
840
|
}
|
|
841
841
|
for (let i = 0; i < contentTypes.length; i++) {
|
|
842
842
|
if (isJSON(contentTypes[i])) {
|
|
843
|
-
const schema2 =
|
|
843
|
+
const schema2 = _chunkNASFWOIScjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
|
|
844
844
|
if (!schema2) {
|
|
845
845
|
return {};
|
|
846
846
|
}
|
|
847
|
-
return
|
|
847
|
+
return _chunkNASFWOIScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
850
|
const contentType = contentTypes.shift();
|
|
851
851
|
if (!contentType) {
|
|
852
852
|
return {};
|
|
853
853
|
}
|
|
854
|
-
const schema =
|
|
854
|
+
const schema = _chunkNASFWOIScjs.cloneObject.call(void 0, content[contentType].schema);
|
|
855
855
|
if (!schema) {
|
|
856
856
|
return {};
|
|
857
857
|
}
|
|
858
|
-
return
|
|
858
|
+
return _chunkNASFWOIScjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
|
|
859
859
|
}
|
|
860
860
|
const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _64 => _64.contentType]));
|
|
861
861
|
if (_optionalChain([opts, 'optionalAccess', _65 => _65.contentType]) && !foundSchema) {
|
|
@@ -864,7 +864,7 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
864
864
|
if (foundSchema) {
|
|
865
865
|
const schema = structuredClone(foundSchema);
|
|
866
866
|
let schemaType = foundSchema.type;
|
|
867
|
-
if (schemaType === void 0 &&
|
|
867
|
+
if (schemaType === void 0 && _chunkX7BGCIJNcjs.isRef.call(void 0, foundSchema) && usedSchemas.size > 0) {
|
|
868
868
|
const resolvedSchema = usedSchemas.get(foundSchema.$ref);
|
|
869
869
|
const resolvedType = resolvedSchema && typeof resolvedSchema === "object" && "type" in resolvedSchema ? resolvedSchema.type : void 0;
|
|
870
870
|
schemaType = Array.isArray(resolvedType) ? resolvedType[0] : resolvedType;
|
|
@@ -874,23 +874,23 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
874
874
|
// able to render so instead of generating a JSON Schema with an `undefined` type we should
|
|
875
875
|
// default to `string` so there's at least *something* the end-user can interact with.
|
|
876
876
|
type: _nullishCoalesce(schemaType, () => ( "string")),
|
|
877
|
-
schema:
|
|
877
|
+
schema: _chunkNASFWOIScjs.isPrimitive.call(void 0, schema) ? schema : {
|
|
878
878
|
...schema,
|
|
879
|
-
$schema:
|
|
879
|
+
$schema: _chunkNASFWOIScjs.getSchemaVersionString.call(void 0, schema, api)
|
|
880
880
|
},
|
|
881
881
|
label: "Response body"
|
|
882
882
|
};
|
|
883
883
|
if (response.description && schemaWrapper.schema) {
|
|
884
884
|
schemaWrapper.description = response.description;
|
|
885
885
|
}
|
|
886
|
-
|
|
886
|
+
_chunkNASFWOIScjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
|
|
887
887
|
if (usedSchemas.has(ref)) {
|
|
888
888
|
return usedSchemas.get(ref);
|
|
889
889
|
}
|
|
890
890
|
try {
|
|
891
|
-
const resolved =
|
|
892
|
-
if (
|
|
893
|
-
const converted =
|
|
891
|
+
const resolved = _chunkNASFWOIScjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
|
|
892
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, resolved)) return;
|
|
893
|
+
const converted = _chunkNASFWOIScjs.toJSONSchema.call(void 0, structuredClone(resolved), {
|
|
894
894
|
...baseSchemaOptions,
|
|
895
895
|
seenRefs
|
|
896
896
|
});
|
|
@@ -900,11 +900,11 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
900
900
|
}
|
|
901
901
|
});
|
|
902
902
|
if (schemaWrapper.schema && usedSchemas.size > 0) {
|
|
903
|
-
const refsInOutput =
|
|
903
|
+
const refsInOutput = _chunkNASFWOIScjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
|
|
904
904
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
|
|
905
|
-
const referencedSchemas =
|
|
905
|
+
const referencedSchemas = _chunkNASFWOIScjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
906
906
|
if (referencedSchemas.size > 0) {
|
|
907
|
-
|
|
907
|
+
_chunkNASFWOIScjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
jsonSchema.push(schemaWrapper);
|
|
@@ -916,10 +916,10 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
916
916
|
});
|
|
917
917
|
if (headersWrapper.schema && usedSchemas.size > 0) {
|
|
918
918
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("headers"), () => ( /* @__PURE__ */ new Set()));
|
|
919
|
-
const refsInOutput =
|
|
920
|
-
const referencedSchemas =
|
|
919
|
+
const refsInOutput = _chunkNASFWOIScjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
|
|
920
|
+
const referencedSchemas = _chunkNASFWOIScjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
921
921
|
if (referencedSchemas.size > 0) {
|
|
922
|
-
|
|
922
|
+
_chunkNASFWOIScjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
jsonSchema.push(headersWrapper);
|
|
@@ -1030,8 +1030,8 @@ var Operation = class {
|
|
|
1030
1030
|
return this.schema.servers;
|
|
1031
1031
|
}
|
|
1032
1032
|
if (_optionalChain([this, 'access', _81 => _81.api, 'access', _82 => _82.paths, 'optionalAccess', _83 => _83[this.path]])) {
|
|
1033
|
-
const pathItem =
|
|
1034
|
-
if (pathItem && !
|
|
1033
|
+
const pathItem = _chunkNASFWOIScjs.dereferenceRef.call(void 0, this.api.paths[this.path], this.api);
|
|
1034
|
+
if (pathItem && !_chunkX7BGCIJNcjs.isRef.call(void 0, pathItem) && _optionalChain([pathItem, 'access', _84 => _84.servers, 'optionalAccess', _85 => _85.length])) {
|
|
1035
1035
|
return pathItem.servers;
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
@@ -1064,8 +1064,8 @@ var Operation = class {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
let types = [];
|
|
1066
1066
|
if (this.schema.requestBody) {
|
|
1067
|
-
if (
|
|
1068
|
-
this.schema.requestBody =
|
|
1067
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, this.schema.requestBody)) {
|
|
1068
|
+
this.schema.requestBody = _chunkNASFWOIScjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
|
|
1069
1069
|
}
|
|
1070
1070
|
if (this.schema.requestBody && "content" in this.schema.requestBody) {
|
|
1071
1071
|
types = Object.keys(this.schema.requestBody.content);
|
|
@@ -1076,7 +1076,7 @@ var Operation = class {
|
|
|
1076
1076
|
this.contentType = types[0];
|
|
1077
1077
|
}
|
|
1078
1078
|
types.forEach((t) => {
|
|
1079
|
-
if (
|
|
1079
|
+
if (_chunkNASFWOIScjs.matches_mimetype_default.json(t)) {
|
|
1080
1080
|
this.contentType = t;
|
|
1081
1081
|
}
|
|
1082
1082
|
});
|
|
@@ -1089,7 +1089,7 @@ var Operation = class {
|
|
|
1089
1089
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
1090
1090
|
*/
|
|
1091
1091
|
isFormUrlEncoded() {
|
|
1092
|
-
return
|
|
1092
|
+
return _chunkNASFWOIScjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
|
|
1093
1093
|
}
|
|
1094
1094
|
/**
|
|
1095
1095
|
* Checks if the current operation has a mutipart content type payload.
|
|
@@ -1098,7 +1098,7 @@ var Operation = class {
|
|
|
1098
1098
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
1099
1099
|
*/
|
|
1100
1100
|
isMultipart() {
|
|
1101
|
-
return
|
|
1101
|
+
return _chunkNASFWOIScjs.matches_mimetype_default.multipart(this.getContentType());
|
|
1102
1102
|
}
|
|
1103
1103
|
/**
|
|
1104
1104
|
* Checks if the current operation has a JSON-like content type payload.
|
|
@@ -1107,7 +1107,7 @@ var Operation = class {
|
|
|
1107
1107
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
1108
1108
|
*/
|
|
1109
1109
|
isJson() {
|
|
1110
|
-
return
|
|
1110
|
+
return _chunkNASFWOIScjs.matches_mimetype_default.json(this.getContentType());
|
|
1111
1111
|
}
|
|
1112
1112
|
/**
|
|
1113
1113
|
* Checks if the current operation has an XML content type payload.
|
|
@@ -1116,7 +1116,7 @@ var Operation = class {
|
|
|
1116
1116
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
1117
1117
|
*/
|
|
1118
1118
|
isXml() {
|
|
1119
|
-
return
|
|
1119
|
+
return _chunkNASFWOIScjs.matches_mimetype_default.xml(this.getContentType());
|
|
1120
1120
|
}
|
|
1121
1121
|
/**
|
|
1122
1122
|
* Checks if the current operation is a webhook or not.
|
|
@@ -1163,14 +1163,14 @@ var Operation = class {
|
|
|
1163
1163
|
try {
|
|
1164
1164
|
security = _optionalChain([this, 'access', _94 => _94.api, 'optionalAccess', _95 => _95.components, 'optionalAccess', _96 => _96.securitySchemes, 'optionalAccess', _97 => _97[key]]);
|
|
1165
1165
|
if (!security) return false;
|
|
1166
|
-
if (
|
|
1167
|
-
security =
|
|
1168
|
-
if (!security ||
|
|
1166
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, security)) {
|
|
1167
|
+
security = _chunkNASFWOIScjs.dereferenceRef.call(void 0, security, this.api);
|
|
1168
|
+
if (!security || _chunkX7BGCIJNcjs.isRef.call(void 0, security)) return false;
|
|
1169
1169
|
}
|
|
1170
1170
|
} catch (e6) {
|
|
1171
1171
|
return false;
|
|
1172
1172
|
}
|
|
1173
|
-
if (!security ||
|
|
1173
|
+
if (!security || _chunkX7BGCIJNcjs.isRef.call(void 0, security)) return false;
|
|
1174
1174
|
let type = null;
|
|
1175
1175
|
if (security.type === "http") {
|
|
1176
1176
|
if (security.scheme === "basic") type = "Basic";
|
|
@@ -1244,9 +1244,9 @@ var Operation = class {
|
|
|
1244
1244
|
this.headers.request = this.headers.request.concat(
|
|
1245
1245
|
this.schema.parameters.map((p) => {
|
|
1246
1246
|
let param = p;
|
|
1247
|
-
if (
|
|
1248
|
-
param =
|
|
1249
|
-
if (!param ||
|
|
1247
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, param)) {
|
|
1248
|
+
param = _chunkNASFWOIScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1249
|
+
if (!param || _chunkX7BGCIJNcjs.isRef.call(void 0, param)) return;
|
|
1250
1250
|
}
|
|
1251
1251
|
if (param.in && param.in === "header") return param.name;
|
|
1252
1252
|
return;
|
|
@@ -1257,10 +1257,10 @@ var Operation = class {
|
|
|
1257
1257
|
this.headers.response = Object.keys(this.schema.responses).map((r) => {
|
|
1258
1258
|
let response = this.schema.responses[r];
|
|
1259
1259
|
if (!response) return [];
|
|
1260
|
-
if (
|
|
1261
|
-
this.schema.responses[r] =
|
|
1260
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, response)) {
|
|
1261
|
+
this.schema.responses[r] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, response, this.api);
|
|
1262
1262
|
response = this.schema.responses[r];
|
|
1263
|
-
if (!response ||
|
|
1263
|
+
if (!response || _chunkX7BGCIJNcjs.isRef.call(void 0, response)) {
|
|
1264
1264
|
return [];
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
@@ -1270,11 +1270,11 @@ var Operation = class {
|
|
|
1270
1270
|
if (!this.headers.request.includes("Content-Type") && this.schema.requestBody) {
|
|
1271
1271
|
let requestBody = this.schema.requestBody;
|
|
1272
1272
|
if (requestBody) {
|
|
1273
|
-
if (
|
|
1274
|
-
this.schema.requestBody =
|
|
1273
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, requestBody)) {
|
|
1274
|
+
this.schema.requestBody = _chunkNASFWOIScjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1275
1275
|
requestBody = this.schema.requestBody;
|
|
1276
1276
|
}
|
|
1277
|
-
if (requestBody && !
|
|
1277
|
+
if (requestBody && !_chunkX7BGCIJNcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
|
|
1278
1278
|
this.headers.request.push("Content-Type");
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
@@ -1283,10 +1283,10 @@ var Operation = class {
|
|
|
1283
1283
|
const hasResponseContent = Object.keys(this.schema.responses).some((r) => {
|
|
1284
1284
|
let response = _optionalChain([this, 'access', _101 => _101.schema, 'access', _102 => _102.responses, 'optionalAccess', _103 => _103[r]]);
|
|
1285
1285
|
if (!response) return false;
|
|
1286
|
-
if (
|
|
1287
|
-
this.schema.responses[r] =
|
|
1286
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, response)) {
|
|
1287
|
+
this.schema.responses[r] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, response, this.api);
|
|
1288
1288
|
response = this.schema.responses[r];
|
|
1289
|
-
if (!response ||
|
|
1289
|
+
if (!response || _chunkX7BGCIJNcjs.isRef.call(void 0, response)) {
|
|
1290
1290
|
return false;
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
@@ -1393,17 +1393,17 @@ var Operation = class {
|
|
|
1393
1393
|
getParameters() {
|
|
1394
1394
|
let parameters = (_optionalChain([this, 'access', _106 => _106.schema, 'optionalAccess', _107 => _107.parameters]) || []).map((p) => {
|
|
1395
1395
|
let param = p;
|
|
1396
|
-
if (
|
|
1397
|
-
param =
|
|
1398
|
-
if (!param ||
|
|
1396
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, param)) {
|
|
1397
|
+
param = _chunkNASFWOIScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1398
|
+
if (!param || _chunkX7BGCIJNcjs.isRef.call(void 0, param)) return;
|
|
1399
1399
|
}
|
|
1400
1400
|
return param;
|
|
1401
1401
|
}).filter((param) => param !== void 0);
|
|
1402
1402
|
const commonParams = (_optionalChain([this, 'access', _108 => _108.getCommonParameterContainer, 'call', _109 => _109(), 'optionalAccess', _110 => _110.parameters]) || []).map((p) => {
|
|
1403
1403
|
let param = p;
|
|
1404
|
-
if (
|
|
1405
|
-
param =
|
|
1406
|
-
if (!param ||
|
|
1404
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, param)) {
|
|
1405
|
+
param = _chunkNASFWOIScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1406
|
+
if (!param || _chunkX7BGCIJNcjs.isRef.call(void 0, param)) return;
|
|
1407
1407
|
}
|
|
1408
1408
|
return param;
|
|
1409
1409
|
}).filter((param) => param !== void 0);
|
|
@@ -1417,8 +1417,8 @@ var Operation = class {
|
|
|
1417
1417
|
* parameters defined on a referenced Path Item (including `components.pathItems`) remain visible.
|
|
1418
1418
|
*/
|
|
1419
1419
|
getCommonParameterContainer() {
|
|
1420
|
-
const pathItem =
|
|
1421
|
-
if (!pathItem ||
|
|
1420
|
+
const pathItem = _chunkNASFWOIScjs.dereferenceRef.call(void 0, _optionalChain([this, 'access', _111 => _111.api, 'optionalAccess', _112 => _112.paths, 'optionalAccess', _113 => _113[this.path]]), this.api);
|
|
1421
|
+
if (!pathItem || _chunkX7BGCIJNcjs.isRef.call(void 0, pathItem)) {
|
|
1422
1422
|
return void 0;
|
|
1423
1423
|
}
|
|
1424
1424
|
return pathItem;
|
|
@@ -1445,8 +1445,8 @@ var Operation = class {
|
|
|
1445
1445
|
*
|
|
1446
1446
|
*/
|
|
1447
1447
|
getParametersAsJSONSchema(opts = {}) {
|
|
1448
|
-
|
|
1449
|
-
return
|
|
1448
|
+
_chunkNASFWOIScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1449
|
+
return _chunkNASFWOIScjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
|
|
1450
1450
|
includeDiscriminatorMappingRefs: true,
|
|
1451
1451
|
...opts
|
|
1452
1452
|
});
|
|
@@ -1465,7 +1465,7 @@ var Operation = class {
|
|
|
1465
1465
|
* this content-type, the function will return null.
|
|
1466
1466
|
*/
|
|
1467
1467
|
getResponseAsJSONSchema(statusCode, opts = {}) {
|
|
1468
|
-
|
|
1468
|
+
_chunkNASFWOIScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1469
1469
|
return getResponseAsJSONSchema(this, this.api, statusCode, {
|
|
1470
1470
|
includeDiscriminatorMappingRefs: true,
|
|
1471
1471
|
...opts
|
|
@@ -1477,9 +1477,9 @@ var Operation = class {
|
|
|
1477
1477
|
*/
|
|
1478
1478
|
getResponseStatusCodes() {
|
|
1479
1479
|
if (!this.schema.responses) return [];
|
|
1480
|
-
if (
|
|
1481
|
-
this.schema.responses =
|
|
1482
|
-
if (!this.schema.responses ||
|
|
1480
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1481
|
+
this.schema.responses = _chunkNASFWOIScjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
|
|
1482
|
+
if (!this.schema.responses || _chunkX7BGCIJNcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1483
1483
|
return [];
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
@@ -1503,9 +1503,9 @@ var Operation = class {
|
|
|
1503
1503
|
Object.values(this.schema.responses).forEach((response) => {
|
|
1504
1504
|
let resp = response;
|
|
1505
1505
|
if (!resp) return;
|
|
1506
|
-
if (
|
|
1507
|
-
resp =
|
|
1508
|
-
if (!resp ||
|
|
1506
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, resp)) {
|
|
1507
|
+
resp = _chunkNASFWOIScjs.dereferenceRef.call(void 0, resp, this.api);
|
|
1508
|
+
if (!resp || _chunkX7BGCIJNcjs.isRef.call(void 0, resp)) {
|
|
1509
1509
|
return;
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
@@ -1532,10 +1532,10 @@ var Operation = class {
|
|
|
1532
1532
|
getResolvedRequestBody() {
|
|
1533
1533
|
let requestBody = this.schema.requestBody;
|
|
1534
1534
|
if (!requestBody) return false;
|
|
1535
|
-
if (
|
|
1536
|
-
this.schema.requestBody =
|
|
1535
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, requestBody)) {
|
|
1536
|
+
this.schema.requestBody = _chunkNASFWOIScjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1537
1537
|
requestBody = this.schema.requestBody;
|
|
1538
|
-
if (!requestBody ||
|
|
1538
|
+
if (!requestBody || _chunkX7BGCIJNcjs.isRef.call(void 0, requestBody)) {
|
|
1539
1539
|
return false;
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
@@ -1607,7 +1607,7 @@ var Operation = class {
|
|
|
1607
1607
|
let availableMediaType;
|
|
1608
1608
|
const mediaTypes = this.getRequestBodyMediaTypes();
|
|
1609
1609
|
mediaTypes.forEach((mt) => {
|
|
1610
|
-
if (!availableMediaType &&
|
|
1610
|
+
if (!availableMediaType && _chunkNASFWOIScjs.matches_mimetype_default.json(mt)) {
|
|
1611
1611
|
availableMediaType = mt;
|
|
1612
1612
|
}
|
|
1613
1613
|
});
|
|
@@ -1654,10 +1654,10 @@ var Operation = class {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
let response = this.schema.responses[statusCode];
|
|
1656
1656
|
if (!response) return false;
|
|
1657
|
-
if (
|
|
1658
|
-
this.schema.responses[statusCode] =
|
|
1657
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, response)) {
|
|
1658
|
+
this.schema.responses[statusCode] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, response, this.api);
|
|
1659
1659
|
response = this.schema.responses[statusCode];
|
|
1660
|
-
if (!response ||
|
|
1660
|
+
if (!response || _chunkX7BGCIJNcjs.isRef.call(void 0, response)) {
|
|
1661
1661
|
return false;
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
@@ -1698,26 +1698,27 @@ var Operation = class {
|
|
|
1698
1698
|
if (!this.schema.callbacks) return false;
|
|
1699
1699
|
let callbackObj = this.schema.callbacks[identifier];
|
|
1700
1700
|
if (!callbackObj) return false;
|
|
1701
|
-
if (
|
|
1702
|
-
this.schema.callbacks[identifier] =
|
|
1701
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, callbackObj)) {
|
|
1702
|
+
this.schema.callbacks[identifier] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, callbackObj, this.api);
|
|
1703
1703
|
callbackObj = this.schema.callbacks[identifier];
|
|
1704
|
-
if (!callbackObj ||
|
|
1704
|
+
if (!callbackObj || _chunkX7BGCIJNcjs.isRef.call(void 0, callbackObj)) {
|
|
1705
1705
|
return false;
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
1708
|
let callback = callbackObj[expression];
|
|
1709
1709
|
if (!callback) return false;
|
|
1710
|
-
if (
|
|
1711
|
-
callbackObj[expression] =
|
|
1710
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, callback)) {
|
|
1711
|
+
callbackObj[expression] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, callback, this.api);
|
|
1712
1712
|
callback = callbackObj[expression];
|
|
1713
|
-
if (!callback ||
|
|
1713
|
+
if (!callback || _chunkX7BGCIJNcjs.isRef.call(void 0, callback)) {
|
|
1714
1714
|
return false;
|
|
1715
1715
|
}
|
|
1716
1716
|
}
|
|
1717
|
-
|
|
1717
|
+
const callbackPathItem = callback;
|
|
1718
|
+
if (!callbackPathItem[method]) {
|
|
1718
1719
|
return false;
|
|
1719
1720
|
}
|
|
1720
|
-
return new Callback(this.oas, expression, method,
|
|
1721
|
+
return new Callback(this.oas, expression, method, callbackPathItem[method], identifier, callback);
|
|
1721
1722
|
}
|
|
1722
1723
|
/**
|
|
1723
1724
|
* Retrieve an array of operations created from each callback.
|
|
@@ -1731,25 +1732,25 @@ var Operation = class {
|
|
|
1731
1732
|
Object.keys(this.schema.callbacks).forEach((callback) => {
|
|
1732
1733
|
let cb = _optionalChain([this, 'access', _122 => _122.schema, 'access', _123 => _123.callbacks, 'optionalAccess', _124 => _124[callback]]);
|
|
1733
1734
|
if (!cb) return;
|
|
1734
|
-
if (
|
|
1735
|
-
this.schema.callbacks[callback] =
|
|
1735
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, cb)) {
|
|
1736
|
+
this.schema.callbacks[callback] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, cb, this.api);
|
|
1736
1737
|
cb = this.schema.callbacks[callback];
|
|
1737
|
-
if (!cb ||
|
|
1738
|
+
if (!cb || _chunkX7BGCIJNcjs.isRef.call(void 0, cb)) {
|
|
1738
1739
|
return;
|
|
1739
1740
|
}
|
|
1740
1741
|
}
|
|
1741
1742
|
Object.keys(cb).forEach((expression) => {
|
|
1742
1743
|
let callbackPath = cb[expression];
|
|
1743
1744
|
if (!callbackPath) return;
|
|
1744
|
-
if (
|
|
1745
|
-
cb[expression] =
|
|
1745
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, callbackPath)) {
|
|
1746
|
+
cb[expression] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, callbackPath, this.api);
|
|
1746
1747
|
callbackPath = cb[expression];
|
|
1747
|
-
if (!callbackPath ||
|
|
1748
|
+
if (!callbackPath || _chunkX7BGCIJNcjs.isRef.call(void 0, callbackPath)) {
|
|
1748
1749
|
return;
|
|
1749
1750
|
}
|
|
1750
1751
|
}
|
|
1751
1752
|
Object.keys(callbackPath).forEach((method) => {
|
|
1752
|
-
if (!
|
|
1753
|
+
if (!_chunkNASFWOIScjs.supportedMethods.includes(method)) return;
|
|
1753
1754
|
const found = this.getCallback(callback, expression, method);
|
|
1754
1755
|
if (found) {
|
|
1755
1756
|
callbacks.push(found);
|
|
@@ -1872,17 +1873,17 @@ var Callback = class extends Operation {
|
|
|
1872
1873
|
getParameters() {
|
|
1873
1874
|
let parameters = (_optionalChain([this, 'access', _131 => _131.schema, 'optionalAccess', _132 => _132.parameters]) || []).map((p) => {
|
|
1874
1875
|
let param = p;
|
|
1875
|
-
if (
|
|
1876
|
-
param =
|
|
1877
|
-
if (!param ||
|
|
1876
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, param)) {
|
|
1877
|
+
param = _chunkNASFWOIScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1878
|
+
if (!param || _chunkX7BGCIJNcjs.isRef.call(void 0, param)) return;
|
|
1878
1879
|
}
|
|
1879
1880
|
return param;
|
|
1880
1881
|
}).filter((param) => param !== void 0);
|
|
1881
1882
|
const commonParams = (this.parentSchema.parameters || []).map((p) => {
|
|
1882
1883
|
let param = p;
|
|
1883
|
-
if (
|
|
1884
|
-
param =
|
|
1885
|
-
if (!param ||
|
|
1884
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, param)) {
|
|
1885
|
+
param = _chunkNASFWOIScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1886
|
+
if (!param || _chunkX7BGCIJNcjs.isRef.call(void 0, param)) return;
|
|
1886
1887
|
}
|
|
1887
1888
|
return param;
|
|
1888
1889
|
}).filter((param) => param !== void 0);
|
|
@@ -1898,8 +1899,8 @@ var Webhook = class extends Operation {
|
|
|
1898
1899
|
* defined on a referenced Path Item remain visible.
|
|
1899
1900
|
*/
|
|
1900
1901
|
getCommonParameterContainer() {
|
|
1901
|
-
const pathItem =
|
|
1902
|
-
if (!pathItem ||
|
|
1902
|
+
const pathItem = _chunkNASFWOIScjs.dereferenceRef.call(void 0, _optionalChain([this, 'access', _133 => _133.api, 'optionalAccess', _134 => _134.webhooks, 'optionalAccess', _135 => _135[this.path]]), this.api);
|
|
1903
|
+
if (!pathItem || _chunkX7BGCIJNcjs.isRef.call(void 0, pathItem)) {
|
|
1903
1904
|
return void 0;
|
|
1904
1905
|
}
|
|
1905
1906
|
return pathItem;
|
|
@@ -1917,8 +1918,8 @@ var Webhook = class extends Operation {
|
|
|
1917
1918
|
return void 0;
|
|
1918
1919
|
}
|
|
1919
1920
|
let webhookPath = this.api.webhooks[this.path];
|
|
1920
|
-
if (
|
|
1921
|
-
this.api.webhooks[this.path] =
|
|
1921
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, webhookPath)) {
|
|
1922
|
+
this.api.webhooks[this.path] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1922
1923
|
webhookPath = this.api.webhooks[this.path];
|
|
1923
1924
|
}
|
|
1924
1925
|
return _optionalChain([webhookPath, 'optionalAccess', _138 => _138.summary]);
|
|
@@ -1936,8 +1937,8 @@ var Webhook = class extends Operation {
|
|
|
1936
1937
|
return void 0;
|
|
1937
1938
|
}
|
|
1938
1939
|
let webhookPath = this.api.webhooks[this.path];
|
|
1939
|
-
if (
|
|
1940
|
-
this.api.webhooks[this.path] =
|
|
1940
|
+
if (_chunkX7BGCIJNcjs.isRef.call(void 0, webhookPath)) {
|
|
1941
|
+
this.api.webhooks[this.path] = _chunkNASFWOIScjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1941
1942
|
webhookPath = this.api.webhooks[this.path];
|
|
1942
1943
|
}
|
|
1943
1944
|
return _optionalChain([webhookPath, 'optionalAccess', _141 => _141.description]);
|
|
@@ -1972,4 +1973,4 @@ exports.getUserVariable = getUserVariable; exports.stripTrailingSlash = stripTra
|
|
|
1972
1973
|
* @license Apache-2.0
|
|
1973
1974
|
* @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
|
|
1974
1975
|
*/
|
|
1975
|
-
//# sourceMappingURL=chunk-
|
|
1976
|
+
//# sourceMappingURL=chunk-EUTXEYKF.cjs.map
|