oas 32.1.10 → 32.1.13
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 +6 -6
- package/dist/analyzer/index.js +4 -4
- package/dist/{chunk-WXXVCSCN.js → chunk-2EISA7HB.js} +5 -5
- package/dist/chunk-2EISA7HB.js.map +1 -0
- package/dist/{chunk-YPR7YTHM.cjs → chunk-3MTU2ESP.cjs} +1 -1
- package/dist/{chunk-YPR7YTHM.cjs.map → chunk-3MTU2ESP.cjs.map} +1 -1
- package/dist/{chunk-EYI3QYOG.cjs → chunk-7BWVOLZR.cjs} +211 -198
- package/dist/chunk-7BWVOLZR.cjs.map +1 -0
- package/dist/{chunk-DKPOVGFI.cjs → chunk-BJEFIYTO.cjs} +29 -29
- package/dist/chunk-BJEFIYTO.cjs.map +1 -0
- package/dist/{chunk-2TQO63CW.js → chunk-GIFUTDD5.js} +53 -40
- package/dist/chunk-GIFUTDD5.js.map +1 -0
- package/dist/{chunk-7BC6KXMO.js → chunk-K5WNB3M7.js} +133 -49
- package/dist/chunk-K5WNB3M7.js.map +1 -0
- package/dist/{chunk-MNOEMVCF.js → chunk-PSNTODZL.js} +1 -1
- package/dist/{chunk-MNOEMVCF.js.map → chunk-PSNTODZL.js.map} +1 -1
- package/dist/{chunk-HTEFBV7K.cjs → chunk-SAB2PGCD.cjs} +158 -74
- package/dist/chunk-SAB2PGCD.cjs.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +4 -4
- package/dist/operation/index.cjs +4 -4
- package/dist/operation/index.js +3 -3
- package/dist/reducer/index.cjs +49 -28
- package/dist/reducer/index.cjs.map +1 -1
- package/dist/reducer/index.js +23 -2
- package/dist/reducer/index.js.map +1 -1
- package/dist/types.cjs +2 -2
- package/dist/types.d.cts +3 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.js +1 -1
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +2 -2
- package/package.json +6 -8
- package/dist/chunk-2TQO63CW.js.map +0 -1
- package/dist/chunk-7BC6KXMO.js.map +0 -1
- package/dist/chunk-DKPOVGFI.cjs.map +0 -1
- package/dist/chunk-EYI3QYOG.cjs.map +0 -1
- package/dist/chunk-HTEFBV7K.cjs.map +0 -1
- package/dist/chunk-WXXVCSCN.js.map +0 -1
|
@@ -13,13 +13,15 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkSAB2PGCDcjs = require('./chunk-SAB2PGCD.cjs');
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
var _chunkAYA3UT4Lcjs = require('./chunk-AYA3UT4L.cjs');
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
var
|
|
24
|
+
var _chunk3MTU2ESPcjs = require('./chunk-3MTU2ESP.cjs');
|
|
23
25
|
|
|
24
26
|
// src/operation/index.ts
|
|
25
27
|
var _jsonschemarefparser = require('@apidevtools/json-schema-ref-parser');
|
|
@@ -30,7 +32,7 @@ function dedupeCommonParameters(parameters, commonParameters) {
|
|
|
30
32
|
return !parameters.find((param2) => {
|
|
31
33
|
if (param.name && param2.name) {
|
|
32
34
|
return param.name === param2.name && param.in === param2.in;
|
|
33
|
-
} else if (
|
|
35
|
+
} else if (_chunk3MTU2ESPcjs.isRef.call(void 0, param) && _chunk3MTU2ESPcjs.isRef.call(void 0, param2)) {
|
|
34
36
|
return param.$ref === param2.$ref;
|
|
35
37
|
}
|
|
36
38
|
return false;
|
|
@@ -54,7 +56,7 @@ function usesPolymorphism(schema) {
|
|
|
54
56
|
return false;
|
|
55
57
|
}
|
|
56
58
|
function objectify(thing) {
|
|
57
|
-
if (!
|
|
59
|
+
if (!_chunkSAB2PGCDcjs.isObject.call(void 0, thing)) {
|
|
58
60
|
return {};
|
|
59
61
|
}
|
|
60
62
|
return thing;
|
|
@@ -68,13 +70,13 @@ function normalizeArray(arr) {
|
|
|
68
70
|
function isFunc(thing) {
|
|
69
71
|
return typeof thing === "function";
|
|
70
72
|
}
|
|
71
|
-
function deeplyStripKey(input, keyToStrip, predicate
|
|
73
|
+
function deeplyStripKey(input, keyToStrip, predicate) {
|
|
72
74
|
if (typeof input !== "object" || Array.isArray(input) || input === null || !keyToStrip) {
|
|
73
75
|
return input;
|
|
74
76
|
}
|
|
75
77
|
const obj = { ...input };
|
|
76
78
|
Object.keys(obj).forEach((k) => {
|
|
77
|
-
if (k === keyToStrip && predicate(obj[k], k)) {
|
|
79
|
+
if (k === keyToStrip && _optionalChain([predicate, 'optionalCall', _2 => _2(obj[k], k)])) {
|
|
78
80
|
delete obj[k];
|
|
79
81
|
return;
|
|
80
82
|
}
|
|
@@ -128,13 +130,13 @@ function sampleFromSchema(schema, opts = {}) {
|
|
|
128
130
|
const seenRefs = opts.seenRefs || /* @__PURE__ */ new Set();
|
|
129
131
|
let objectifySchema = objectify(schema);
|
|
130
132
|
let refToRelease;
|
|
131
|
-
if (opts.definition &&
|
|
133
|
+
if (opts.definition && _chunk3MTU2ESPcjs.isRef.call(void 0, objectifySchema)) {
|
|
132
134
|
refToRelease = objectifySchema.$ref;
|
|
133
135
|
if (seenRefs.has(refToRelease)) {
|
|
134
136
|
return void 0;
|
|
135
137
|
}
|
|
136
|
-
objectifySchema =
|
|
137
|
-
if (!objectifySchema ||
|
|
138
|
+
objectifySchema = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
|
|
139
|
+
if (!objectifySchema || _chunk3MTU2ESPcjs.isRef.call(void 0, objectifySchema)) {
|
|
138
140
|
return void 0;
|
|
139
141
|
}
|
|
140
142
|
}
|
|
@@ -151,21 +153,35 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
151
153
|
const hasPolymorphism = usesPolymorphism(schema);
|
|
152
154
|
if (hasPolymorphism === "allOf") {
|
|
153
155
|
try {
|
|
156
|
+
const definition = opts.definition;
|
|
157
|
+
const resolvedAllOf = schema.allOf.map((subSchema) => {
|
|
158
|
+
let sub = objectify(subSchema);
|
|
159
|
+
if (definition && _chunk3MTU2ESPcjs.isRef.call(void 0, sub)) {
|
|
160
|
+
const resolved = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
|
|
161
|
+
if (resolved && !_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) {
|
|
162
|
+
sub = resolved;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return sub;
|
|
166
|
+
});
|
|
154
167
|
return sampleFromSchema(
|
|
155
|
-
_jsonschemamergeallof2.default.call(void 0,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
168
|
+
_jsonschemamergeallof2.default.call(void 0,
|
|
169
|
+
{ ...schema, allOf: resolvedAllOf },
|
|
170
|
+
{
|
|
171
|
+
resolvers: {
|
|
172
|
+
// Ignore any unrecognized OAS-specific keywords that might be present on the schema
|
|
173
|
+
// (like `xml`).
|
|
174
|
+
defaultResolver: _jsonschemamergeallof2.default.options.resolvers.title
|
|
175
|
+
}
|
|
160
176
|
}
|
|
161
|
-
|
|
177
|
+
),
|
|
162
178
|
{
|
|
163
179
|
...opts,
|
|
164
180
|
seenRefs
|
|
165
181
|
}
|
|
166
182
|
);
|
|
167
183
|
} catch (e) {
|
|
168
|
-
return
|
|
184
|
+
return;
|
|
169
185
|
}
|
|
170
186
|
} else if (hasPolymorphism) {
|
|
171
187
|
const samples = schema[hasPolymorphism].map((s) => {
|
|
@@ -191,23 +207,23 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
191
207
|
} else if (items) {
|
|
192
208
|
type = "array";
|
|
193
209
|
} else {
|
|
194
|
-
return
|
|
210
|
+
return;
|
|
195
211
|
}
|
|
196
212
|
}
|
|
197
213
|
if (type === "object" || Array.isArray(type) && type.includes("object")) {
|
|
198
214
|
const props = objectify(properties);
|
|
199
215
|
const obj = {};
|
|
200
216
|
for (const name in props) {
|
|
201
|
-
if (_optionalChain([props, 'optionalAccess',
|
|
217
|
+
if (_optionalChain([props, 'optionalAccess', _3 => _3[name], 'access', _4 => _4.deprecated])) {
|
|
202
218
|
continue;
|
|
203
219
|
}
|
|
204
|
-
if (_optionalChain([props, 'optionalAccess',
|
|
220
|
+
if (_optionalChain([props, 'optionalAccess', _5 => _5[name], 'access', _6 => _6.readOnly]) && !includeReadOnly) {
|
|
205
221
|
continue;
|
|
206
222
|
}
|
|
207
|
-
if (_optionalChain([props, 'optionalAccess',
|
|
223
|
+
if (_optionalChain([props, 'optionalAccess', _7 => _7[name], 'access', _8 => _8.writeOnly]) && !includeWriteOnly) {
|
|
208
224
|
continue;
|
|
209
225
|
}
|
|
210
|
-
if (_optionalChain([props, 'access',
|
|
226
|
+
if (_optionalChain([props, 'access', _9 => _9[name], 'access', _10 => _10.examples, 'optionalAccess', _11 => _11.length])) {
|
|
211
227
|
obj[name] = props[name].examples[0];
|
|
212
228
|
continue;
|
|
213
229
|
}
|
|
@@ -251,7 +267,7 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
251
267
|
return normalizeArray(schema.enum)[0];
|
|
252
268
|
}
|
|
253
269
|
if (type === "file") {
|
|
254
|
-
return
|
|
270
|
+
return;
|
|
255
271
|
}
|
|
256
272
|
return primitive(schema);
|
|
257
273
|
}
|
|
@@ -261,11 +277,9 @@ var samples_default = memo;
|
|
|
261
277
|
// src/operation/lib/get-mediatype-examples.ts
|
|
262
278
|
function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {}) {
|
|
263
279
|
if (mediaTypeObject.example) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
return [];
|
|
268
|
-
}
|
|
280
|
+
mediaTypeObject.example = _chunkSAB2PGCDcjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
|
|
281
|
+
if (mediaTypeObject.example === void 0 || _chunkSAB2PGCDcjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
|
|
282
|
+
return [];
|
|
269
283
|
}
|
|
270
284
|
return [
|
|
271
285
|
{
|
|
@@ -279,24 +293,22 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
279
293
|
let description;
|
|
280
294
|
let example = examples[key];
|
|
281
295
|
if (example !== null && typeof example === "object") {
|
|
296
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
|
|
297
|
+
example = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, example, definition);
|
|
298
|
+
if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
282
302
|
if ("summary" in example) {
|
|
283
303
|
summary = example.summary;
|
|
284
304
|
}
|
|
285
305
|
if ("description" in example) {
|
|
286
306
|
description = example.description;
|
|
287
307
|
}
|
|
288
|
-
if (_chunkYPR7YTHMcjs.isRef.call(void 0, example)) {
|
|
289
|
-
example = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, example, definition);
|
|
290
|
-
if (!example || _chunkYPR7YTHMcjs.isRef.call(void 0, example)) {
|
|
291
|
-
return false;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
308
|
if ("value" in example) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
return false;
|
|
299
|
-
}
|
|
309
|
+
example.value = _chunkSAB2PGCDcjs.dereferenceRefDeep.call(void 0, example.value, definition);
|
|
310
|
+
if (example.value === void 0 || _chunkSAB2PGCDcjs.collectRefsInSchema.call(void 0, example.value).size > 0) {
|
|
311
|
+
return false;
|
|
300
312
|
}
|
|
301
313
|
example = example.value;
|
|
302
314
|
}
|
|
@@ -312,7 +324,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
312
324
|
}
|
|
313
325
|
}
|
|
314
326
|
if (mediaTypeObject.schema) {
|
|
315
|
-
if (!
|
|
327
|
+
if (!_chunkSAB2PGCDcjs.matches_mimetype_default.xml(mediaType)) {
|
|
316
328
|
return [
|
|
317
329
|
{
|
|
318
330
|
value: samples_default(structuredClone(mediaTypeObject.schema), {
|
|
@@ -329,17 +341,17 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
329
341
|
// src/operation/lib/get-response-examples.ts
|
|
330
342
|
function getResponseExamples(operation, definition) {
|
|
331
343
|
return Object.keys(operation.responses || {}).map((status) => {
|
|
332
|
-
let response = _optionalChain([operation, 'access',
|
|
344
|
+
let response = _optionalChain([operation, 'access', _12 => _12.responses, 'optionalAccess', _13 => _13[status]]);
|
|
333
345
|
let onlyHeaders = false;
|
|
334
346
|
if (!response) return false;
|
|
335
|
-
if (
|
|
336
|
-
response =
|
|
337
|
-
if (!response ||
|
|
347
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
348
|
+
response = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, response, definition);
|
|
349
|
+
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) return false;
|
|
338
350
|
}
|
|
339
351
|
const mediaTypes = {};
|
|
340
|
-
(_optionalChain([response, 'optionalAccess',
|
|
352
|
+
(_optionalChain([response, 'optionalAccess', _14 => _14.content]) ? Object.keys(response.content) : []).forEach((mediaType) => {
|
|
341
353
|
if (!mediaType) return;
|
|
342
|
-
const mediaTypeObject = _optionalChain([response, 'access',
|
|
354
|
+
const mediaTypeObject = _optionalChain([response, 'access', _15 => _15.content, 'optionalAccess', _16 => _16[mediaType]]);
|
|
343
355
|
if (!mediaTypeObject) return;
|
|
344
356
|
const examples = getMediaTypeExamples(mediaType, mediaTypeObject, definition, {
|
|
345
357
|
includeReadOnly: true,
|
|
@@ -370,18 +382,18 @@ function getCallbackExamples(operation, definition) {
|
|
|
370
382
|
return [];
|
|
371
383
|
}
|
|
372
384
|
const examples = Object.keys(operation.callbacks).map((identifier) => {
|
|
373
|
-
let callback = _optionalChain([operation, 'access',
|
|
385
|
+
let callback = _optionalChain([operation, 'access', _17 => _17.callbacks, 'optionalAccess', _18 => _18[identifier]]);
|
|
374
386
|
if (!callback) return [];
|
|
375
|
-
if (
|
|
376
|
-
callback =
|
|
377
|
-
if (!callback ||
|
|
387
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
|
|
388
|
+
callback = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, callback, definition);
|
|
389
|
+
if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) return [];
|
|
378
390
|
}
|
|
379
391
|
const items = Object.keys(callback).map((expression) => {
|
|
380
392
|
let callbackPath = callback[expression];
|
|
381
393
|
if (!callbackPath) return [];
|
|
382
|
-
if (
|
|
383
|
-
callbackPath =
|
|
384
|
-
if (!callbackPath ||
|
|
394
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
|
|
395
|
+
callbackPath = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, callbackPath, definition);
|
|
396
|
+
if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) return [];
|
|
385
397
|
}
|
|
386
398
|
return Object.keys(callbackPath).map((method) => {
|
|
387
399
|
if (["servers", "parameters", "summary", "description"].includes(method)) {
|
|
@@ -430,7 +442,7 @@ function getExampleGroups(operation) {
|
|
|
430
442
|
const namelessCodeSampleCounts = {};
|
|
431
443
|
const groups = {};
|
|
432
444
|
const codeSamples = _chunkAYA3UT4Lcjs.getExtension.call(void 0, "code-samples", operation.api, operation);
|
|
433
|
-
_optionalChain([codeSamples, 'optionalAccess',
|
|
445
|
+
_optionalChain([codeSamples, 'optionalAccess', _19 => _19.forEach, 'call', _20 => _20((sample, i) => {
|
|
434
446
|
if (namelessCodeSampleCounts[sample.language]) {
|
|
435
447
|
namelessCodeSampleCounts[sample.language] += 1;
|
|
436
448
|
} else {
|
|
@@ -438,7 +450,7 @@ function getExampleGroups(operation) {
|
|
|
438
450
|
}
|
|
439
451
|
const name = getDefaultName(sample, namelessCodeSampleCounts);
|
|
440
452
|
if (sample.correspondingExample) {
|
|
441
|
-
if (_optionalChain([groups, 'access',
|
|
453
|
+
if (_optionalChain([groups, 'access', _21 => _21[sample.correspondingExample], 'optionalAccess', _22 => _22.customCodeSamples, 'optionalAccess', _23 => _23.length])) {
|
|
442
454
|
groups[sample.correspondingExample].customCodeSamples.push({ ...sample, name, originalIndex: i });
|
|
443
455
|
} else if (sample.correspondingExample) {
|
|
444
456
|
groups[sample.correspondingExample] = {
|
|
@@ -446,7 +458,7 @@ function getExampleGroups(operation) {
|
|
|
446
458
|
customCodeSamples: [{ ...sample, name, originalIndex: i }]
|
|
447
459
|
};
|
|
448
460
|
}
|
|
449
|
-
} else if (_optionalChain([groups, 'access',
|
|
461
|
+
} else if (_optionalChain([groups, 'access', _24 => _24[noCorrespondingResponseKey], 'optionalAccess', _25 => _25.customCodeSamples, 'optionalAccess', _26 => _26.length])) {
|
|
450
462
|
groups[noCorrespondingResponseKey].customCodeSamples.push({ ...sample, name, originalIndex: i });
|
|
451
463
|
} else {
|
|
452
464
|
groups[noCorrespondingResponseKey] = {
|
|
@@ -462,17 +474,17 @@ function getExampleGroups(operation) {
|
|
|
462
474
|
operation.getParameters().forEach((param) => {
|
|
463
475
|
Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
|
|
464
476
|
let example = paramExample;
|
|
465
|
-
if (
|
|
466
|
-
example =
|
|
467
|
-
if (!example ||
|
|
477
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
|
|
478
|
+
example = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, example, operation.api);
|
|
479
|
+
if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) return;
|
|
468
480
|
}
|
|
469
481
|
groups[exampleKey] = {
|
|
470
482
|
...groups[exampleKey],
|
|
471
|
-
name: _optionalChain([groups, 'access',
|
|
483
|
+
name: _optionalChain([groups, 'access', _27 => _27[exampleKey], 'optionalAccess', _28 => _28.name]) || example.summary || exampleKey,
|
|
472
484
|
request: {
|
|
473
|
-
..._optionalChain([groups, 'access',
|
|
485
|
+
..._optionalChain([groups, 'access', _29 => _29[exampleKey], 'optionalAccess', _30 => _30.request]),
|
|
474
486
|
[param.in]: {
|
|
475
|
-
..._optionalChain([groups, 'access',
|
|
487
|
+
..._optionalChain([groups, 'access', _31 => _31[exampleKey], 'optionalAccess', _32 => _32.request, 'optionalAccess', _33 => _33[param.in]]),
|
|
476
488
|
[param.name]: example.value
|
|
477
489
|
}
|
|
478
490
|
}
|
|
@@ -485,9 +497,9 @@ function getExampleGroups(operation) {
|
|
|
485
497
|
const mediaType = requestExample.mediaType === "application/x-www-form-urlencoded" ? "formData" : "body";
|
|
486
498
|
groups[mediaTypeExample.title] = {
|
|
487
499
|
...groups[mediaTypeExample.title],
|
|
488
|
-
name: _optionalChain([groups, 'access',
|
|
500
|
+
name: _optionalChain([groups, 'access', _34 => _34[mediaTypeExample.title], 'optionalAccess', _35 => _35.name]) || mediaTypeExample.summary || mediaTypeExample.title,
|
|
489
501
|
request: {
|
|
490
|
-
..._optionalChain([groups, 'access',
|
|
502
|
+
..._optionalChain([groups, 'access', _36 => _36[mediaTypeExample.title], 'optionalAccess', _37 => _37.request]),
|
|
491
503
|
[mediaType]: mediaTypeExample.value
|
|
492
504
|
}
|
|
493
505
|
};
|
|
@@ -510,10 +522,10 @@ function getRequestBodyExamples(operation, definition) {
|
|
|
510
522
|
let requestBody = operation.requestBody;
|
|
511
523
|
if (!requestBody) {
|
|
512
524
|
return [];
|
|
513
|
-
} else if (
|
|
514
|
-
requestBody =
|
|
525
|
+
} else if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
526
|
+
requestBody = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, requestBody, definition);
|
|
515
527
|
}
|
|
516
|
-
if (!requestBody ||
|
|
528
|
+
if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
|
|
517
529
|
return [];
|
|
518
530
|
}
|
|
519
531
|
return Object.keys(requestBody.content || {}).map((mediaType) => {
|
|
@@ -534,11 +546,11 @@ function getRequestBodyExamples(operation, definition) {
|
|
|
534
546
|
|
|
535
547
|
// src/operation/lib/operationId.ts
|
|
536
548
|
function hasOperationId(operation) {
|
|
537
|
-
return Boolean("operationId" in operation && _optionalChain([operation, 'access',
|
|
549
|
+
return Boolean("operationId" in operation && _optionalChain([operation, 'access', _38 => _38.operationId, 'optionalAccess', _39 => _39.length]));
|
|
538
550
|
}
|
|
539
551
|
function getOperationId(path, method, operation, opts = {}) {
|
|
540
552
|
function sanitize(id) {
|
|
541
|
-
return id.replace(_optionalChain([opts, 'optionalAccess',
|
|
553
|
+
return id.replace(_optionalChain([opts, 'optionalAccess', _40 => _40.camelCase]) || _optionalChain([opts, 'optionalAccess', _41 => _41.friendlyCase]) ? /[^a-zA-Z0-9_]/g : /[^a-zA-Z0-9]/g, "-").replace(/--+/g, "-").replace(/^-|-$/g, "");
|
|
542
554
|
}
|
|
543
555
|
const operationIdExists = hasOperationId(operation);
|
|
544
556
|
let operationId;
|
|
@@ -548,8 +560,8 @@ function getOperationId(path, method, operation, opts = {}) {
|
|
|
548
560
|
operationId = sanitize(path).toLowerCase();
|
|
549
561
|
}
|
|
550
562
|
const currMethod = method.toLowerCase();
|
|
551
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
552
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
563
|
+
if (_optionalChain([opts, 'optionalAccess', _42 => _42.camelCase]) || _optionalChain([opts, 'optionalAccess', _43 => _43.friendlyCase])) {
|
|
564
|
+
if (_optionalChain([opts, 'optionalAccess', _44 => _44.friendlyCase])) {
|
|
553
565
|
operationId = operationId.replaceAll("_", " ");
|
|
554
566
|
if (!operationIdExists) {
|
|
555
567
|
operationId = operationId.replace(/[^a-zA-Z0-9_]+(.)/g, (_, chr) => ` ${chr}`).split(" ").filter((word, i, arr) => word !== arr[i - 1]).join(" ");
|
|
@@ -576,7 +588,7 @@ function getOperationId(path, method, operation, opts = {}) {
|
|
|
576
588
|
}
|
|
577
589
|
|
|
578
590
|
// src/operation/transformers/get-response-as-json-schema.ts
|
|
579
|
-
var isJSON =
|
|
591
|
+
var isJSON = _chunkSAB2PGCDcjs.matches_mimetype_default.json;
|
|
580
592
|
function buildHeadersSchema(response, schemaOptions) {
|
|
581
593
|
const headersSchema = {
|
|
582
594
|
type: "object",
|
|
@@ -586,21 +598,21 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
586
598
|
const seenRefs = _nullishCoalesce(schemaOptions.seenRefs, () => ( /* @__PURE__ */ new Set()));
|
|
587
599
|
if (response.headers) {
|
|
588
600
|
Object.keys(response.headers).forEach((key) => {
|
|
589
|
-
let headerEntry = _optionalChain([response, 'access',
|
|
601
|
+
let headerEntry = _optionalChain([response, 'access', _45 => _45.headers, 'optionalAccess', _46 => _46[key]]);
|
|
590
602
|
if (!headerEntry) return;
|
|
591
|
-
if (
|
|
592
|
-
headerEntry =
|
|
593
|
-
if (!headerEntry ||
|
|
603
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) {
|
|
604
|
+
headerEntry = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
|
|
605
|
+
if (!headerEntry || _chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) return;
|
|
594
606
|
}
|
|
595
607
|
if (headerEntry.schema) {
|
|
596
608
|
const header = headerEntry;
|
|
597
609
|
let headerSchema = header.schema;
|
|
598
610
|
if (!headerSchema) return;
|
|
599
|
-
if (
|
|
600
|
-
headerSchema =
|
|
601
|
-
if (!headerSchema ||
|
|
611
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) {
|
|
612
|
+
headerSchema = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
|
|
613
|
+
if (!headerSchema || _chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) return;
|
|
602
614
|
}
|
|
603
|
-
headersSchema.properties[key] =
|
|
615
|
+
headersSchema.properties[key] = _chunkSAB2PGCDcjs.toJSONSchema.call(void 0, _chunkSAB2PGCDcjs.cloneObject.call(void 0, headerSchema), {
|
|
604
616
|
addEnumsToDescriptions: true,
|
|
605
617
|
...schemaOptions
|
|
606
618
|
});
|
|
@@ -654,41 +666,41 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
654
666
|
}
|
|
655
667
|
if (preferredContentType) {
|
|
656
668
|
if (contentTypes.includes(preferredContentType)) {
|
|
657
|
-
const schema2 =
|
|
669
|
+
const schema2 = _chunkSAB2PGCDcjs.cloneObject.call(void 0, content[preferredContentType].schema);
|
|
658
670
|
if (!schema2) {
|
|
659
671
|
return null;
|
|
660
672
|
}
|
|
661
|
-
return
|
|
673
|
+
return _chunkSAB2PGCDcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
662
674
|
}
|
|
663
675
|
return null;
|
|
664
676
|
}
|
|
665
677
|
for (let i = 0; i < contentTypes.length; i++) {
|
|
666
678
|
if (isJSON(contentTypes[i])) {
|
|
667
|
-
const schema2 =
|
|
679
|
+
const schema2 = _chunkSAB2PGCDcjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
|
|
668
680
|
if (!schema2) {
|
|
669
681
|
return {};
|
|
670
682
|
}
|
|
671
|
-
return
|
|
683
|
+
return _chunkSAB2PGCDcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
672
684
|
}
|
|
673
685
|
}
|
|
674
686
|
const contentType = contentTypes.shift();
|
|
675
687
|
if (!contentType) {
|
|
676
688
|
return {};
|
|
677
689
|
}
|
|
678
|
-
const schema =
|
|
690
|
+
const schema = _chunkSAB2PGCDcjs.cloneObject.call(void 0, content[contentType].schema);
|
|
679
691
|
if (!schema) {
|
|
680
692
|
return {};
|
|
681
693
|
}
|
|
682
|
-
return
|
|
694
|
+
return _chunkSAB2PGCDcjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
|
|
683
695
|
}
|
|
684
|
-
const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess',
|
|
685
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
696
|
+
const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _47 => _47.contentType]));
|
|
697
|
+
if (_optionalChain([opts, 'optionalAccess', _48 => _48.contentType]) && !foundSchema) {
|
|
686
698
|
return null;
|
|
687
699
|
}
|
|
688
700
|
if (foundSchema) {
|
|
689
701
|
const schema = structuredClone(foundSchema);
|
|
690
702
|
let schemaType = foundSchema.type;
|
|
691
|
-
if (schemaType === void 0 &&
|
|
703
|
+
if (schemaType === void 0 && _chunk3MTU2ESPcjs.isRef.call(void 0, foundSchema) && usedSchemas.size > 0) {
|
|
692
704
|
const resolvedSchema = usedSchemas.get(foundSchema.$ref);
|
|
693
705
|
const resolvedType = resolvedSchema && typeof resolvedSchema === "object" && "type" in resolvedSchema ? resolvedSchema.type : void 0;
|
|
694
706
|
schemaType = Array.isArray(resolvedType) ? resolvedType[0] : resolvedType;
|
|
@@ -698,37 +710,37 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
698
710
|
// able to render so instead of generating a JSON Schema with an `undefined` type we should
|
|
699
711
|
// default to `string` so there's at least *something* the end-user can interact with.
|
|
700
712
|
type: _nullishCoalesce(schemaType, () => ( "string")),
|
|
701
|
-
schema:
|
|
713
|
+
schema: _chunkSAB2PGCDcjs.isPrimitive.call(void 0, schema) ? schema : {
|
|
702
714
|
...schema,
|
|
703
|
-
$schema:
|
|
715
|
+
$schema: _chunkSAB2PGCDcjs.getSchemaVersionString.call(void 0, schema, api)
|
|
704
716
|
},
|
|
705
717
|
label: "Response body"
|
|
706
718
|
};
|
|
707
719
|
if (response.description && schemaWrapper.schema) {
|
|
708
720
|
schemaWrapper.description = response.description;
|
|
709
721
|
}
|
|
710
|
-
|
|
722
|
+
_chunkSAB2PGCDcjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
|
|
711
723
|
if (usedSchemas.has(ref)) {
|
|
712
724
|
return usedSchemas.get(ref);
|
|
713
725
|
}
|
|
714
726
|
try {
|
|
715
|
-
const resolved =
|
|
716
|
-
if (
|
|
717
|
-
const converted =
|
|
727
|
+
const resolved = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
|
|
728
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) return;
|
|
729
|
+
const converted = _chunkSAB2PGCDcjs.toJSONSchema.call(void 0, structuredClone(resolved), {
|
|
718
730
|
...baseSchemaOptions,
|
|
719
731
|
seenRefs
|
|
720
732
|
});
|
|
721
733
|
usedSchemas.set(ref, converted);
|
|
722
734
|
return converted;
|
|
723
735
|
} catch (e2) {
|
|
724
|
-
return void 0;
|
|
725
736
|
}
|
|
726
737
|
});
|
|
727
738
|
if (schemaWrapper.schema && usedSchemas.size > 0) {
|
|
739
|
+
const refsInOutput = _chunkSAB2PGCDcjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
|
|
728
740
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
|
|
729
|
-
const referencedSchemas =
|
|
741
|
+
const referencedSchemas = _chunkSAB2PGCDcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
730
742
|
if (referencedSchemas.size > 0) {
|
|
731
|
-
|
|
743
|
+
_chunkSAB2PGCDcjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
|
|
732
744
|
}
|
|
733
745
|
}
|
|
734
746
|
jsonSchema.push(schemaWrapper);
|
|
@@ -740,9 +752,10 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
740
752
|
});
|
|
741
753
|
if (headersWrapper.schema && usedSchemas.size > 0) {
|
|
742
754
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("headers"), () => ( /* @__PURE__ */ new Set()));
|
|
743
|
-
const
|
|
755
|
+
const refsInOutput = _chunkSAB2PGCDcjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
|
|
756
|
+
const referencedSchemas = _chunkSAB2PGCDcjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
744
757
|
if (referencedSchemas.size > 0) {
|
|
745
|
-
|
|
758
|
+
_chunkSAB2PGCDcjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
|
|
746
759
|
}
|
|
747
760
|
}
|
|
748
761
|
jsonSchema.push(headersWrapper);
|
|
@@ -843,11 +856,11 @@ var Operation = (_class = class {
|
|
|
843
856
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
|
|
844
857
|
*/
|
|
845
858
|
getSummary() {
|
|
846
|
-
if (_optionalChain([this, 'access',
|
|
859
|
+
if (_optionalChain([this, 'access', _49 => _49.schema, 'optionalAccess', _50 => _50.summary]) && typeof this.schema.summary === "string") {
|
|
847
860
|
return this.schema.summary;
|
|
848
861
|
}
|
|
849
|
-
const pathItem = _optionalChain([this, 'access',
|
|
850
|
-
if (_optionalChain([pathItem, 'optionalAccess',
|
|
862
|
+
const pathItem = _optionalChain([this, 'access', _51 => _51.api, 'access', _52 => _52.paths, 'optionalAccess', _53 => _53[this.path]]);
|
|
863
|
+
if (_optionalChain([pathItem, 'optionalAccess', _54 => _54.summary]) && typeof pathItem.summary === "string") {
|
|
851
864
|
return pathItem.summary;
|
|
852
865
|
}
|
|
853
866
|
return void 0;
|
|
@@ -859,11 +872,11 @@ var Operation = (_class = class {
|
|
|
859
872
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
|
|
860
873
|
*/
|
|
861
874
|
getDescription() {
|
|
862
|
-
if (_optionalChain([this, 'access',
|
|
875
|
+
if (_optionalChain([this, 'access', _55 => _55.schema, 'optionalAccess', _56 => _56.description]) && typeof this.schema.description === "string") {
|
|
863
876
|
return this.schema.description;
|
|
864
877
|
}
|
|
865
|
-
const pathItem = _optionalChain([this, 'access',
|
|
866
|
-
if (_optionalChain([pathItem, 'optionalAccess',
|
|
878
|
+
const pathItem = _optionalChain([this, 'access', _57 => _57.api, 'access', _58 => _58.paths, 'optionalAccess', _59 => _59[this.path]]);
|
|
879
|
+
if (_optionalChain([pathItem, 'optionalAccess', _60 => _60.description]) && typeof pathItem.description === "string") {
|
|
867
880
|
return pathItem.description;
|
|
868
881
|
}
|
|
869
882
|
return void 0;
|
|
@@ -881,19 +894,19 @@ var Operation = (_class = class {
|
|
|
881
894
|
}
|
|
882
895
|
let types = [];
|
|
883
896
|
if (this.schema.requestBody) {
|
|
884
|
-
if (
|
|
885
|
-
this.schema.requestBody =
|
|
897
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.requestBody)) {
|
|
898
|
+
this.schema.requestBody = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
|
|
886
899
|
}
|
|
887
900
|
if (this.schema.requestBody && "content" in this.schema.requestBody) {
|
|
888
901
|
types = Object.keys(this.schema.requestBody.content);
|
|
889
902
|
}
|
|
890
903
|
}
|
|
891
904
|
this.contentType = "application/json";
|
|
892
|
-
if (_optionalChain([types, 'optionalAccess',
|
|
905
|
+
if (_optionalChain([types, 'optionalAccess', _61 => _61.length])) {
|
|
893
906
|
this.contentType = types[0];
|
|
894
907
|
}
|
|
895
908
|
types.forEach((t) => {
|
|
896
|
-
if (
|
|
909
|
+
if (_chunkSAB2PGCDcjs.matches_mimetype_default.json(t)) {
|
|
897
910
|
this.contentType = t;
|
|
898
911
|
}
|
|
899
912
|
});
|
|
@@ -906,7 +919,7 @@ var Operation = (_class = class {
|
|
|
906
919
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
907
920
|
*/
|
|
908
921
|
isFormUrlEncoded() {
|
|
909
|
-
return
|
|
922
|
+
return _chunkSAB2PGCDcjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
|
|
910
923
|
}
|
|
911
924
|
/**
|
|
912
925
|
* Checks if the current operation has a mutipart content type payload.
|
|
@@ -915,7 +928,7 @@ var Operation = (_class = class {
|
|
|
915
928
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
916
929
|
*/
|
|
917
930
|
isMultipart() {
|
|
918
|
-
return
|
|
931
|
+
return _chunkSAB2PGCDcjs.matches_mimetype_default.multipart(this.getContentType());
|
|
919
932
|
}
|
|
920
933
|
/**
|
|
921
934
|
* Checks if the current operation has a JSON-like content type payload.
|
|
@@ -924,7 +937,7 @@ var Operation = (_class = class {
|
|
|
924
937
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
925
938
|
*/
|
|
926
939
|
isJson() {
|
|
927
|
-
return
|
|
940
|
+
return _chunkSAB2PGCDcjs.matches_mimetype_default.json(this.getContentType());
|
|
928
941
|
}
|
|
929
942
|
/**
|
|
930
943
|
* Checks if the current operation has an XML content type payload.
|
|
@@ -933,7 +946,7 @@ var Operation = (_class = class {
|
|
|
933
946
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
934
947
|
*/
|
|
935
948
|
isXml() {
|
|
936
|
-
return
|
|
949
|
+
return _chunkSAB2PGCDcjs.matches_mimetype_default.xml(this.getContentType());
|
|
937
950
|
}
|
|
938
951
|
/**
|
|
939
952
|
* Checks if the current operation is a webhook or not.
|
|
@@ -952,7 +965,7 @@ var Operation = (_class = class {
|
|
|
952
965
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#security-requirement-object}
|
|
953
966
|
*/
|
|
954
967
|
getSecurity() {
|
|
955
|
-
if (!_optionalChain([this, 'access',
|
|
968
|
+
if (!_optionalChain([this, 'access', _62 => _62.api, 'optionalAccess', _63 => _63.components, 'optionalAccess', _64 => _64.securitySchemes]) || !Object.keys(this.api.components.securitySchemes).length) {
|
|
956
969
|
return [];
|
|
957
970
|
}
|
|
958
971
|
return this.schema.security || this.api.security || [];
|
|
@@ -978,16 +991,16 @@ var Operation = (_class = class {
|
|
|
978
991
|
const keysWithTypes = keys.map((key) => {
|
|
979
992
|
let security;
|
|
980
993
|
try {
|
|
981
|
-
security = _optionalChain([this, 'access',
|
|
994
|
+
security = _optionalChain([this, 'access', _65 => _65.api, 'optionalAccess', _66 => _66.components, 'optionalAccess', _67 => _67.securitySchemes, 'optionalAccess', _68 => _68[key]]);
|
|
982
995
|
if (!security) return false;
|
|
983
|
-
if (
|
|
984
|
-
security =
|
|
985
|
-
if (!security ||
|
|
996
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, security)) {
|
|
997
|
+
security = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, security, this.api);
|
|
998
|
+
if (!security || _chunk3MTU2ESPcjs.isRef.call(void 0, security)) return false;
|
|
986
999
|
}
|
|
987
1000
|
} catch (e4) {
|
|
988
1001
|
return false;
|
|
989
1002
|
}
|
|
990
|
-
if (!security ||
|
|
1003
|
+
if (!security || _chunk3MTU2ESPcjs.isRef.call(void 0, security)) return false;
|
|
991
1004
|
let type = null;
|
|
992
1005
|
if (security.type === "http") {
|
|
993
1006
|
if (security.scheme === "basic") type = "Basic";
|
|
@@ -1030,7 +1043,7 @@ var Operation = (_class = class {
|
|
|
1030
1043
|
if (!prev[security.type]) prev[security.type] = [];
|
|
1031
1044
|
const exists = prev[security.type].some((sec) => sec._key === security.security._key);
|
|
1032
1045
|
if (!exists) {
|
|
1033
|
-
if (_optionalChain([security, 'access',
|
|
1046
|
+
if (_optionalChain([security, 'access', _69 => _69.security, 'optionalAccess', _70 => _70._requirements])) delete security.security._requirements;
|
|
1034
1047
|
prev[security.type].push(security.security);
|
|
1035
1048
|
}
|
|
1036
1049
|
});
|
|
@@ -1061,12 +1074,12 @@ var Operation = (_class = class {
|
|
|
1061
1074
|
this.headers.request = this.headers.request.concat(
|
|
1062
1075
|
this.schema.parameters.map((p) => {
|
|
1063
1076
|
let param = p;
|
|
1064
|
-
if (
|
|
1065
|
-
param =
|
|
1066
|
-
if (!param ||
|
|
1077
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1078
|
+
param = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1079
|
+
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1067
1080
|
}
|
|
1068
1081
|
if (param.in && param.in === "header") return param.name;
|
|
1069
|
-
return
|
|
1082
|
+
return;
|
|
1070
1083
|
}).filter((item) => item !== void 0)
|
|
1071
1084
|
);
|
|
1072
1085
|
}
|
|
@@ -1074,36 +1087,36 @@ var Operation = (_class = class {
|
|
|
1074
1087
|
this.headers.response = Object.keys(this.schema.responses).map((r) => {
|
|
1075
1088
|
let response = this.schema.responses[r];
|
|
1076
1089
|
if (!response) return [];
|
|
1077
|
-
if (
|
|
1078
|
-
this.schema.responses[r] =
|
|
1090
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1091
|
+
this.schema.responses[r] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, response, this.api);
|
|
1079
1092
|
response = this.schema.responses[r];
|
|
1080
|
-
if (!response ||
|
|
1093
|
+
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1081
1094
|
return [];
|
|
1082
1095
|
}
|
|
1083
1096
|
}
|
|
1084
|
-
return _optionalChain([response, 'optionalAccess',
|
|
1097
|
+
return _optionalChain([response, 'optionalAccess', _71 => _71.headers]) ? Object.keys(response.headers) : [];
|
|
1085
1098
|
}).reduce((a, b) => a.concat(b), []);
|
|
1086
1099
|
}
|
|
1087
1100
|
if (!this.headers.request.includes("Content-Type") && this.schema.requestBody) {
|
|
1088
1101
|
let requestBody = this.schema.requestBody;
|
|
1089
1102
|
if (requestBody) {
|
|
1090
|
-
if (
|
|
1091
|
-
this.schema.requestBody =
|
|
1103
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
1104
|
+
this.schema.requestBody = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1092
1105
|
requestBody = this.schema.requestBody;
|
|
1093
1106
|
}
|
|
1094
|
-
if (requestBody && !
|
|
1107
|
+
if (requestBody && !_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
|
|
1095
1108
|
this.headers.request.push("Content-Type");
|
|
1096
1109
|
}
|
|
1097
1110
|
}
|
|
1098
1111
|
}
|
|
1099
1112
|
if (this.schema.responses) {
|
|
1100
1113
|
const hasResponseContent = Object.keys(this.schema.responses).some((r) => {
|
|
1101
|
-
let response = _optionalChain([this, 'access',
|
|
1114
|
+
let response = _optionalChain([this, 'access', _72 => _72.schema, 'access', _73 => _73.responses, 'optionalAccess', _74 => _74[r]]);
|
|
1102
1115
|
if (!response) return false;
|
|
1103
|
-
if (
|
|
1104
|
-
this.schema.responses[r] =
|
|
1116
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1117
|
+
this.schema.responses[r] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, response, this.api);
|
|
1105
1118
|
response = this.schema.responses[r];
|
|
1106
|
-
if (!response ||
|
|
1119
|
+
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1107
1120
|
return false;
|
|
1108
1121
|
}
|
|
1109
1122
|
}
|
|
@@ -1165,7 +1178,7 @@ var Operation = (_class = class {
|
|
|
1165
1178
|
return [];
|
|
1166
1179
|
}
|
|
1167
1180
|
const oasTagMap = /* @__PURE__ */ new Map();
|
|
1168
|
-
if (Array.isArray(_optionalChain([this, 'access',
|
|
1181
|
+
if (Array.isArray(_optionalChain([this, 'access', _75 => _75.api, 'optionalAccess', _76 => _76.tags]))) {
|
|
1169
1182
|
this.api.tags.forEach((tag) => {
|
|
1170
1183
|
oasTagMap.set(tag.name, tag);
|
|
1171
1184
|
});
|
|
@@ -1208,19 +1221,19 @@ var Operation = (_class = class {
|
|
|
1208
1221
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-parameters}
|
|
1209
1222
|
*/
|
|
1210
1223
|
getParameters() {
|
|
1211
|
-
let parameters = (_optionalChain([this, 'access',
|
|
1224
|
+
let parameters = (_optionalChain([this, 'access', _77 => _77.schema, 'optionalAccess', _78 => _78.parameters]) || []).map((p) => {
|
|
1212
1225
|
let param = p;
|
|
1213
|
-
if (
|
|
1214
|
-
param =
|
|
1215
|
-
if (!param ||
|
|
1226
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1227
|
+
param = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1228
|
+
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1216
1229
|
}
|
|
1217
1230
|
return param;
|
|
1218
1231
|
}).filter((param) => param !== void 0);
|
|
1219
|
-
const commonParams = (_optionalChain([this, 'access',
|
|
1232
|
+
const commonParams = (_optionalChain([this, 'access', _79 => _79.api, 'optionalAccess', _80 => _80.paths, 'optionalAccess', _81 => _81[this.path], 'optionalAccess', _82 => _82.parameters]) || []).map((p) => {
|
|
1220
1233
|
let param = p;
|
|
1221
|
-
if (
|
|
1222
|
-
param =
|
|
1223
|
-
if (!param ||
|
|
1234
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1235
|
+
param = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1236
|
+
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1224
1237
|
}
|
|
1225
1238
|
return param;
|
|
1226
1239
|
}).filter((param) => param !== void 0);
|
|
@@ -1257,10 +1270,10 @@ var Operation = (_class = class {
|
|
|
1257
1270
|
);
|
|
1258
1271
|
}
|
|
1259
1272
|
if (!this.schemasDecorated) {
|
|
1260
|
-
|
|
1273
|
+
_chunkSAB2PGCDcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1261
1274
|
this.schemasDecorated = true;
|
|
1262
1275
|
}
|
|
1263
|
-
return
|
|
1276
|
+
return _chunkSAB2PGCDcjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
|
|
1264
1277
|
includeDiscriminatorMappingRefs: true,
|
|
1265
1278
|
...opts
|
|
1266
1279
|
});
|
|
@@ -1285,7 +1298,7 @@ var Operation = (_class = class {
|
|
|
1285
1298
|
);
|
|
1286
1299
|
}
|
|
1287
1300
|
if (!this.schemasDecorated) {
|
|
1288
|
-
|
|
1301
|
+
_chunkSAB2PGCDcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1289
1302
|
this.schemasDecorated = true;
|
|
1290
1303
|
}
|
|
1291
1304
|
return getResponseAsJSONSchema(this, this.api, statusCode, {
|
|
@@ -1299,9 +1312,9 @@ var Operation = (_class = class {
|
|
|
1299
1312
|
*/
|
|
1300
1313
|
getResponseStatusCodes() {
|
|
1301
1314
|
if (!this.schema.responses) return [];
|
|
1302
|
-
if (
|
|
1303
|
-
this.schema.responses =
|
|
1304
|
-
if (!this.schema.responses ||
|
|
1315
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1316
|
+
this.schema.responses = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
|
|
1317
|
+
if (!this.schema.responses || _chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1305
1318
|
return [];
|
|
1306
1319
|
}
|
|
1307
1320
|
}
|
|
@@ -1309,7 +1322,7 @@ var Operation = (_class = class {
|
|
|
1309
1322
|
if (key.startsWith("x-")) {
|
|
1310
1323
|
return false;
|
|
1311
1324
|
}
|
|
1312
|
-
const response = _optionalChain([this, 'access',
|
|
1325
|
+
const response = _optionalChain([this, 'access', _83 => _83.schema, 'access', _84 => _84.responses, 'optionalAccess', _85 => _85[key]]);
|
|
1313
1326
|
return response && typeof response === "object";
|
|
1314
1327
|
});
|
|
1315
1328
|
}
|
|
@@ -1325,9 +1338,9 @@ var Operation = (_class = class {
|
|
|
1325
1338
|
Object.values(this.schema.responses).forEach((response) => {
|
|
1326
1339
|
let resp = response;
|
|
1327
1340
|
if (!resp) return;
|
|
1328
|
-
if (
|
|
1329
|
-
resp =
|
|
1330
|
-
if (!resp ||
|
|
1341
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
|
|
1342
|
+
resp = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, resp, this.api);
|
|
1343
|
+
if (!resp || _chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
|
|
1331
1344
|
return;
|
|
1332
1345
|
}
|
|
1333
1346
|
}
|
|
@@ -1354,10 +1367,10 @@ var Operation = (_class = class {
|
|
|
1354
1367
|
getResolvedRequestBody() {
|
|
1355
1368
|
let requestBody = this.schema.requestBody;
|
|
1356
1369
|
if (!requestBody) return false;
|
|
1357
|
-
if (
|
|
1358
|
-
this.schema.requestBody =
|
|
1370
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
1371
|
+
this.schema.requestBody = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1359
1372
|
requestBody = this.schema.requestBody;
|
|
1360
|
-
if (!requestBody ||
|
|
1373
|
+
if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
1361
1374
|
return false;
|
|
1362
1375
|
}
|
|
1363
1376
|
}
|
|
@@ -1425,7 +1438,7 @@ var Operation = (_class = class {
|
|
|
1425
1438
|
let availableMediaType;
|
|
1426
1439
|
const mediaTypes = this.getRequestBodyMediaTypes();
|
|
1427
1440
|
mediaTypes.forEach((mt) => {
|
|
1428
|
-
if (!availableMediaType &&
|
|
1441
|
+
if (!availableMediaType && _chunkSAB2PGCDcjs.matches_mimetype_default.json(mt)) {
|
|
1429
1442
|
availableMediaType = mt;
|
|
1430
1443
|
}
|
|
1431
1444
|
});
|
|
@@ -1452,7 +1465,7 @@ var Operation = (_class = class {
|
|
|
1452
1465
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#request-body-examples}
|
|
1453
1466
|
*/
|
|
1454
1467
|
getRequestBodyExamples() {
|
|
1455
|
-
const isRequestExampleValueDefined = typeof _optionalChain([this, 'access',
|
|
1468
|
+
const isRequestExampleValueDefined = typeof _optionalChain([this, 'access', _86 => _86.requestBodyExamples, 'optionalAccess', _87 => _87[0], 'optionalAccess', _88 => _88.examples, 'optionalAccess', _89 => _89[0], 'access', _90 => _90.value]) !== "undefined";
|
|
1456
1469
|
if (this.requestBodyExamples && isRequestExampleValueDefined) {
|
|
1457
1470
|
return this.requestBodyExamples;
|
|
1458
1471
|
}
|
|
@@ -1472,10 +1485,10 @@ var Operation = (_class = class {
|
|
|
1472
1485
|
}
|
|
1473
1486
|
let response = this.schema.responses[statusCode];
|
|
1474
1487
|
if (!response) return false;
|
|
1475
|
-
if (
|
|
1476
|
-
this.schema.responses[statusCode] =
|
|
1488
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1489
|
+
this.schema.responses[statusCode] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, response, this.api);
|
|
1477
1490
|
response = this.schema.responses[statusCode];
|
|
1478
|
-
if (!response ||
|
|
1491
|
+
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1479
1492
|
return false;
|
|
1480
1493
|
}
|
|
1481
1494
|
}
|
|
@@ -1516,19 +1529,19 @@ var Operation = (_class = class {
|
|
|
1516
1529
|
if (!this.schema.callbacks) return false;
|
|
1517
1530
|
let callbackObj = this.schema.callbacks[identifier];
|
|
1518
1531
|
if (!callbackObj) return false;
|
|
1519
|
-
if (
|
|
1520
|
-
this.schema.callbacks[identifier] =
|
|
1532
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
|
|
1533
|
+
this.schema.callbacks[identifier] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, callbackObj, this.api);
|
|
1521
1534
|
callbackObj = this.schema.callbacks[identifier];
|
|
1522
|
-
if (!callbackObj ||
|
|
1535
|
+
if (!callbackObj || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
|
|
1523
1536
|
return false;
|
|
1524
1537
|
}
|
|
1525
1538
|
}
|
|
1526
1539
|
let callback = callbackObj[expression];
|
|
1527
1540
|
if (!callback) return false;
|
|
1528
|
-
if (
|
|
1529
|
-
callbackObj[expression] =
|
|
1541
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
|
|
1542
|
+
callbackObj[expression] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, callback, this.api);
|
|
1530
1543
|
callback = callbackObj[expression];
|
|
1531
|
-
if (!callback ||
|
|
1544
|
+
if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
|
|
1532
1545
|
return false;
|
|
1533
1546
|
}
|
|
1534
1547
|
}
|
|
@@ -1547,27 +1560,27 @@ var Operation = (_class = class {
|
|
|
1547
1560
|
if (!this.hasCallbacks()) return [];
|
|
1548
1561
|
const callbacks = [];
|
|
1549
1562
|
Object.keys(this.schema.callbacks).forEach((callback) => {
|
|
1550
|
-
let cb = _optionalChain([this, 'access',
|
|
1563
|
+
let cb = _optionalChain([this, 'access', _91 => _91.schema, 'access', _92 => _92.callbacks, 'optionalAccess', _93 => _93[callback]]);
|
|
1551
1564
|
if (!cb) return;
|
|
1552
|
-
if (
|
|
1553
|
-
this.schema.callbacks[callback] =
|
|
1565
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
|
|
1566
|
+
this.schema.callbacks[callback] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, cb, this.api);
|
|
1554
1567
|
cb = this.schema.callbacks[callback];
|
|
1555
|
-
if (!cb ||
|
|
1568
|
+
if (!cb || _chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
|
|
1556
1569
|
return;
|
|
1557
1570
|
}
|
|
1558
1571
|
}
|
|
1559
1572
|
Object.keys(cb).forEach((expression) => {
|
|
1560
1573
|
let callbackPath = cb[expression];
|
|
1561
1574
|
if (!callbackPath) return;
|
|
1562
|
-
if (
|
|
1563
|
-
cb[expression] =
|
|
1575
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
|
|
1576
|
+
cb[expression] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, callbackPath, this.api);
|
|
1564
1577
|
callbackPath = cb[expression];
|
|
1565
|
-
if (!callbackPath ||
|
|
1578
|
+
if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
|
|
1566
1579
|
return;
|
|
1567
1580
|
}
|
|
1568
1581
|
}
|
|
1569
1582
|
Object.keys(callbackPath).forEach((method) => {
|
|
1570
|
-
if (!
|
|
1583
|
+
if (!_chunkSAB2PGCDcjs.supportedMethods.includes(method)) return;
|
|
1571
1584
|
const found = this.getCallback(callback, expression, method);
|
|
1572
1585
|
if (found) {
|
|
1573
1586
|
callbacks.push(found);
|
|
@@ -1610,7 +1623,7 @@ var Operation = (_class = class {
|
|
|
1610
1623
|
* @deprecated Use `oas.getExtension(extension, operation)` instead.
|
|
1611
1624
|
*/
|
|
1612
1625
|
getExtension(extension) {
|
|
1613
|
-
return _optionalChain([this, 'access',
|
|
1626
|
+
return _optionalChain([this, 'access', _94 => _94.schema, 'optionalAccess', _95 => _95[extension]]);
|
|
1614
1627
|
}
|
|
1615
1628
|
/**
|
|
1616
1629
|
* Returns an object with groups of all example definitions (body/header/query/path/response/etc.).
|
|
@@ -1645,12 +1658,12 @@ var Operation = (_class = class {
|
|
|
1645
1658
|
}
|
|
1646
1659
|
this.dereferencing.processing = true;
|
|
1647
1660
|
if (!this.schemasDecorated) {
|
|
1648
|
-
|
|
1661
|
+
_chunkSAB2PGCDcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1649
1662
|
this.schemasDecorated = true;
|
|
1650
1663
|
}
|
|
1651
1664
|
const { api, schema, promises } = this;
|
|
1652
1665
|
const circularRefs = /* @__PURE__ */ new Set();
|
|
1653
|
-
const dereferencingOptions =
|
|
1666
|
+
const dereferencingOptions = _chunkSAB2PGCDcjs.getDereferencingOptions.call(void 0, circularRefs);
|
|
1654
1667
|
const parser = new (0, _jsonschemarefparser.$RefParser)();
|
|
1655
1668
|
return parser.dereference(
|
|
1656
1669
|
"#/__INTERNAL__",
|
|
@@ -1697,7 +1710,7 @@ var Operation = (_class = class {
|
|
|
1697
1710
|
// We need to convert our `Set` to an array in order to match the typings.
|
|
1698
1711
|
circularRefs: [...circularRefs]
|
|
1699
1712
|
};
|
|
1700
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
1713
|
+
if (_optionalChain([opts, 'optionalAccess', _96 => _96.cb])) {
|
|
1701
1714
|
opts.cb();
|
|
1702
1715
|
}
|
|
1703
1716
|
}).then(() => {
|
|
@@ -1761,7 +1774,7 @@ var Callback = class extends Operation {
|
|
|
1761
1774
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
|
|
1762
1775
|
*/
|
|
1763
1776
|
getSummary() {
|
|
1764
|
-
if (_optionalChain([this, 'access',
|
|
1777
|
+
if (_optionalChain([this, 'access', _97 => _97.schema, 'optionalAccess', _98 => _98.summary]) && typeof this.schema.summary === "string") {
|
|
1765
1778
|
return this.schema.summary;
|
|
1766
1779
|
} else if (this.parentSchema.summary && typeof this.parentSchema.summary === "string") {
|
|
1767
1780
|
return this.parentSchema.summary;
|
|
@@ -1775,7 +1788,7 @@ var Callback = class extends Operation {
|
|
|
1775
1788
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
|
|
1776
1789
|
*/
|
|
1777
1790
|
getDescription() {
|
|
1778
|
-
if (_optionalChain([this, 'access',
|
|
1791
|
+
if (_optionalChain([this, 'access', _99 => _99.schema, 'optionalAccess', _100 => _100.description]) && typeof this.schema.description === "string") {
|
|
1779
1792
|
return this.schema.description;
|
|
1780
1793
|
} else if (this.parentSchema.description && typeof this.parentSchema.description === "string") {
|
|
1781
1794
|
return this.parentSchema.description;
|
|
@@ -1789,19 +1802,19 @@ var Callback = class extends Operation {
|
|
|
1789
1802
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-parameters}
|
|
1790
1803
|
*/
|
|
1791
1804
|
getParameters() {
|
|
1792
|
-
let parameters = (_optionalChain([this, 'access',
|
|
1805
|
+
let parameters = (_optionalChain([this, 'access', _101 => _101.schema, 'optionalAccess', _102 => _102.parameters]) || []).map((p) => {
|
|
1793
1806
|
let param = p;
|
|
1794
|
-
if (
|
|
1795
|
-
param =
|
|
1796
|
-
if (!param ||
|
|
1807
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1808
|
+
param = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1809
|
+
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1797
1810
|
}
|
|
1798
1811
|
return param;
|
|
1799
1812
|
}).filter((param) => param !== void 0);
|
|
1800
1813
|
const commonParams = (this.parentSchema.parameters || []).map((p) => {
|
|
1801
1814
|
let param = p;
|
|
1802
|
-
if (
|
|
1803
|
-
param =
|
|
1804
|
-
if (!param ||
|
|
1815
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1816
|
+
param = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1817
|
+
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1805
1818
|
}
|
|
1806
1819
|
return param;
|
|
1807
1820
|
}).filter((param) => param !== void 0);
|
|
@@ -1819,17 +1832,17 @@ var Webhook = class extends Operation {
|
|
|
1819
1832
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
|
|
1820
1833
|
*/
|
|
1821
1834
|
getSummary() {
|
|
1822
|
-
if (_optionalChain([this, 'access',
|
|
1835
|
+
if (_optionalChain([this, 'access', _103 => _103.schema, 'optionalAccess', _104 => _104.summary]) && typeof this.schema.summary === "string") {
|
|
1823
1836
|
return this.schema.summary;
|
|
1824
1837
|
} else if (!this.api.webhooks) {
|
|
1825
1838
|
return void 0;
|
|
1826
1839
|
}
|
|
1827
1840
|
let webhookPath = this.api.webhooks[this.path];
|
|
1828
|
-
if (
|
|
1829
|
-
this.api.webhooks[this.path] =
|
|
1841
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
|
|
1842
|
+
this.api.webhooks[this.path] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1830
1843
|
webhookPath = this.api.webhooks[this.path];
|
|
1831
1844
|
}
|
|
1832
|
-
return _optionalChain([webhookPath, 'optionalAccess',
|
|
1845
|
+
return _optionalChain([webhookPath, 'optionalAccess', _105 => _105.summary]);
|
|
1833
1846
|
}
|
|
1834
1847
|
/**
|
|
1835
1848
|
* Retrieve the `description` for this operation.
|
|
@@ -1838,17 +1851,17 @@ var Webhook = class extends Operation {
|
|
|
1838
1851
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
|
|
1839
1852
|
*/
|
|
1840
1853
|
getDescription() {
|
|
1841
|
-
if (_optionalChain([this, 'access',
|
|
1854
|
+
if (_optionalChain([this, 'access', _106 => _106.schema, 'optionalAccess', _107 => _107.description]) && typeof this.schema.description === "string") {
|
|
1842
1855
|
return this.schema.description;
|
|
1843
1856
|
} else if (!this.api.webhooks) {
|
|
1844
1857
|
return void 0;
|
|
1845
1858
|
}
|
|
1846
1859
|
let webhookPath = this.api.webhooks[this.path];
|
|
1847
|
-
if (
|
|
1848
|
-
this.api.webhooks[this.path] =
|
|
1860
|
+
if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
|
|
1861
|
+
this.api.webhooks[this.path] = _chunkSAB2PGCDcjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1849
1862
|
webhookPath = this.api.webhooks[this.path];
|
|
1850
1863
|
}
|
|
1851
|
-
return _optionalChain([webhookPath, 'optionalAccess',
|
|
1864
|
+
return _optionalChain([webhookPath, 'optionalAccess', _108 => _108.description]);
|
|
1852
1865
|
}
|
|
1853
1866
|
};
|
|
1854
1867
|
|
|
@@ -1869,4 +1882,4 @@ exports.Operation = Operation; exports.Callback = Callback; exports.Webhook = We
|
|
|
1869
1882
|
* @license Apache-2.0
|
|
1870
1883
|
* @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
|
|
1871
1884
|
*/
|
|
1872
|
-
//# sourceMappingURL=chunk-
|
|
1885
|
+
//# sourceMappingURL=chunk-7BWVOLZR.cjs.map
|