oas 33.1.3 → 33.1.5
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 +5 -5
- package/dist/analyzer/index.js +3 -3
- package/dist/{chunk-HSJR6UTO.cjs → chunk-2X4PY2BS.cjs} +29 -6
- package/dist/chunk-2X4PY2BS.cjs.map +1 -0
- package/dist/{chunk-AYNAGIQI.js → chunk-3ZQFQFIG.js} +4 -3
- package/dist/chunk-3ZQFQFIG.js.map +1 -0
- package/dist/{chunk-KLZZFBY2.js → chunk-65ZD6K3I.js} +29 -6
- package/dist/chunk-65ZD6K3I.js.map +1 -0
- package/dist/{chunk-H7JRZ3CC.js → chunk-R52B7CL7.js} +3 -3
- package/dist/{chunk-2J4FCNDK.cjs → chunk-SNKO3NYT.cjs} +19 -19
- package/dist/{chunk-2J4FCNDK.cjs.map → chunk-SNKO3NYT.cjs.map} +1 -1
- package/dist/{chunk-MW3V6OHC.cjs → chunk-TQD76MVX.cjs} +71 -70
- package/dist/chunk-TQD76MVX.cjs.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +3 -3
- package/dist/operation/index.cjs +3 -3
- package/dist/operation/index.js +2 -2
- package/dist/reducer/index.cjs +7 -7
- package/dist/reducer/index.js +1 -1
- package/dist/utils.cjs +2 -2
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AYNAGIQI.js.map +0 -1
- package/dist/chunk-HSJR6UTO.cjs.map +0 -1
- package/dist/chunk-KLZZFBY2.js.map +0 -1
- package/dist/chunk-MW3V6OHC.cjs.map +0 -1
- /package/dist/{chunk-H7JRZ3CC.js.map → chunk-R52B7CL7.js.map} +0 -0
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk2X4PY2BScjs = require('./chunk-2X4PY2BS.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkAYA3UT4Lcjs = require('./chunk-AYA3UT4L.cjs');
|
|
@@ -56,7 +56,7 @@ function usesPolymorphism(schema) {
|
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
58
|
function objectify(thing) {
|
|
59
|
-
if (!
|
|
59
|
+
if (!_chunk2X4PY2BScjs.isObject.call(void 0, thing)) {
|
|
60
60
|
return {};
|
|
61
61
|
}
|
|
62
62
|
return thing;
|
|
@@ -135,7 +135,7 @@ function sampleFromSchema(schema, opts = {}) {
|
|
|
135
135
|
if (seenRefs.has(refToRelease)) {
|
|
136
136
|
return void 0;
|
|
137
137
|
}
|
|
138
|
-
objectifySchema =
|
|
138
|
+
objectifySchema = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
|
|
139
139
|
if (!objectifySchema || _chunk3MTU2ESPcjs.isRef.call(void 0, objectifySchema)) {
|
|
140
140
|
return void 0;
|
|
141
141
|
}
|
|
@@ -157,7 +157,7 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
157
157
|
const resolvedAllOf = schema.allOf.map((subSchema) => {
|
|
158
158
|
let sub = objectify(subSchema);
|
|
159
159
|
if (definition && _chunk3MTU2ESPcjs.isRef.call(void 0, sub)) {
|
|
160
|
-
const resolved =
|
|
160
|
+
const resolved = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, sub, definition, /* @__PURE__ */ new Set());
|
|
161
161
|
if (resolved && !_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) {
|
|
162
162
|
sub = resolved;
|
|
163
163
|
}
|
|
@@ -197,9 +197,10 @@ function sampleFromResolvedSchema(schema, opts, seenRefs) {
|
|
|
197
197
|
const { example, additionalProperties, properties, items } = schema;
|
|
198
198
|
const { includeReadOnly, includeWriteOnly } = opts;
|
|
199
199
|
if (example !== void 0) {
|
|
200
|
-
|
|
200
|
+
const cleanedExample = deeplyStripKey(example, "$$ref", (val) => {
|
|
201
201
|
return typeof val === "string" && val.indexOf("#") > -1;
|
|
202
202
|
});
|
|
203
|
+
return _chunk2X4PY2BScjs.dereferenceRefDeep.call(void 0, cleanedExample, opts.definition, seenRefs);
|
|
203
204
|
}
|
|
204
205
|
if (!type) {
|
|
205
206
|
if (properties || additionalProperties) {
|
|
@@ -277,8 +278,8 @@ var samples_default = memo;
|
|
|
277
278
|
// src/operation/lib/get-mediatype-examples.ts
|
|
278
279
|
function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {}) {
|
|
279
280
|
if (mediaTypeObject.example) {
|
|
280
|
-
mediaTypeObject.example =
|
|
281
|
-
if (mediaTypeObject.example === void 0 ||
|
|
281
|
+
mediaTypeObject.example = _chunk2X4PY2BScjs.dereferenceRefDeep.call(void 0, mediaTypeObject.example, definition);
|
|
282
|
+
if (mediaTypeObject.example === void 0 || _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, mediaTypeObject.example).size > 0) {
|
|
282
283
|
return [];
|
|
283
284
|
}
|
|
284
285
|
return [
|
|
@@ -294,7 +295,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
294
295
|
let example = examples[key];
|
|
295
296
|
if (example !== null && typeof example === "object") {
|
|
296
297
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
|
|
297
|
-
example =
|
|
298
|
+
example = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, example, definition);
|
|
298
299
|
if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
|
|
299
300
|
return false;
|
|
300
301
|
}
|
|
@@ -306,8 +307,8 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
306
307
|
description = example.description;
|
|
307
308
|
}
|
|
308
309
|
if ("value" in example) {
|
|
309
|
-
example.value =
|
|
310
|
-
if (example.value === void 0 ||
|
|
310
|
+
example.value = _chunk2X4PY2BScjs.dereferenceRefDeep.call(void 0, example.value, definition);
|
|
311
|
+
if (example.value === void 0 || _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, example.value).size > 0) {
|
|
311
312
|
return false;
|
|
312
313
|
}
|
|
313
314
|
example = example.value;
|
|
@@ -324,7 +325,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
324
325
|
}
|
|
325
326
|
}
|
|
326
327
|
if (mediaTypeObject.schema) {
|
|
327
|
-
if (!
|
|
328
|
+
if (!_chunk2X4PY2BScjs.matches_mimetype_default.xml(mediaType)) {
|
|
328
329
|
return [
|
|
329
330
|
{
|
|
330
331
|
value: samples_default(structuredClone(mediaTypeObject.schema), {
|
|
@@ -345,7 +346,7 @@ function getResponseExamples(operation, definition) {
|
|
|
345
346
|
let onlyHeaders = false;
|
|
346
347
|
if (!response) return false;
|
|
347
348
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
348
|
-
response =
|
|
349
|
+
response = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, definition);
|
|
349
350
|
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) return false;
|
|
350
351
|
}
|
|
351
352
|
const mediaTypes = {};
|
|
@@ -385,14 +386,14 @@ function getCallbackExamples(operation, definition) {
|
|
|
385
386
|
let callback = _optionalChain([operation, 'access', _17 => _17.callbacks, 'optionalAccess', _18 => _18[identifier]]);
|
|
386
387
|
if (!callback) return [];
|
|
387
388
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
|
|
388
|
-
callback =
|
|
389
|
+
callback = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callback, definition);
|
|
389
390
|
if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) return [];
|
|
390
391
|
}
|
|
391
392
|
const items = Object.keys(callback).map((expression) => {
|
|
392
393
|
let callbackPath = callback[expression];
|
|
393
394
|
if (!callbackPath) return [];
|
|
394
395
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
|
|
395
|
-
callbackPath =
|
|
396
|
+
callbackPath = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callbackPath, definition);
|
|
396
397
|
if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) return [];
|
|
397
398
|
}
|
|
398
399
|
return Object.keys(callbackPath).map((method) => {
|
|
@@ -475,7 +476,7 @@ function getExampleGroups(operation) {
|
|
|
475
476
|
Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
|
|
476
477
|
let example = paramExample;
|
|
477
478
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, example)) {
|
|
478
|
-
example =
|
|
479
|
+
example = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, example, operation.api);
|
|
479
480
|
if (!example || _chunk3MTU2ESPcjs.isRef.call(void 0, example)) return;
|
|
480
481
|
}
|
|
481
482
|
groups[exampleKey] = {
|
|
@@ -523,7 +524,7 @@ function getRequestBodyExamples(operation, definition) {
|
|
|
523
524
|
if (!requestBody) {
|
|
524
525
|
return [];
|
|
525
526
|
} else if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
526
|
-
requestBody =
|
|
527
|
+
requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, requestBody, definition);
|
|
527
528
|
}
|
|
528
529
|
if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
|
|
529
530
|
return [];
|
|
@@ -588,7 +589,7 @@ function getOperationId(path, method, operation, opts = {}) {
|
|
|
588
589
|
}
|
|
589
590
|
|
|
590
591
|
// src/operation/transformers/get-response-as-json-schema.ts
|
|
591
|
-
var isJSON =
|
|
592
|
+
var isJSON = _chunk2X4PY2BScjs.matches_mimetype_default.json;
|
|
592
593
|
function buildHeadersSchema(response, schemaOptions) {
|
|
593
594
|
const headersSchema = {
|
|
594
595
|
type: "object",
|
|
@@ -601,7 +602,7 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
601
602
|
let headerEntry = _optionalChain([response, 'access', _45 => _45.headers, 'optionalAccess', _46 => _46[key]]);
|
|
602
603
|
if (!headerEntry) return;
|
|
603
604
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) {
|
|
604
|
-
headerEntry =
|
|
605
|
+
headerEntry = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
|
|
605
606
|
if (!headerEntry || _chunk3MTU2ESPcjs.isRef.call(void 0, headerEntry)) return;
|
|
606
607
|
}
|
|
607
608
|
if (headerEntry.schema) {
|
|
@@ -609,10 +610,10 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
609
610
|
let headerSchema = header.schema;
|
|
610
611
|
if (!headerSchema) return;
|
|
611
612
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) {
|
|
612
|
-
headerSchema =
|
|
613
|
+
headerSchema = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
|
|
613
614
|
if (!headerSchema || _chunk3MTU2ESPcjs.isRef.call(void 0, headerSchema)) return;
|
|
614
615
|
}
|
|
615
|
-
headersSchema.properties[key] =
|
|
616
|
+
headersSchema.properties[key] = _chunk2X4PY2BScjs.toJSONSchema.call(void 0, _chunk2X4PY2BScjs.cloneObject.call(void 0, headerSchema), {
|
|
616
617
|
addEnumsToDescriptions: true,
|
|
617
618
|
...schemaOptions
|
|
618
619
|
});
|
|
@@ -666,32 +667,32 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
666
667
|
}
|
|
667
668
|
if (preferredContentType) {
|
|
668
669
|
if (contentTypes.includes(preferredContentType)) {
|
|
669
|
-
const schema2 =
|
|
670
|
+
const schema2 = _chunk2X4PY2BScjs.cloneObject.call(void 0, content[preferredContentType].schema);
|
|
670
671
|
if (!schema2) {
|
|
671
672
|
return null;
|
|
672
673
|
}
|
|
673
|
-
return
|
|
674
|
+
return _chunk2X4PY2BScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
674
675
|
}
|
|
675
676
|
return null;
|
|
676
677
|
}
|
|
677
678
|
for (let i = 0; i < contentTypes.length; i++) {
|
|
678
679
|
if (isJSON(contentTypes[i])) {
|
|
679
|
-
const schema2 =
|
|
680
|
+
const schema2 = _chunk2X4PY2BScjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
|
|
680
681
|
if (!schema2) {
|
|
681
682
|
return {};
|
|
682
683
|
}
|
|
683
|
-
return
|
|
684
|
+
return _chunk2X4PY2BScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
684
685
|
}
|
|
685
686
|
}
|
|
686
687
|
const contentType = contentTypes.shift();
|
|
687
688
|
if (!contentType) {
|
|
688
689
|
return {};
|
|
689
690
|
}
|
|
690
|
-
const schema =
|
|
691
|
+
const schema = _chunk2X4PY2BScjs.cloneObject.call(void 0, content[contentType].schema);
|
|
691
692
|
if (!schema) {
|
|
692
693
|
return {};
|
|
693
694
|
}
|
|
694
|
-
return
|
|
695
|
+
return _chunk2X4PY2BScjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
|
|
695
696
|
}
|
|
696
697
|
const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _47 => _47.contentType]));
|
|
697
698
|
if (_optionalChain([opts, 'optionalAccess', _48 => _48.contentType]) && !foundSchema) {
|
|
@@ -710,23 +711,23 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
710
711
|
// able to render so instead of generating a JSON Schema with an `undefined` type we should
|
|
711
712
|
// default to `string` so there's at least *something* the end-user can interact with.
|
|
712
713
|
type: _nullishCoalesce(schemaType, () => ( "string")),
|
|
713
|
-
schema:
|
|
714
|
+
schema: _chunk2X4PY2BScjs.isPrimitive.call(void 0, schema) ? schema : {
|
|
714
715
|
...schema,
|
|
715
|
-
$schema:
|
|
716
|
+
$schema: _chunk2X4PY2BScjs.getSchemaVersionString.call(void 0, schema, api)
|
|
716
717
|
},
|
|
717
718
|
label: "Response body"
|
|
718
719
|
};
|
|
719
720
|
if (response.description && schemaWrapper.schema) {
|
|
720
721
|
schemaWrapper.description = response.description;
|
|
721
722
|
}
|
|
722
|
-
|
|
723
|
+
_chunk2X4PY2BScjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
|
|
723
724
|
if (usedSchemas.has(ref)) {
|
|
724
725
|
return usedSchemas.get(ref);
|
|
725
726
|
}
|
|
726
727
|
try {
|
|
727
|
-
const resolved =
|
|
728
|
+
const resolved = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
|
|
728
729
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, resolved)) return;
|
|
729
|
-
const converted =
|
|
730
|
+
const converted = _chunk2X4PY2BScjs.toJSONSchema.call(void 0, structuredClone(resolved), {
|
|
730
731
|
...baseSchemaOptions,
|
|
731
732
|
seenRefs
|
|
732
733
|
});
|
|
@@ -736,11 +737,11 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
736
737
|
}
|
|
737
738
|
});
|
|
738
739
|
if (schemaWrapper.schema && usedSchemas.size > 0) {
|
|
739
|
-
const refsInOutput =
|
|
740
|
+
const refsInOutput = _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, schemaWrapper.schema);
|
|
740
741
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
|
|
741
|
-
const referencedSchemas =
|
|
742
|
+
const referencedSchemas = _chunk2X4PY2BScjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
742
743
|
if (referencedSchemas.size > 0) {
|
|
743
|
-
|
|
744
|
+
_chunk2X4PY2BScjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
|
|
744
745
|
}
|
|
745
746
|
}
|
|
746
747
|
jsonSchema.push(schemaWrapper);
|
|
@@ -752,10 +753,10 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
752
753
|
});
|
|
753
754
|
if (headersWrapper.schema && usedSchemas.size > 0) {
|
|
754
755
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("headers"), () => ( /* @__PURE__ */ new Set()));
|
|
755
|
-
const refsInOutput =
|
|
756
|
-
const referencedSchemas =
|
|
756
|
+
const refsInOutput = _chunk2X4PY2BScjs.collectRefsInSchema.call(void 0, headersWrapper.schema);
|
|
757
|
+
const referencedSchemas = _chunk2X4PY2BScjs.filterRequiredRefsToReferenced.call(void 0, /* @__PURE__ */ new Set([...refsInGroup, ...refsInOutput]), usedSchemas);
|
|
757
758
|
if (referencedSchemas.size > 0) {
|
|
758
|
-
|
|
759
|
+
_chunk2X4PY2BScjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
|
|
759
760
|
}
|
|
760
761
|
}
|
|
761
762
|
jsonSchema.push(headersWrapper);
|
|
@@ -895,7 +896,7 @@ var Operation = (_class = class {
|
|
|
895
896
|
let types = [];
|
|
896
897
|
if (this.schema.requestBody) {
|
|
897
898
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.requestBody)) {
|
|
898
|
-
this.schema.requestBody =
|
|
899
|
+
this.schema.requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
|
|
899
900
|
}
|
|
900
901
|
if (this.schema.requestBody && "content" in this.schema.requestBody) {
|
|
901
902
|
types = Object.keys(this.schema.requestBody.content);
|
|
@@ -906,7 +907,7 @@ var Operation = (_class = class {
|
|
|
906
907
|
this.contentType = types[0];
|
|
907
908
|
}
|
|
908
909
|
types.forEach((t) => {
|
|
909
|
-
if (
|
|
910
|
+
if (_chunk2X4PY2BScjs.matches_mimetype_default.json(t)) {
|
|
910
911
|
this.contentType = t;
|
|
911
912
|
}
|
|
912
913
|
});
|
|
@@ -919,7 +920,7 @@ var Operation = (_class = class {
|
|
|
919
920
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
920
921
|
*/
|
|
921
922
|
isFormUrlEncoded() {
|
|
922
|
-
return
|
|
923
|
+
return _chunk2X4PY2BScjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
|
|
923
924
|
}
|
|
924
925
|
/**
|
|
925
926
|
* Checks if the current operation has a mutipart content type payload.
|
|
@@ -928,7 +929,7 @@ var Operation = (_class = class {
|
|
|
928
929
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
929
930
|
*/
|
|
930
931
|
isMultipart() {
|
|
931
|
-
return
|
|
932
|
+
return _chunk2X4PY2BScjs.matches_mimetype_default.multipart(this.getContentType());
|
|
932
933
|
}
|
|
933
934
|
/**
|
|
934
935
|
* Checks if the current operation has a JSON-like content type payload.
|
|
@@ -937,7 +938,7 @@ var Operation = (_class = class {
|
|
|
937
938
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
938
939
|
*/
|
|
939
940
|
isJson() {
|
|
940
|
-
return
|
|
941
|
+
return _chunk2X4PY2BScjs.matches_mimetype_default.json(this.getContentType());
|
|
941
942
|
}
|
|
942
943
|
/**
|
|
943
944
|
* Checks if the current operation has an XML content type payload.
|
|
@@ -946,7 +947,7 @@ var Operation = (_class = class {
|
|
|
946
947
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
947
948
|
*/
|
|
948
949
|
isXml() {
|
|
949
|
-
return
|
|
950
|
+
return _chunk2X4PY2BScjs.matches_mimetype_default.xml(this.getContentType());
|
|
950
951
|
}
|
|
951
952
|
/**
|
|
952
953
|
* Checks if the current operation is a webhook or not.
|
|
@@ -994,7 +995,7 @@ var Operation = (_class = class {
|
|
|
994
995
|
security = _optionalChain([this, 'access', _65 => _65.api, 'optionalAccess', _66 => _66.components, 'optionalAccess', _67 => _67.securitySchemes, 'optionalAccess', _68 => _68[key]]);
|
|
995
996
|
if (!security) return false;
|
|
996
997
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, security)) {
|
|
997
|
-
security =
|
|
998
|
+
security = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, security, this.api);
|
|
998
999
|
if (!security || _chunk3MTU2ESPcjs.isRef.call(void 0, security)) return false;
|
|
999
1000
|
}
|
|
1000
1001
|
} catch (e4) {
|
|
@@ -1075,7 +1076,7 @@ var Operation = (_class = class {
|
|
|
1075
1076
|
this.schema.parameters.map((p) => {
|
|
1076
1077
|
let param = p;
|
|
1077
1078
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1078
|
-
param =
|
|
1079
|
+
param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1079
1080
|
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1080
1081
|
}
|
|
1081
1082
|
if (param.in && param.in === "header") return param.name;
|
|
@@ -1088,7 +1089,7 @@ var Operation = (_class = class {
|
|
|
1088
1089
|
let response = this.schema.responses[r];
|
|
1089
1090
|
if (!response) return [];
|
|
1090
1091
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1091
|
-
this.schema.responses[r] =
|
|
1092
|
+
this.schema.responses[r] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, this.api);
|
|
1092
1093
|
response = this.schema.responses[r];
|
|
1093
1094
|
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1094
1095
|
return [];
|
|
@@ -1101,7 +1102,7 @@ var Operation = (_class = class {
|
|
|
1101
1102
|
let requestBody = this.schema.requestBody;
|
|
1102
1103
|
if (requestBody) {
|
|
1103
1104
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
1104
|
-
this.schema.requestBody =
|
|
1105
|
+
this.schema.requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1105
1106
|
requestBody = this.schema.requestBody;
|
|
1106
1107
|
}
|
|
1107
1108
|
if (requestBody && !_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
|
|
@@ -1114,7 +1115,7 @@ var Operation = (_class = class {
|
|
|
1114
1115
|
let response = _optionalChain([this, 'access', _72 => _72.schema, 'access', _73 => _73.responses, 'optionalAccess', _74 => _74[r]]);
|
|
1115
1116
|
if (!response) return false;
|
|
1116
1117
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1117
|
-
this.schema.responses[r] =
|
|
1118
|
+
this.schema.responses[r] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, this.api);
|
|
1118
1119
|
response = this.schema.responses[r];
|
|
1119
1120
|
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1120
1121
|
return false;
|
|
@@ -1224,7 +1225,7 @@ var Operation = (_class = class {
|
|
|
1224
1225
|
let parameters = (_optionalChain([this, 'access', _77 => _77.schema, 'optionalAccess', _78 => _78.parameters]) || []).map((p) => {
|
|
1225
1226
|
let param = p;
|
|
1226
1227
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1227
|
-
param =
|
|
1228
|
+
param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1228
1229
|
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1229
1230
|
}
|
|
1230
1231
|
return param;
|
|
@@ -1232,7 +1233,7 @@ var Operation = (_class = class {
|
|
|
1232
1233
|
const commonParams = (_optionalChain([this, 'access', _79 => _79.api, 'optionalAccess', _80 => _80.paths, 'optionalAccess', _81 => _81[this.path], 'optionalAccess', _82 => _82.parameters]) || []).map((p) => {
|
|
1233
1234
|
let param = p;
|
|
1234
1235
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1235
|
-
param =
|
|
1236
|
+
param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1236
1237
|
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1237
1238
|
}
|
|
1238
1239
|
return param;
|
|
@@ -1270,10 +1271,10 @@ var Operation = (_class = class {
|
|
|
1270
1271
|
);
|
|
1271
1272
|
}
|
|
1272
1273
|
if (!this.schemasDecorated) {
|
|
1273
|
-
|
|
1274
|
+
_chunk2X4PY2BScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1274
1275
|
this.schemasDecorated = true;
|
|
1275
1276
|
}
|
|
1276
|
-
return
|
|
1277
|
+
return _chunk2X4PY2BScjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
|
|
1277
1278
|
includeDiscriminatorMappingRefs: true,
|
|
1278
1279
|
...opts
|
|
1279
1280
|
});
|
|
@@ -1298,7 +1299,7 @@ var Operation = (_class = class {
|
|
|
1298
1299
|
);
|
|
1299
1300
|
}
|
|
1300
1301
|
if (!this.schemasDecorated) {
|
|
1301
|
-
|
|
1302
|
+
_chunk2X4PY2BScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1302
1303
|
this.schemasDecorated = true;
|
|
1303
1304
|
}
|
|
1304
1305
|
return getResponseAsJSONSchema(this, this.api, statusCode, {
|
|
@@ -1313,7 +1314,7 @@ var Operation = (_class = class {
|
|
|
1313
1314
|
getResponseStatusCodes() {
|
|
1314
1315
|
if (!this.schema.responses) return [];
|
|
1315
1316
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1316
|
-
this.schema.responses =
|
|
1317
|
+
this.schema.responses = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
|
|
1317
1318
|
if (!this.schema.responses || _chunk3MTU2ESPcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1318
1319
|
return [];
|
|
1319
1320
|
}
|
|
@@ -1339,7 +1340,7 @@ var Operation = (_class = class {
|
|
|
1339
1340
|
let resp = response;
|
|
1340
1341
|
if (!resp) return;
|
|
1341
1342
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
|
|
1342
|
-
resp =
|
|
1343
|
+
resp = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, resp, this.api);
|
|
1343
1344
|
if (!resp || _chunk3MTU2ESPcjs.isRef.call(void 0, resp)) {
|
|
1344
1345
|
return;
|
|
1345
1346
|
}
|
|
@@ -1368,7 +1369,7 @@ var Operation = (_class = class {
|
|
|
1368
1369
|
let requestBody = this.schema.requestBody;
|
|
1369
1370
|
if (!requestBody) return false;
|
|
1370
1371
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
1371
|
-
this.schema.requestBody =
|
|
1372
|
+
this.schema.requestBody = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1372
1373
|
requestBody = this.schema.requestBody;
|
|
1373
1374
|
if (!requestBody || _chunk3MTU2ESPcjs.isRef.call(void 0, requestBody)) {
|
|
1374
1375
|
return false;
|
|
@@ -1442,7 +1443,7 @@ var Operation = (_class = class {
|
|
|
1442
1443
|
let availableMediaType;
|
|
1443
1444
|
const mediaTypes = this.getRequestBodyMediaTypes();
|
|
1444
1445
|
mediaTypes.forEach((mt) => {
|
|
1445
|
-
if (!availableMediaType &&
|
|
1446
|
+
if (!availableMediaType && _chunk2X4PY2BScjs.matches_mimetype_default.json(mt)) {
|
|
1446
1447
|
availableMediaType = mt;
|
|
1447
1448
|
}
|
|
1448
1449
|
});
|
|
@@ -1490,7 +1491,7 @@ var Operation = (_class = class {
|
|
|
1490
1491
|
let response = this.schema.responses[statusCode];
|
|
1491
1492
|
if (!response) return false;
|
|
1492
1493
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1493
|
-
this.schema.responses[statusCode] =
|
|
1494
|
+
this.schema.responses[statusCode] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, response, this.api);
|
|
1494
1495
|
response = this.schema.responses[statusCode];
|
|
1495
1496
|
if (!response || _chunk3MTU2ESPcjs.isRef.call(void 0, response)) {
|
|
1496
1497
|
return false;
|
|
@@ -1534,7 +1535,7 @@ var Operation = (_class = class {
|
|
|
1534
1535
|
let callbackObj = this.schema.callbacks[identifier];
|
|
1535
1536
|
if (!callbackObj) return false;
|
|
1536
1537
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
|
|
1537
|
-
this.schema.callbacks[identifier] =
|
|
1538
|
+
this.schema.callbacks[identifier] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callbackObj, this.api);
|
|
1538
1539
|
callbackObj = this.schema.callbacks[identifier];
|
|
1539
1540
|
if (!callbackObj || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackObj)) {
|
|
1540
1541
|
return false;
|
|
@@ -1543,7 +1544,7 @@ var Operation = (_class = class {
|
|
|
1543
1544
|
let callback = callbackObj[expression];
|
|
1544
1545
|
if (!callback) return false;
|
|
1545
1546
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
|
|
1546
|
-
callbackObj[expression] =
|
|
1547
|
+
callbackObj[expression] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callback, this.api);
|
|
1547
1548
|
callback = callbackObj[expression];
|
|
1548
1549
|
if (!callback || _chunk3MTU2ESPcjs.isRef.call(void 0, callback)) {
|
|
1549
1550
|
return false;
|
|
@@ -1567,7 +1568,7 @@ var Operation = (_class = class {
|
|
|
1567
1568
|
let cb = _optionalChain([this, 'access', _91 => _91.schema, 'access', _92 => _92.callbacks, 'optionalAccess', _93 => _93[callback]]);
|
|
1568
1569
|
if (!cb) return;
|
|
1569
1570
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
|
|
1570
|
-
this.schema.callbacks[callback] =
|
|
1571
|
+
this.schema.callbacks[callback] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, cb, this.api);
|
|
1571
1572
|
cb = this.schema.callbacks[callback];
|
|
1572
1573
|
if (!cb || _chunk3MTU2ESPcjs.isRef.call(void 0, cb)) {
|
|
1573
1574
|
return;
|
|
@@ -1577,14 +1578,14 @@ var Operation = (_class = class {
|
|
|
1577
1578
|
let callbackPath = cb[expression];
|
|
1578
1579
|
if (!callbackPath) return;
|
|
1579
1580
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
|
|
1580
|
-
cb[expression] =
|
|
1581
|
+
cb[expression] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, callbackPath, this.api);
|
|
1581
1582
|
callbackPath = cb[expression];
|
|
1582
1583
|
if (!callbackPath || _chunk3MTU2ESPcjs.isRef.call(void 0, callbackPath)) {
|
|
1583
1584
|
return;
|
|
1584
1585
|
}
|
|
1585
1586
|
}
|
|
1586
1587
|
Object.keys(callbackPath).forEach((method) => {
|
|
1587
|
-
if (!
|
|
1588
|
+
if (!_chunk2X4PY2BScjs.supportedMethods.includes(method)) return;
|
|
1588
1589
|
const found = this.getCallback(callback, expression, method);
|
|
1589
1590
|
if (found) {
|
|
1590
1591
|
callbacks.push(found);
|
|
@@ -1662,12 +1663,12 @@ var Operation = (_class = class {
|
|
|
1662
1663
|
}
|
|
1663
1664
|
this.dereferencing.processing = true;
|
|
1664
1665
|
if (!this.schemasDecorated) {
|
|
1665
|
-
|
|
1666
|
+
_chunk2X4PY2BScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1666
1667
|
this.schemasDecorated = true;
|
|
1667
1668
|
}
|
|
1668
1669
|
const { api, schema, promises } = this;
|
|
1669
1670
|
const circularRefs = /* @__PURE__ */ new Set();
|
|
1670
|
-
const dereferencingOptions =
|
|
1671
|
+
const dereferencingOptions = _chunk2X4PY2BScjs.getDereferencingOptions.call(void 0, circularRefs);
|
|
1671
1672
|
const parser = new (0, _jsonschemarefparser.$RefParser)();
|
|
1672
1673
|
return parser.dereference(
|
|
1673
1674
|
"#/__INTERNAL__",
|
|
@@ -1809,7 +1810,7 @@ var Callback = class extends Operation {
|
|
|
1809
1810
|
let parameters = (_optionalChain([this, 'access', _101 => _101.schema, 'optionalAccess', _102 => _102.parameters]) || []).map((p) => {
|
|
1810
1811
|
let param = p;
|
|
1811
1812
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1812
|
-
param =
|
|
1813
|
+
param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1813
1814
|
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1814
1815
|
}
|
|
1815
1816
|
return param;
|
|
@@ -1817,7 +1818,7 @@ var Callback = class extends Operation {
|
|
|
1817
1818
|
const commonParams = (this.parentSchema.parameters || []).map((p) => {
|
|
1818
1819
|
let param = p;
|
|
1819
1820
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, param)) {
|
|
1820
|
-
param =
|
|
1821
|
+
param = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, param, this.api);
|
|
1821
1822
|
if (!param || _chunk3MTU2ESPcjs.isRef.call(void 0, param)) return;
|
|
1822
1823
|
}
|
|
1823
1824
|
return param;
|
|
@@ -1843,7 +1844,7 @@ var Webhook = class extends Operation {
|
|
|
1843
1844
|
}
|
|
1844
1845
|
let webhookPath = this.api.webhooks[this.path];
|
|
1845
1846
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
|
|
1846
|
-
this.api.webhooks[this.path] =
|
|
1847
|
+
this.api.webhooks[this.path] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1847
1848
|
webhookPath = this.api.webhooks[this.path];
|
|
1848
1849
|
}
|
|
1849
1850
|
return _optionalChain([webhookPath, 'optionalAccess', _105 => _105.summary]);
|
|
@@ -1862,7 +1863,7 @@ var Webhook = class extends Operation {
|
|
|
1862
1863
|
}
|
|
1863
1864
|
let webhookPath = this.api.webhooks[this.path];
|
|
1864
1865
|
if (_chunk3MTU2ESPcjs.isRef.call(void 0, webhookPath)) {
|
|
1865
|
-
this.api.webhooks[this.path] =
|
|
1866
|
+
this.api.webhooks[this.path] = _chunk2X4PY2BScjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1866
1867
|
webhookPath = this.api.webhooks[this.path];
|
|
1867
1868
|
}
|
|
1868
1869
|
return _optionalChain([webhookPath, 'optionalAccess', _108 => _108.description]);
|
|
@@ -1886,4 +1887,4 @@ exports.Operation = Operation; exports.Callback = Callback; exports.Webhook = We
|
|
|
1886
1887
|
* @license Apache-2.0
|
|
1887
1888
|
* @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
|
|
1888
1889
|
*/
|
|
1889
|
-
//# sourceMappingURL=chunk-
|
|
1890
|
+
//# sourceMappingURL=chunk-TQD76MVX.cjs.map
|