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