oas 38.4.0 → 38.5.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 +16 -16
- package/dist/analyzer/index.js +2 -2
- package/dist/{chunk-Y64TRECN.cjs → chunk-2F2OPV5M.cjs} +72 -72
- package/dist/{chunk-Y64TRECN.cjs.map → chunk-2F2OPV5M.cjs.map} +1 -1
- package/dist/{chunk-ANZIKNVX.js → chunk-6D7GWVEH.js} +2 -2
- package/dist/{chunk-Z2WDQGCU.cjs → chunk-6DVSNS26.cjs} +12 -12
- package/dist/{chunk-Z2WDQGCU.cjs.map → chunk-6DVSNS26.cjs.map} +1 -1
- package/dist/{chunk-7WBPPWYI.cjs → chunk-6GTPCWO5.cjs} +3 -3
- package/dist/{chunk-7WBPPWYI.cjs.map → chunk-6GTPCWO5.cjs.map} +1 -1
- package/dist/{chunk-LZNTJ4ZR.js → chunk-DYHV2B4Z.js} +4 -1
- package/dist/chunk-DYHV2B4Z.js.map +1 -0
- package/dist/{chunk-6HXOZ5GY.cjs → chunk-EARDDQSB.cjs} +5 -2
- package/dist/chunk-EARDDQSB.cjs.map +1 -0
- package/dist/{chunk-4CWJNFV5.js → chunk-MR33ELUC.js} +3 -3
- package/dist/{chunk-5ZBXVQYR.js → chunk-TU6UPWO6.js} +3 -3
- package/dist/extensions.cjs +4 -2
- package/dist/extensions.cjs.map +1 -1
- package/dist/extensions.d.cts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +3 -1
- package/dist/index.cjs +50 -50
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +3 -3
- package/dist/operation/index.cjs +4 -4
- package/dist/operation/index.js +3 -3
- package/dist/pruner/index.cjs +5 -5
- package/dist/pruner/index.js +4 -4
- package/dist/reducer/index.cjs +5 -5
- package/dist/reducer/index.js +4 -4
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-6HXOZ5GY.cjs.map +0 -1
- package/dist/chunk-LZNTJ4ZR.js.map +0 -1
- /package/dist/{chunk-ANZIKNVX.js.map → chunk-6D7GWVEH.js.map} +0 -0
- /package/dist/{chunk-4CWJNFV5.js.map → chunk-MR33ELUC.js.map} +0 -0
- /package/dist/{chunk-5ZBXVQYR.js.map → chunk-TU6UPWO6.js.map} +0 -0
package/dist/analyzer/index.cjs
CHANGED
|
@@ -7,8 +7,8 @@ var _chunkCOHEPMUPcjs = require('../chunk-COHEPMUP.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
require('../chunk-
|
|
10
|
+
var _chunk6GTPCWO5cjs = require('../chunk-6GTPCWO5.cjs');
|
|
11
|
+
require('../chunk-EARDDQSB.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunk7PWF3F2Wcjs = require('../chunk-7PWF3F2W.cjs');
|
|
@@ -127,14 +127,14 @@ function accumulateReachableRefs(definition, seeds) {
|
|
|
127
127
|
reachable.add(ref);
|
|
128
128
|
let resolved;
|
|
129
129
|
try {
|
|
130
|
-
resolved = _jsonpointer2.default.get(definition,
|
|
130
|
+
resolved = _jsonpointer2.default.get(definition, _chunk6GTPCWO5cjs.toPointer.call(void 0, ref));
|
|
131
131
|
} catch (e) {
|
|
132
132
|
continue;
|
|
133
133
|
}
|
|
134
134
|
if (resolved === void 0) {
|
|
135
135
|
continue;
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
_chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, resolved).forEach((nestedRef) => {
|
|
138
138
|
if (!reachable.has(nestedRef)) {
|
|
139
139
|
queue.push(nestedRef);
|
|
140
140
|
}
|
|
@@ -144,7 +144,7 @@ function accumulateReachableRefs(definition, seeds) {
|
|
|
144
144
|
}
|
|
145
145
|
function buildAnchors(rootPointer, extraPointers, reachableRefs) {
|
|
146
146
|
const anchors = [rootPointer, ...extraPointers];
|
|
147
|
-
reachableRefs.forEach((ref) => anchors.push(
|
|
147
|
+
reachableRefs.forEach((ref) => anchors.push(_chunk6GTPCWO5cjs.toPointer.call(void 0, ref)));
|
|
148
148
|
return { anchors, anchorPrefixes: anchors.map((anchor) => `${anchor}/`) };
|
|
149
149
|
}
|
|
150
150
|
function collectSecuritySchemeRefs(security) {
|
|
@@ -168,16 +168,16 @@ function computeOperationScope(definition, path, method) {
|
|
|
168
168
|
}
|
|
169
169
|
const pathItem = definition.paths[pathKey] || {};
|
|
170
170
|
const methodKey = resolveKey(Object.keys(pathItem), method);
|
|
171
|
-
if (!methodKey || !
|
|
171
|
+
if (!methodKey || !_chunk6GTPCWO5cjs.supportedMethods.includes(methodKey.toLowerCase())) {
|
|
172
172
|
throw new Error(`Operation \`${method} ${path}\` not found.`);
|
|
173
173
|
}
|
|
174
174
|
const operation = pathItem[methodKey];
|
|
175
|
-
const rootPointer = `/paths/${
|
|
175
|
+
const rootPointer = `/paths/${_chunk6GTPCWO5cjs.encodePointer.call(void 0, pathKey)}/${methodKey}`;
|
|
176
176
|
const extraPointers = [];
|
|
177
|
-
const seeds = new Set(
|
|
177
|
+
const seeds = new Set(_chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, operation));
|
|
178
178
|
if (pathItem.parameters) {
|
|
179
|
-
extraPointers.push(`/paths/${
|
|
180
|
-
|
|
179
|
+
extraPointers.push(`/paths/${_chunk6GTPCWO5cjs.encodePointer.call(void 0, pathKey)}/parameters`);
|
|
180
|
+
_chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, pathItem.parameters).forEach((ref) => seeds.add(ref));
|
|
181
181
|
}
|
|
182
182
|
const security = "security" in operation ? operation.security : definition.security;
|
|
183
183
|
collectSecuritySchemeRefs(security).forEach((ref) => seeds.add(ref));
|
|
@@ -192,16 +192,16 @@ function computeWebhookScope(definition, webhookName, method) {
|
|
|
192
192
|
}
|
|
193
193
|
const webhook = webhooks2[webhookKey] || {};
|
|
194
194
|
const methodKey = resolveKey(Object.keys(webhook), method);
|
|
195
|
-
if (!methodKey || !
|
|
195
|
+
if (!methodKey || !_chunk6GTPCWO5cjs.supportedMethods.includes(methodKey.toLowerCase())) {
|
|
196
196
|
throw new Error(`Webhook operation \`${method} ${webhookName}\` not found.`);
|
|
197
197
|
}
|
|
198
198
|
const operation = webhook[methodKey];
|
|
199
|
-
const rootPointer = `/webhooks/${
|
|
199
|
+
const rootPointer = `/webhooks/${_chunk6GTPCWO5cjs.encodePointer.call(void 0, webhookKey)}/${methodKey}`;
|
|
200
200
|
const extraPointers = [];
|
|
201
|
-
const seeds = new Set(
|
|
201
|
+
const seeds = new Set(_chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, operation));
|
|
202
202
|
if (webhook.parameters) {
|
|
203
|
-
extraPointers.push(`/webhooks/${
|
|
204
|
-
|
|
203
|
+
extraPointers.push(`/webhooks/${_chunk6GTPCWO5cjs.encodePointer.call(void 0, webhookKey)}/parameters`);
|
|
204
|
+
_chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, webhook.parameters).forEach((ref) => seeds.add(ref));
|
|
205
205
|
}
|
|
206
206
|
const security = "security" in operation ? operation.security : definition.security;
|
|
207
207
|
collectSecuritySchemeRefs(security).forEach((ref) => seeds.add(ref));
|
|
@@ -392,7 +392,7 @@ async function buildAnalysis(definition, query2, scope) {
|
|
|
392
392
|
}
|
|
393
393
|
if (!query2 || query2.includes("circularRefs")) {
|
|
394
394
|
const { circularRefs: dereferencedCircularRefs } = await dereferenceOasShared(definition);
|
|
395
|
-
const circularRefs = (scope ? dereferencedCircularRefs.filter((ref) => isPointerInScope(
|
|
395
|
+
const circularRefs = (scope ? dereferencedCircularRefs.filter((ref) => isPointerInScope(_chunk6GTPCWO5cjs.toPointer.call(void 0, ref), scope)) : [...dereferencedCircularRefs]).toSorted();
|
|
396
396
|
analysis.circularRefs = {
|
|
397
397
|
present: !!circularRefs.length,
|
|
398
398
|
locations: circularRefs
|
package/dist/analyzer/index.js
CHANGED
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk6GTPCWO5cjs = require('./chunk-6GTPCWO5.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkEARDDQSBcjs = require('./chunk-EARDDQSB.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _chunk7PWF3F2Wcjs = require('./chunk-7PWF3F2W.cjs');
|
|
@@ -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(_chunk6GTPCWO5cjs.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);
|
|
@@ -238,7 +238,7 @@ function usesPolymorphism(schema) {
|
|
|
238
238
|
return false;
|
|
239
239
|
}
|
|
240
240
|
function objectify(thing) {
|
|
241
|
-
if (!
|
|
241
|
+
if (!_chunk6GTPCWO5cjs.isObject.call(void 0, thing)) {
|
|
242
242
|
return {};
|
|
243
243
|
}
|
|
244
244
|
return thing;
|
|
@@ -303,7 +303,7 @@ function sampleFromSchema(schema, opts = {}) {
|
|
|
303
303
|
if (seenRefs.has(refToRelease)) {
|
|
304
304
|
return void 0;
|
|
305
305
|
}
|
|
306
|
-
objectifySchema =
|
|
306
|
+
objectifySchema = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
|
|
307
307
|
if (!objectifySchema || _chunk7PWF3F2Wcjs.isRef.call(void 0, objectifySchema)) {
|
|
308
308
|
return void 0;
|
|
309
309
|
}
|
|
@@ -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 _chunk6GTPCWO5cjs.dereferenceRefDeep.call(void 0, example, opts.definition, seenRefs);
|
|
325
325
|
}
|
|
326
326
|
const hasPolymorphism = usesPolymorphism(schema);
|
|
327
327
|
if (hasPolymorphism === "allOf") {
|
|
@@ -330,7 +330,7 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
330
330
|
const resolvedAllOf = schema.allOf.map((subSchema) => {
|
|
331
331
|
let sub = objectify(subSchema);
|
|
332
332
|
if (definition && _chunk7PWF3F2Wcjs.isRef.call(void 0, sub)) {
|
|
333
|
-
const resolved =
|
|
333
|
+
const resolved = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
|
|
334
334
|
if (resolved && !_chunk7PWF3F2Wcjs.isRef.call(void 0, resolved)) {
|
|
335
335
|
sub = resolved;
|
|
336
336
|
}
|
|
@@ -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 = _chunk6GTPCWO5cjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
|
|
445
|
+
if (mediaTypeObject.example === void 0 || _chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
|
|
446
446
|
return [];
|
|
447
447
|
}
|
|
448
448
|
return [
|
|
@@ -458,7 +458,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
458
458
|
let example = examples[key];
|
|
459
459
|
if (example !== null && typeof example === "object") {
|
|
460
460
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, example)) {
|
|
461
|
-
example =
|
|
461
|
+
example = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, example, definition);
|
|
462
462
|
if (!example || _chunk7PWF3F2Wcjs.isRef.call(void 0, example)) {
|
|
463
463
|
return false;
|
|
464
464
|
}
|
|
@@ -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 = _chunk6GTPCWO5cjs.dereferenceRefDeep.call(void 0, example.value, definition);
|
|
474
|
+
if (example.value === void 0 || _chunk6GTPCWO5cjs.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 (!_chunk6GTPCWO5cjs.matches_mimetype_default.xml(mediaType)) {
|
|
492
492
|
return [
|
|
493
493
|
{
|
|
494
494
|
value: sampleFromSchema(structuredClone(mediaTypeObject.schema), {
|
|
@@ -509,7 +509,7 @@ function getResponseExamples(operation, definition) {
|
|
|
509
509
|
let onlyHeaders = false;
|
|
510
510
|
if (!response) return false;
|
|
511
511
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, response)) {
|
|
512
|
-
response =
|
|
512
|
+
response = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, response, definition);
|
|
513
513
|
if (!response || _chunk7PWF3F2Wcjs.isRef.call(void 0, response)) return false;
|
|
514
514
|
}
|
|
515
515
|
const mediaTypes = {};
|
|
@@ -549,14 +549,14 @@ function getCallbackExamples(operation, definition) {
|
|
|
549
549
|
let callback = _optionalChain([operation, 'access', _34 => _34.callbacks, 'optionalAccess', _35 => _35[identifier]]);
|
|
550
550
|
if (!callback) return [];
|
|
551
551
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, callback)) {
|
|
552
|
-
callback =
|
|
552
|
+
callback = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, callback, definition);
|
|
553
553
|
if (!callback || _chunk7PWF3F2Wcjs.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
558
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, callbackPath)) {
|
|
559
|
-
callbackPath =
|
|
559
|
+
callbackPath = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, callbackPath, definition);
|
|
560
560
|
if (!callbackPath || _chunk7PWF3F2Wcjs.isRef.call(void 0, callbackPath)) return [];
|
|
561
561
|
}
|
|
562
562
|
return Object.keys(callbackPath).map((method) => {
|
|
@@ -605,7 +605,7 @@ function getDefaultName(sample, count) {
|
|
|
605
605
|
function getExampleGroups(operation) {
|
|
606
606
|
const namelessCodeSampleCounts = {};
|
|
607
607
|
const groups = {};
|
|
608
|
-
const codeSamples =
|
|
608
|
+
const codeSamples = _chunkEARDDQSBcjs.getExtension.call(void 0, "code-samples", operation.api, operation);
|
|
609
609
|
_optionalChain([codeSamples, 'optionalAccess', _36 => _36.forEach, 'call', _37 => _37((sample, i) => {
|
|
610
610
|
if (namelessCodeSampleCounts[sample.language]) {
|
|
611
611
|
namelessCodeSampleCounts[sample.language] += 1;
|
|
@@ -639,7 +639,7 @@ function getExampleGroups(operation) {
|
|
|
639
639
|
Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
|
|
640
640
|
let example = paramExample;
|
|
641
641
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, example)) {
|
|
642
|
-
example =
|
|
642
|
+
example = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, example, operation.api);
|
|
643
643
|
if (!example || _chunk7PWF3F2Wcjs.isRef.call(void 0, example)) return;
|
|
644
644
|
}
|
|
645
645
|
groups[exampleKey] = {
|
|
@@ -687,7 +687,7 @@ function getRequestBodyExamples(operation, definition) {
|
|
|
687
687
|
if (!requestBody) {
|
|
688
688
|
return [];
|
|
689
689
|
} else if (_chunk7PWF3F2Wcjs.isRef.call(void 0, requestBody)) {
|
|
690
|
-
requestBody =
|
|
690
|
+
requestBody = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, requestBody, definition);
|
|
691
691
|
}
|
|
692
692
|
if (!requestBody || _chunk7PWF3F2Wcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
|
|
693
693
|
return [];
|
|
@@ -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 = _chunk6GTPCWO5cjs.matches_mimetype_default.json;
|
|
756
756
|
function buildHeadersSchema(response, schemaOptions) {
|
|
757
757
|
const headersSchema = {
|
|
758
758
|
type: "object",
|
|
@@ -765,7 +765,7 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
765
765
|
let headerEntry = _optionalChain([response, 'access', _62 => _62.headers, 'optionalAccess', _63 => _63[key]]);
|
|
766
766
|
if (!headerEntry) return;
|
|
767
767
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, headerEntry)) {
|
|
768
|
-
headerEntry =
|
|
768
|
+
headerEntry = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
|
|
769
769
|
if (!headerEntry || _chunk7PWF3F2Wcjs.isRef.call(void 0, headerEntry)) return;
|
|
770
770
|
}
|
|
771
771
|
if (headerEntry.schema) {
|
|
@@ -773,10 +773,10 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
773
773
|
let headerSchema = header.schema;
|
|
774
774
|
if (!headerSchema) return;
|
|
775
775
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, headerSchema)) {
|
|
776
|
-
headerSchema =
|
|
776
|
+
headerSchema = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
|
|
777
777
|
if (!headerSchema || _chunk7PWF3F2Wcjs.isRef.call(void 0, headerSchema)) return;
|
|
778
778
|
}
|
|
779
|
-
headersSchema.properties[key] =
|
|
779
|
+
headersSchema.properties[key] = _chunk6GTPCWO5cjs.toJSONSchema.call(void 0, _chunk6GTPCWO5cjs.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 = _chunk6GTPCWO5cjs.cloneObject.call(void 0, content[preferredContentType].schema);
|
|
834
834
|
if (!schema2) {
|
|
835
835
|
return null;
|
|
836
836
|
}
|
|
837
|
-
return
|
|
837
|
+
return _chunk6GTPCWO5cjs.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 = _chunk6GTPCWO5cjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
|
|
844
844
|
if (!schema2) {
|
|
845
845
|
return {};
|
|
846
846
|
}
|
|
847
|
-
return
|
|
847
|
+
return _chunk6GTPCWO5cjs.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 = _chunk6GTPCWO5cjs.cloneObject.call(void 0, content[contentType].schema);
|
|
855
855
|
if (!schema) {
|
|
856
856
|
return {};
|
|
857
857
|
}
|
|
858
|
-
return
|
|
858
|
+
return _chunk6GTPCWO5cjs.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) {
|
|
@@ -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: _chunk6GTPCWO5cjs.isPrimitive.call(void 0, schema) ? schema : {
|
|
878
878
|
...schema,
|
|
879
|
-
$schema:
|
|
879
|
+
$schema: _chunk6GTPCWO5cjs.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
|
+
_chunk6GTPCWO5cjs.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 =
|
|
891
|
+
const resolved = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
|
|
892
892
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, resolved)) return;
|
|
893
|
-
const converted =
|
|
893
|
+
const converted = _chunk6GTPCWO5cjs.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 = _chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
|
|
904
904
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
|
|
905
|
-
const referencedSchemas =
|
|
905
|
+
const referencedSchemas = _chunk6GTPCWO5cjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
906
906
|
if (referencedSchemas.size > 0) {
|
|
907
|
-
|
|
907
|
+
_chunk6GTPCWO5cjs.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 = _chunk6GTPCWO5cjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
|
|
920
|
+
const referencedSchemas = _chunk6GTPCWO5cjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
921
921
|
if (referencedSchemas.size > 0) {
|
|
922
|
-
|
|
922
|
+
_chunk6GTPCWO5cjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
jsonSchema.push(headersWrapper);
|
|
@@ -1030,7 +1030,7 @@ 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 =
|
|
1033
|
+
const pathItem = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, this.api.paths[this.path], this.api);
|
|
1034
1034
|
if (pathItem && !_chunk7PWF3F2Wcjs.isRef.call(void 0, pathItem) && _optionalChain([pathItem, 'access', _84 => _84.servers, 'optionalAccess', _85 => _85.length])) {
|
|
1035
1035
|
return pathItem.servers;
|
|
1036
1036
|
}
|
|
@@ -1065,7 +1065,7 @@ var Operation = class {
|
|
|
1065
1065
|
let types = [];
|
|
1066
1066
|
if (this.schema.requestBody) {
|
|
1067
1067
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, this.schema.requestBody)) {
|
|
1068
|
-
this.schema.requestBody =
|
|
1068
|
+
this.schema.requestBody = _chunk6GTPCWO5cjs.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 (_chunk6GTPCWO5cjs.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 _chunk6GTPCWO5cjs.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 _chunk6GTPCWO5cjs.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 _chunk6GTPCWO5cjs.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 _chunk6GTPCWO5cjs.matches_mimetype_default.xml(this.getContentType());
|
|
1120
1120
|
}
|
|
1121
1121
|
/**
|
|
1122
1122
|
* Checks if the current operation is a webhook or not.
|
|
@@ -1164,7 +1164,7 @@ var Operation = class {
|
|
|
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
1166
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, security)) {
|
|
1167
|
-
security =
|
|
1167
|
+
security = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, security, this.api);
|
|
1168
1168
|
if (!security || _chunk7PWF3F2Wcjs.isRef.call(void 0, security)) return false;
|
|
1169
1169
|
}
|
|
1170
1170
|
} catch (e6) {
|
|
@@ -1245,7 +1245,7 @@ var Operation = class {
|
|
|
1245
1245
|
this.schema.parameters.map((p) => {
|
|
1246
1246
|
let param = p;
|
|
1247
1247
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, param)) {
|
|
1248
|
-
param =
|
|
1248
|
+
param = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, param, this.api);
|
|
1249
1249
|
if (!param || _chunk7PWF3F2Wcjs.isRef.call(void 0, param)) return;
|
|
1250
1250
|
}
|
|
1251
1251
|
if (param.in && param.in === "header") return param.name;
|
|
@@ -1258,7 +1258,7 @@ var Operation = class {
|
|
|
1258
1258
|
let response = this.schema.responses[r];
|
|
1259
1259
|
if (!response) return [];
|
|
1260
1260
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, response)) {
|
|
1261
|
-
this.schema.responses[r] =
|
|
1261
|
+
this.schema.responses[r] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, response, this.api);
|
|
1262
1262
|
response = this.schema.responses[r];
|
|
1263
1263
|
if (!response || _chunk7PWF3F2Wcjs.isRef.call(void 0, response)) {
|
|
1264
1264
|
return [];
|
|
@@ -1271,7 +1271,7 @@ var Operation = class {
|
|
|
1271
1271
|
let requestBody = this.schema.requestBody;
|
|
1272
1272
|
if (requestBody) {
|
|
1273
1273
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, requestBody)) {
|
|
1274
|
-
this.schema.requestBody =
|
|
1274
|
+
this.schema.requestBody = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1275
1275
|
requestBody = this.schema.requestBody;
|
|
1276
1276
|
}
|
|
1277
1277
|
if (requestBody && !_chunk7PWF3F2Wcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
|
|
@@ -1284,7 +1284,7 @@ var Operation = class {
|
|
|
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
1286
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, response)) {
|
|
1287
|
-
this.schema.responses[r] =
|
|
1287
|
+
this.schema.responses[r] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, response, this.api);
|
|
1288
1288
|
response = this.schema.responses[r];
|
|
1289
1289
|
if (!response || _chunk7PWF3F2Wcjs.isRef.call(void 0, response)) {
|
|
1290
1290
|
return false;
|
|
@@ -1394,7 +1394,7 @@ var Operation = class {
|
|
|
1394
1394
|
let parameters = (_optionalChain([this, 'access', _106 => _106.schema, 'optionalAccess', _107 => _107.parameters]) || []).map((p) => {
|
|
1395
1395
|
let param = p;
|
|
1396
1396
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, param)) {
|
|
1397
|
-
param =
|
|
1397
|
+
param = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, param, this.api);
|
|
1398
1398
|
if (!param || _chunk7PWF3F2Wcjs.isRef.call(void 0, param)) return;
|
|
1399
1399
|
}
|
|
1400
1400
|
return param;
|
|
@@ -1402,7 +1402,7 @@ var Operation = class {
|
|
|
1402
1402
|
const commonParams = (_optionalChain([this, 'access', _108 => _108.api, 'optionalAccess', _109 => _109.paths, 'optionalAccess', _110 => _110[this.path], 'optionalAccess', _111 => _111.parameters]) || []).map((p) => {
|
|
1403
1403
|
let param = p;
|
|
1404
1404
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, param)) {
|
|
1405
|
-
param =
|
|
1405
|
+
param = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, param, this.api);
|
|
1406
1406
|
if (!param || _chunk7PWF3F2Wcjs.isRef.call(void 0, param)) return;
|
|
1407
1407
|
}
|
|
1408
1408
|
return param;
|
|
@@ -1434,8 +1434,8 @@ var Operation = class {
|
|
|
1434
1434
|
*
|
|
1435
1435
|
*/
|
|
1436
1436
|
getParametersAsJSONSchema(opts = {}) {
|
|
1437
|
-
|
|
1438
|
-
return
|
|
1437
|
+
_chunk6GTPCWO5cjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1438
|
+
return _chunk6GTPCWO5cjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
|
|
1439
1439
|
includeDiscriminatorMappingRefs: true,
|
|
1440
1440
|
...opts
|
|
1441
1441
|
});
|
|
@@ -1454,7 +1454,7 @@ var Operation = class {
|
|
|
1454
1454
|
* this content-type, the function will return null.
|
|
1455
1455
|
*/
|
|
1456
1456
|
getResponseAsJSONSchema(statusCode, opts = {}) {
|
|
1457
|
-
|
|
1457
|
+
_chunk6GTPCWO5cjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1458
1458
|
return getResponseAsJSONSchema(this, this.api, statusCode, {
|
|
1459
1459
|
includeDiscriminatorMappingRefs: true,
|
|
1460
1460
|
...opts
|
|
@@ -1467,7 +1467,7 @@ var Operation = class {
|
|
|
1467
1467
|
getResponseStatusCodes() {
|
|
1468
1468
|
if (!this.schema.responses) return [];
|
|
1469
1469
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1470
|
-
this.schema.responses =
|
|
1470
|
+
this.schema.responses = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
|
|
1471
1471
|
if (!this.schema.responses || _chunk7PWF3F2Wcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1472
1472
|
return [];
|
|
1473
1473
|
}
|
|
@@ -1493,7 +1493,7 @@ var Operation = class {
|
|
|
1493
1493
|
let resp = response;
|
|
1494
1494
|
if (!resp) return;
|
|
1495
1495
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, resp)) {
|
|
1496
|
-
resp =
|
|
1496
|
+
resp = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, resp, this.api);
|
|
1497
1497
|
if (!resp || _chunk7PWF3F2Wcjs.isRef.call(void 0, resp)) {
|
|
1498
1498
|
return;
|
|
1499
1499
|
}
|
|
@@ -1522,7 +1522,7 @@ var Operation = class {
|
|
|
1522
1522
|
let requestBody = this.schema.requestBody;
|
|
1523
1523
|
if (!requestBody) return false;
|
|
1524
1524
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, requestBody)) {
|
|
1525
|
-
this.schema.requestBody =
|
|
1525
|
+
this.schema.requestBody = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1526
1526
|
requestBody = this.schema.requestBody;
|
|
1527
1527
|
if (!requestBody || _chunk7PWF3F2Wcjs.isRef.call(void 0, requestBody)) {
|
|
1528
1528
|
return false;
|
|
@@ -1596,7 +1596,7 @@ var Operation = class {
|
|
|
1596
1596
|
let availableMediaType;
|
|
1597
1597
|
const mediaTypes = this.getRequestBodyMediaTypes();
|
|
1598
1598
|
mediaTypes.forEach((mt) => {
|
|
1599
|
-
if (!availableMediaType &&
|
|
1599
|
+
if (!availableMediaType && _chunk6GTPCWO5cjs.matches_mimetype_default.json(mt)) {
|
|
1600
1600
|
availableMediaType = mt;
|
|
1601
1601
|
}
|
|
1602
1602
|
});
|
|
@@ -1644,7 +1644,7 @@ var Operation = class {
|
|
|
1644
1644
|
let response = this.schema.responses[statusCode];
|
|
1645
1645
|
if (!response) return false;
|
|
1646
1646
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, response)) {
|
|
1647
|
-
this.schema.responses[statusCode] =
|
|
1647
|
+
this.schema.responses[statusCode] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, response, this.api);
|
|
1648
1648
|
response = this.schema.responses[statusCode];
|
|
1649
1649
|
if (!response || _chunk7PWF3F2Wcjs.isRef.call(void 0, response)) {
|
|
1650
1650
|
return false;
|
|
@@ -1688,7 +1688,7 @@ var Operation = class {
|
|
|
1688
1688
|
let callbackObj = this.schema.callbacks[identifier];
|
|
1689
1689
|
if (!callbackObj) return false;
|
|
1690
1690
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, callbackObj)) {
|
|
1691
|
-
this.schema.callbacks[identifier] =
|
|
1691
|
+
this.schema.callbacks[identifier] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, callbackObj, this.api);
|
|
1692
1692
|
callbackObj = this.schema.callbacks[identifier];
|
|
1693
1693
|
if (!callbackObj || _chunk7PWF3F2Wcjs.isRef.call(void 0, callbackObj)) {
|
|
1694
1694
|
return false;
|
|
@@ -1697,7 +1697,7 @@ var Operation = class {
|
|
|
1697
1697
|
let callback = callbackObj[expression];
|
|
1698
1698
|
if (!callback) return false;
|
|
1699
1699
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, callback)) {
|
|
1700
|
-
callbackObj[expression] =
|
|
1700
|
+
callbackObj[expression] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, callback, this.api);
|
|
1701
1701
|
callback = callbackObj[expression];
|
|
1702
1702
|
if (!callback || _chunk7PWF3F2Wcjs.isRef.call(void 0, callback)) {
|
|
1703
1703
|
return false;
|
|
@@ -1721,7 +1721,7 @@ var Operation = class {
|
|
|
1721
1721
|
let cb = _optionalChain([this, 'access', _120 => _120.schema, 'access', _121 => _121.callbacks, 'optionalAccess', _122 => _122[callback]]);
|
|
1722
1722
|
if (!cb) return;
|
|
1723
1723
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, cb)) {
|
|
1724
|
-
this.schema.callbacks[callback] =
|
|
1724
|
+
this.schema.callbacks[callback] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, cb, this.api);
|
|
1725
1725
|
cb = this.schema.callbacks[callback];
|
|
1726
1726
|
if (!cb || _chunk7PWF3F2Wcjs.isRef.call(void 0, cb)) {
|
|
1727
1727
|
return;
|
|
@@ -1731,14 +1731,14 @@ var Operation = class {
|
|
|
1731
1731
|
let callbackPath = cb[expression];
|
|
1732
1732
|
if (!callbackPath) return;
|
|
1733
1733
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, callbackPath)) {
|
|
1734
|
-
cb[expression] =
|
|
1734
|
+
cb[expression] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, callbackPath, this.api);
|
|
1735
1735
|
callbackPath = cb[expression];
|
|
1736
1736
|
if (!callbackPath || _chunk7PWF3F2Wcjs.isRef.call(void 0, callbackPath)) {
|
|
1737
1737
|
return;
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
1740
|
Object.keys(callbackPath).forEach((method) => {
|
|
1741
|
-
if (!
|
|
1741
|
+
if (!_chunk6GTPCWO5cjs.supportedMethods.includes(method)) return;
|
|
1742
1742
|
const found = this.getCallback(callback, expression, method);
|
|
1743
1743
|
if (found) {
|
|
1744
1744
|
callbacks.push(found);
|
|
@@ -1862,7 +1862,7 @@ var Callback = class extends Operation {
|
|
|
1862
1862
|
let parameters = (_optionalChain([this, 'access', _129 => _129.schema, 'optionalAccess', _130 => _130.parameters]) || []).map((p) => {
|
|
1863
1863
|
let param = p;
|
|
1864
1864
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, param)) {
|
|
1865
|
-
param =
|
|
1865
|
+
param = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, param, this.api);
|
|
1866
1866
|
if (!param || _chunk7PWF3F2Wcjs.isRef.call(void 0, param)) return;
|
|
1867
1867
|
}
|
|
1868
1868
|
return param;
|
|
@@ -1870,7 +1870,7 @@ var Callback = class extends Operation {
|
|
|
1870
1870
|
const commonParams = (this.parentSchema.parameters || []).map((p) => {
|
|
1871
1871
|
let param = p;
|
|
1872
1872
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, param)) {
|
|
1873
|
-
param =
|
|
1873
|
+
param = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, param, this.api);
|
|
1874
1874
|
if (!param || _chunk7PWF3F2Wcjs.isRef.call(void 0, param)) return;
|
|
1875
1875
|
}
|
|
1876
1876
|
return param;
|
|
@@ -1896,7 +1896,7 @@ var Webhook = class extends Operation {
|
|
|
1896
1896
|
}
|
|
1897
1897
|
let webhookPath = this.api.webhooks[this.path];
|
|
1898
1898
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, webhookPath)) {
|
|
1899
|
-
this.api.webhooks[this.path] =
|
|
1899
|
+
this.api.webhooks[this.path] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1900
1900
|
webhookPath = this.api.webhooks[this.path];
|
|
1901
1901
|
}
|
|
1902
1902
|
return _optionalChain([webhookPath, 'optionalAccess', _133 => _133.summary]);
|
|
@@ -1915,7 +1915,7 @@ var Webhook = class extends Operation {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
let webhookPath = this.api.webhooks[this.path];
|
|
1917
1917
|
if (_chunk7PWF3F2Wcjs.isRef.call(void 0, webhookPath)) {
|
|
1918
|
-
this.api.webhooks[this.path] =
|
|
1918
|
+
this.api.webhooks[this.path] = _chunk6GTPCWO5cjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1919
1919
|
webhookPath = this.api.webhooks[this.path];
|
|
1920
1920
|
}
|
|
1921
1921
|
return _optionalChain([webhookPath, 'optionalAccess', _136 => _136.description]);
|
|
@@ -1950,4 +1950,4 @@ exports.getUserVariable = getUserVariable; exports.stripTrailingSlash = stripTra
|
|
|
1950
1950
|
* @license Apache-2.0
|
|
1951
1951
|
* @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
|
|
1952
1952
|
*/
|
|
1953
|
-
//# sourceMappingURL=chunk-
|
|
1953
|
+
//# sourceMappingURL=chunk-2F2OPV5M.cjs.map
|