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