oas 32.1.8 → 32.1.10
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-MQX2OLEW.js → chunk-2TQO63CW.js} +8 -2
- package/dist/{chunk-MQX2OLEW.js.map → chunk-2TQO63CW.js.map} +1 -1
- package/dist/{chunk-7BR3G6FM.js → chunk-7BC6KXMO.js} +56 -6
- package/dist/chunk-7BC6KXMO.js.map +1 -0
- package/dist/{chunk-7AHI3P7Q.cjs → chunk-DKPOVGFI.cjs} +19 -19
- package/dist/{chunk-7AHI3P7Q.cjs.map → chunk-DKPOVGFI.cjs.map} +1 -1
- package/dist/{chunk-SM47EGII.cjs → chunk-EYI3QYOG.cjs} +69 -63
- package/dist/chunk-EYI3QYOG.cjs.map +1 -0
- package/dist/{chunk-KZCEPS4J.cjs → chunk-HTEFBV7K.cjs} +56 -6
- package/dist/chunk-HTEFBV7K.cjs.map +1 -0
- package/dist/{chunk-A3J3WY7Q.js → chunk-WXXVCSCN.js} +3 -3
- 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-7BR3G6FM.js.map +0 -1
- package/dist/chunk-KZCEPS4J.cjs.map +0 -1
- package/dist/chunk-SM47EGII.cjs.map +0 -1
- /package/dist/{chunk-A3J3WY7Q.js.map → chunk-WXXVCSCN.js.map} +0 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkHTEFBV7Kcjs = require('./chunk-HTEFBV7K.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkAYA3UT4Lcjs = require('./chunk-AYA3UT4L.cjs');
|
|
@@ -54,7 +54,7 @@ function usesPolymorphism(schema) {
|
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
function objectify(thing) {
|
|
57
|
-
if (!
|
|
57
|
+
if (!_chunkHTEFBV7Kcjs.isObject.call(void 0, thing)) {
|
|
58
58
|
return {};
|
|
59
59
|
}
|
|
60
60
|
return thing;
|
|
@@ -133,7 +133,7 @@ function sampleFromSchema(schema, opts = {}) {
|
|
|
133
133
|
if (seenRefs.has(refToRelease)) {
|
|
134
134
|
return void 0;
|
|
135
135
|
}
|
|
136
|
-
objectifySchema =
|
|
136
|
+
objectifySchema = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
|
|
137
137
|
if (!objectifySchema || _chunkYPR7YTHMcjs.isRef.call(void 0, objectifySchema)) {
|
|
138
138
|
return void 0;
|
|
139
139
|
}
|
|
@@ -262,7 +262,7 @@ var samples_default = memo;
|
|
|
262
262
|
function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {}) {
|
|
263
263
|
if (mediaTypeObject.example) {
|
|
264
264
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, mediaTypeObject.example)) {
|
|
265
|
-
mediaTypeObject.example =
|
|
265
|
+
mediaTypeObject.example = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, mediaTypeObject.example, definition);
|
|
266
266
|
if (!mediaTypeObject.example || _chunkYPR7YTHMcjs.isRef.call(void 0, mediaTypeObject.example)) {
|
|
267
267
|
return [];
|
|
268
268
|
}
|
|
@@ -285,9 +285,15 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
285
285
|
if ("description" in example) {
|
|
286
286
|
description = example.description;
|
|
287
287
|
}
|
|
288
|
+
if (_chunkYPR7YTHMcjs.isRef.call(void 0, example)) {
|
|
289
|
+
example = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, example, definition);
|
|
290
|
+
if (!example || _chunkYPR7YTHMcjs.isRef.call(void 0, example)) {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
288
294
|
if ("value" in example) {
|
|
289
295
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, example.value)) {
|
|
290
|
-
example.value =
|
|
296
|
+
example.value = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, example.value, definition);
|
|
291
297
|
if (!example.value || _chunkYPR7YTHMcjs.isRef.call(void 0, example.value)) {
|
|
292
298
|
return false;
|
|
293
299
|
}
|
|
@@ -306,7 +312,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
|
|
|
306
312
|
}
|
|
307
313
|
}
|
|
308
314
|
if (mediaTypeObject.schema) {
|
|
309
|
-
if (!
|
|
315
|
+
if (!_chunkHTEFBV7Kcjs.matches_mimetype_default.xml(mediaType)) {
|
|
310
316
|
return [
|
|
311
317
|
{
|
|
312
318
|
value: samples_default(structuredClone(mediaTypeObject.schema), {
|
|
@@ -327,7 +333,7 @@ function getResponseExamples(operation, definition) {
|
|
|
327
333
|
let onlyHeaders = false;
|
|
328
334
|
if (!response) return false;
|
|
329
335
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
|
|
330
|
-
response =
|
|
336
|
+
response = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, response, definition);
|
|
331
337
|
if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) return false;
|
|
332
338
|
}
|
|
333
339
|
const mediaTypes = {};
|
|
@@ -367,14 +373,14 @@ function getCallbackExamples(operation, definition) {
|
|
|
367
373
|
let callback = _optionalChain([operation, 'access', _16 => _16.callbacks, 'optionalAccess', _17 => _17[identifier]]);
|
|
368
374
|
if (!callback) return [];
|
|
369
375
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, callback)) {
|
|
370
|
-
callback =
|
|
376
|
+
callback = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, callback, definition);
|
|
371
377
|
if (!callback || _chunkYPR7YTHMcjs.isRef.call(void 0, callback)) return [];
|
|
372
378
|
}
|
|
373
379
|
const items = Object.keys(callback).map((expression) => {
|
|
374
380
|
let callbackPath = callback[expression];
|
|
375
381
|
if (!callbackPath) return [];
|
|
376
382
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) {
|
|
377
|
-
callbackPath =
|
|
383
|
+
callbackPath = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, callbackPath, definition);
|
|
378
384
|
if (!callbackPath || _chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) return [];
|
|
379
385
|
}
|
|
380
386
|
return Object.keys(callbackPath).map((method) => {
|
|
@@ -457,7 +463,7 @@ function getExampleGroups(operation) {
|
|
|
457
463
|
Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
|
|
458
464
|
let example = paramExample;
|
|
459
465
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, example)) {
|
|
460
|
-
example =
|
|
466
|
+
example = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, example, operation.api);
|
|
461
467
|
if (!example || _chunkYPR7YTHMcjs.isRef.call(void 0, example)) return;
|
|
462
468
|
}
|
|
463
469
|
groups[exampleKey] = {
|
|
@@ -505,7 +511,7 @@ function getRequestBodyExamples(operation, definition) {
|
|
|
505
511
|
if (!requestBody) {
|
|
506
512
|
return [];
|
|
507
513
|
} else if (_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
|
|
508
|
-
requestBody =
|
|
514
|
+
requestBody = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, requestBody, definition);
|
|
509
515
|
}
|
|
510
516
|
if (!requestBody || _chunkYPR7YTHMcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
|
|
511
517
|
return [];
|
|
@@ -570,7 +576,7 @@ function getOperationId(path, method, operation, opts = {}) {
|
|
|
570
576
|
}
|
|
571
577
|
|
|
572
578
|
// src/operation/transformers/get-response-as-json-schema.ts
|
|
573
|
-
var isJSON =
|
|
579
|
+
var isJSON = _chunkHTEFBV7Kcjs.matches_mimetype_default.json;
|
|
574
580
|
function buildHeadersSchema(response, schemaOptions) {
|
|
575
581
|
const headersSchema = {
|
|
576
582
|
type: "object",
|
|
@@ -583,7 +589,7 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
583
589
|
let headerEntry = _optionalChain([response, 'access', _44 => _44.headers, 'optionalAccess', _45 => _45[key]]);
|
|
584
590
|
if (!headerEntry) return;
|
|
585
591
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, headerEntry)) {
|
|
586
|
-
headerEntry =
|
|
592
|
+
headerEntry = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
|
|
587
593
|
if (!headerEntry || _chunkYPR7YTHMcjs.isRef.call(void 0, headerEntry)) return;
|
|
588
594
|
}
|
|
589
595
|
if (headerEntry.schema) {
|
|
@@ -591,10 +597,10 @@ function buildHeadersSchema(response, schemaOptions) {
|
|
|
591
597
|
let headerSchema = header.schema;
|
|
592
598
|
if (!headerSchema) return;
|
|
593
599
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, headerSchema)) {
|
|
594
|
-
headerSchema =
|
|
600
|
+
headerSchema = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
|
|
595
601
|
if (!headerSchema || _chunkYPR7YTHMcjs.isRef.call(void 0, headerSchema)) return;
|
|
596
602
|
}
|
|
597
|
-
headersSchema.properties[key] =
|
|
603
|
+
headersSchema.properties[key] = _chunkHTEFBV7Kcjs.toJSONSchema.call(void 0, _chunkHTEFBV7Kcjs.cloneObject.call(void 0, headerSchema), {
|
|
598
604
|
addEnumsToDescriptions: true,
|
|
599
605
|
...schemaOptions
|
|
600
606
|
});
|
|
@@ -648,32 +654,32 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
648
654
|
}
|
|
649
655
|
if (preferredContentType) {
|
|
650
656
|
if (contentTypes.includes(preferredContentType)) {
|
|
651
|
-
const schema2 =
|
|
657
|
+
const schema2 = _chunkHTEFBV7Kcjs.cloneObject.call(void 0, content[preferredContentType].schema);
|
|
652
658
|
if (!schema2) {
|
|
653
659
|
return null;
|
|
654
660
|
}
|
|
655
|
-
return
|
|
661
|
+
return _chunkHTEFBV7Kcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
656
662
|
}
|
|
657
663
|
return null;
|
|
658
664
|
}
|
|
659
665
|
for (let i = 0; i < contentTypes.length; i++) {
|
|
660
666
|
if (isJSON(contentTypes[i])) {
|
|
661
|
-
const schema2 =
|
|
667
|
+
const schema2 = _chunkHTEFBV7Kcjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
|
|
662
668
|
if (!schema2) {
|
|
663
669
|
return {};
|
|
664
670
|
}
|
|
665
|
-
return
|
|
671
|
+
return _chunkHTEFBV7Kcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
|
|
666
672
|
}
|
|
667
673
|
}
|
|
668
674
|
const contentType = contentTypes.shift();
|
|
669
675
|
if (!contentType) {
|
|
670
676
|
return {};
|
|
671
677
|
}
|
|
672
|
-
const schema =
|
|
678
|
+
const schema = _chunkHTEFBV7Kcjs.cloneObject.call(void 0, content[contentType].schema);
|
|
673
679
|
if (!schema) {
|
|
674
680
|
return {};
|
|
675
681
|
}
|
|
676
|
-
return
|
|
682
|
+
return _chunkHTEFBV7Kcjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
|
|
677
683
|
}
|
|
678
684
|
const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _46 => _46.contentType]));
|
|
679
685
|
if (_optionalChain([opts, 'optionalAccess', _47 => _47.contentType]) && !foundSchema) {
|
|
@@ -692,23 +698,23 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
692
698
|
// able to render so instead of generating a JSON Schema with an `undefined` type we should
|
|
693
699
|
// default to `string` so there's at least *something* the end-user can interact with.
|
|
694
700
|
type: _nullishCoalesce(schemaType, () => ( "string")),
|
|
695
|
-
schema:
|
|
701
|
+
schema: _chunkHTEFBV7Kcjs.isPrimitive.call(void 0, schema) ? schema : {
|
|
696
702
|
...schema,
|
|
697
|
-
$schema:
|
|
703
|
+
$schema: _chunkHTEFBV7Kcjs.getSchemaVersionString.call(void 0, schema, api)
|
|
698
704
|
},
|
|
699
705
|
label: "Response body"
|
|
700
706
|
};
|
|
701
707
|
if (response.description && schemaWrapper.schema) {
|
|
702
708
|
schemaWrapper.description = response.description;
|
|
703
709
|
}
|
|
704
|
-
|
|
710
|
+
_chunkHTEFBV7Kcjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
|
|
705
711
|
if (usedSchemas.has(ref)) {
|
|
706
712
|
return usedSchemas.get(ref);
|
|
707
713
|
}
|
|
708
714
|
try {
|
|
709
|
-
const resolved =
|
|
715
|
+
const resolved = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
|
|
710
716
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, resolved)) return void 0;
|
|
711
|
-
const converted =
|
|
717
|
+
const converted = _chunkHTEFBV7Kcjs.toJSONSchema.call(void 0, structuredClone(resolved), {
|
|
712
718
|
...baseSchemaOptions,
|
|
713
719
|
seenRefs
|
|
714
720
|
});
|
|
@@ -720,9 +726,9 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
720
726
|
});
|
|
721
727
|
if (schemaWrapper.schema && usedSchemas.size > 0) {
|
|
722
728
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
|
|
723
|
-
const referencedSchemas =
|
|
729
|
+
const referencedSchemas = _chunkHTEFBV7Kcjs.filterRequiredRefsToReferenced.call(void 0, refsInGroup, usedSchemas);
|
|
724
730
|
if (referencedSchemas.size > 0) {
|
|
725
|
-
|
|
731
|
+
_chunkHTEFBV7Kcjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
|
|
726
732
|
}
|
|
727
733
|
}
|
|
728
734
|
jsonSchema.push(schemaWrapper);
|
|
@@ -734,9 +740,9 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
|
|
|
734
740
|
});
|
|
735
741
|
if (headersWrapper.schema && usedSchemas.size > 0) {
|
|
736
742
|
const refsInGroup = _nullishCoalesce(refsByGroup.get("headers"), () => ( /* @__PURE__ */ new Set()));
|
|
737
|
-
const referencedSchemas =
|
|
743
|
+
const referencedSchemas = _chunkHTEFBV7Kcjs.filterRequiredRefsToReferenced.call(void 0, refsInGroup, usedSchemas);
|
|
738
744
|
if (referencedSchemas.size > 0) {
|
|
739
|
-
|
|
745
|
+
_chunkHTEFBV7Kcjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
|
|
740
746
|
}
|
|
741
747
|
}
|
|
742
748
|
jsonSchema.push(headersWrapper);
|
|
@@ -876,7 +882,7 @@ var Operation = (_class = class {
|
|
|
876
882
|
let types = [];
|
|
877
883
|
if (this.schema.requestBody) {
|
|
878
884
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, this.schema.requestBody)) {
|
|
879
|
-
this.schema.requestBody =
|
|
885
|
+
this.schema.requestBody = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
|
|
880
886
|
}
|
|
881
887
|
if (this.schema.requestBody && "content" in this.schema.requestBody) {
|
|
882
888
|
types = Object.keys(this.schema.requestBody.content);
|
|
@@ -887,7 +893,7 @@ var Operation = (_class = class {
|
|
|
887
893
|
this.contentType = types[0];
|
|
888
894
|
}
|
|
889
895
|
types.forEach((t) => {
|
|
890
|
-
if (
|
|
896
|
+
if (_chunkHTEFBV7Kcjs.matches_mimetype_default.json(t)) {
|
|
891
897
|
this.contentType = t;
|
|
892
898
|
}
|
|
893
899
|
});
|
|
@@ -900,7 +906,7 @@ var Operation = (_class = class {
|
|
|
900
906
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
901
907
|
*/
|
|
902
908
|
isFormUrlEncoded() {
|
|
903
|
-
return
|
|
909
|
+
return _chunkHTEFBV7Kcjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
|
|
904
910
|
}
|
|
905
911
|
/**
|
|
906
912
|
* Checks if the current operation has a mutipart content type payload.
|
|
@@ -909,7 +915,7 @@ var Operation = (_class = class {
|
|
|
909
915
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
910
916
|
*/
|
|
911
917
|
isMultipart() {
|
|
912
|
-
return
|
|
918
|
+
return _chunkHTEFBV7Kcjs.matches_mimetype_default.multipart(this.getContentType());
|
|
913
919
|
}
|
|
914
920
|
/**
|
|
915
921
|
* Checks if the current operation has a JSON-like content type payload.
|
|
@@ -918,7 +924,7 @@ var Operation = (_class = class {
|
|
|
918
924
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
919
925
|
*/
|
|
920
926
|
isJson() {
|
|
921
|
-
return
|
|
927
|
+
return _chunkHTEFBV7Kcjs.matches_mimetype_default.json(this.getContentType());
|
|
922
928
|
}
|
|
923
929
|
/**
|
|
924
930
|
* Checks if the current operation has an XML content type payload.
|
|
@@ -927,7 +933,7 @@ var Operation = (_class = class {
|
|
|
927
933
|
* @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
|
|
928
934
|
*/
|
|
929
935
|
isXml() {
|
|
930
|
-
return
|
|
936
|
+
return _chunkHTEFBV7Kcjs.matches_mimetype_default.xml(this.getContentType());
|
|
931
937
|
}
|
|
932
938
|
/**
|
|
933
939
|
* Checks if the current operation is a webhook or not.
|
|
@@ -975,7 +981,7 @@ var Operation = (_class = class {
|
|
|
975
981
|
security = _optionalChain([this, 'access', _64 => _64.api, 'optionalAccess', _65 => _65.components, 'optionalAccess', _66 => _66.securitySchemes, 'optionalAccess', _67 => _67[key]]);
|
|
976
982
|
if (!security) return false;
|
|
977
983
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, security)) {
|
|
978
|
-
security =
|
|
984
|
+
security = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, security, this.api);
|
|
979
985
|
if (!security || _chunkYPR7YTHMcjs.isRef.call(void 0, security)) return false;
|
|
980
986
|
}
|
|
981
987
|
} catch (e4) {
|
|
@@ -1056,7 +1062,7 @@ var Operation = (_class = class {
|
|
|
1056
1062
|
this.schema.parameters.map((p) => {
|
|
1057
1063
|
let param = p;
|
|
1058
1064
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
|
|
1059
|
-
param =
|
|
1065
|
+
param = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1060
1066
|
if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
|
|
1061
1067
|
}
|
|
1062
1068
|
if (param.in && param.in === "header") return param.name;
|
|
@@ -1069,7 +1075,7 @@ var Operation = (_class = class {
|
|
|
1069
1075
|
let response = this.schema.responses[r];
|
|
1070
1076
|
if (!response) return [];
|
|
1071
1077
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
|
|
1072
|
-
this.schema.responses[r] =
|
|
1078
|
+
this.schema.responses[r] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, response, this.api);
|
|
1073
1079
|
response = this.schema.responses[r];
|
|
1074
1080
|
if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
|
|
1075
1081
|
return [];
|
|
@@ -1082,7 +1088,7 @@ var Operation = (_class = class {
|
|
|
1082
1088
|
let requestBody = this.schema.requestBody;
|
|
1083
1089
|
if (requestBody) {
|
|
1084
1090
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
|
|
1085
|
-
this.schema.requestBody =
|
|
1091
|
+
this.schema.requestBody = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1086
1092
|
requestBody = this.schema.requestBody;
|
|
1087
1093
|
}
|
|
1088
1094
|
if (requestBody && !_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
|
|
@@ -1095,7 +1101,7 @@ var Operation = (_class = class {
|
|
|
1095
1101
|
let response = _optionalChain([this, 'access', _71 => _71.schema, 'access', _72 => _72.responses, 'optionalAccess', _73 => _73[r]]);
|
|
1096
1102
|
if (!response) return false;
|
|
1097
1103
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
|
|
1098
|
-
this.schema.responses[r] =
|
|
1104
|
+
this.schema.responses[r] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, response, this.api);
|
|
1099
1105
|
response = this.schema.responses[r];
|
|
1100
1106
|
if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
|
|
1101
1107
|
return false;
|
|
@@ -1205,7 +1211,7 @@ var Operation = (_class = class {
|
|
|
1205
1211
|
let parameters = (_optionalChain([this, 'access', _76 => _76.schema, 'optionalAccess', _77 => _77.parameters]) || []).map((p) => {
|
|
1206
1212
|
let param = p;
|
|
1207
1213
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
|
|
1208
|
-
param =
|
|
1214
|
+
param = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1209
1215
|
if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
|
|
1210
1216
|
}
|
|
1211
1217
|
return param;
|
|
@@ -1213,7 +1219,7 @@ var Operation = (_class = class {
|
|
|
1213
1219
|
const commonParams = (_optionalChain([this, 'access', _78 => _78.api, 'optionalAccess', _79 => _79.paths, 'optionalAccess', _80 => _80[this.path], 'optionalAccess', _81 => _81.parameters]) || []).map((p) => {
|
|
1214
1220
|
let param = p;
|
|
1215
1221
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
|
|
1216
|
-
param =
|
|
1222
|
+
param = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1217
1223
|
if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
|
|
1218
1224
|
}
|
|
1219
1225
|
return param;
|
|
@@ -1251,10 +1257,10 @@ var Operation = (_class = class {
|
|
|
1251
1257
|
);
|
|
1252
1258
|
}
|
|
1253
1259
|
if (!this.schemasDecorated) {
|
|
1254
|
-
|
|
1260
|
+
_chunkHTEFBV7Kcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1255
1261
|
this.schemasDecorated = true;
|
|
1256
1262
|
}
|
|
1257
|
-
return
|
|
1263
|
+
return _chunkHTEFBV7Kcjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
|
|
1258
1264
|
includeDiscriminatorMappingRefs: true,
|
|
1259
1265
|
...opts
|
|
1260
1266
|
});
|
|
@@ -1279,7 +1285,7 @@ var Operation = (_class = class {
|
|
|
1279
1285
|
);
|
|
1280
1286
|
}
|
|
1281
1287
|
if (!this.schemasDecorated) {
|
|
1282
|
-
|
|
1288
|
+
_chunkHTEFBV7Kcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1283
1289
|
this.schemasDecorated = true;
|
|
1284
1290
|
}
|
|
1285
1291
|
return getResponseAsJSONSchema(this, this.api, statusCode, {
|
|
@@ -1294,7 +1300,7 @@ var Operation = (_class = class {
|
|
|
1294
1300
|
getResponseStatusCodes() {
|
|
1295
1301
|
if (!this.schema.responses) return [];
|
|
1296
1302
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1297
|
-
this.schema.responses =
|
|
1303
|
+
this.schema.responses = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, this.schema.responses, this.api);
|
|
1298
1304
|
if (!this.schema.responses || _chunkYPR7YTHMcjs.isRef.call(void 0, this.schema.responses)) {
|
|
1299
1305
|
return [];
|
|
1300
1306
|
}
|
|
@@ -1320,7 +1326,7 @@ var Operation = (_class = class {
|
|
|
1320
1326
|
let resp = response;
|
|
1321
1327
|
if (!resp) return;
|
|
1322
1328
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, resp)) {
|
|
1323
|
-
resp =
|
|
1329
|
+
resp = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, resp, this.api);
|
|
1324
1330
|
if (!resp || _chunkYPR7YTHMcjs.isRef.call(void 0, resp)) {
|
|
1325
1331
|
return;
|
|
1326
1332
|
}
|
|
@@ -1349,7 +1355,7 @@ var Operation = (_class = class {
|
|
|
1349
1355
|
let requestBody = this.schema.requestBody;
|
|
1350
1356
|
if (!requestBody) return false;
|
|
1351
1357
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
|
|
1352
|
-
this.schema.requestBody =
|
|
1358
|
+
this.schema.requestBody = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, requestBody, this.api);
|
|
1353
1359
|
requestBody = this.schema.requestBody;
|
|
1354
1360
|
if (!requestBody || _chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
|
|
1355
1361
|
return false;
|
|
@@ -1419,7 +1425,7 @@ var Operation = (_class = class {
|
|
|
1419
1425
|
let availableMediaType;
|
|
1420
1426
|
const mediaTypes = this.getRequestBodyMediaTypes();
|
|
1421
1427
|
mediaTypes.forEach((mt) => {
|
|
1422
|
-
if (!availableMediaType &&
|
|
1428
|
+
if (!availableMediaType && _chunkHTEFBV7Kcjs.matches_mimetype_default.json(mt)) {
|
|
1423
1429
|
availableMediaType = mt;
|
|
1424
1430
|
}
|
|
1425
1431
|
});
|
|
@@ -1467,7 +1473,7 @@ var Operation = (_class = class {
|
|
|
1467
1473
|
let response = this.schema.responses[statusCode];
|
|
1468
1474
|
if (!response) return false;
|
|
1469
1475
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
|
|
1470
|
-
this.schema.responses[statusCode] =
|
|
1476
|
+
this.schema.responses[statusCode] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, response, this.api);
|
|
1471
1477
|
response = this.schema.responses[statusCode];
|
|
1472
1478
|
if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
|
|
1473
1479
|
return false;
|
|
@@ -1511,7 +1517,7 @@ var Operation = (_class = class {
|
|
|
1511
1517
|
let callbackObj = this.schema.callbacks[identifier];
|
|
1512
1518
|
if (!callbackObj) return false;
|
|
1513
1519
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, callbackObj)) {
|
|
1514
|
-
this.schema.callbacks[identifier] =
|
|
1520
|
+
this.schema.callbacks[identifier] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, callbackObj, this.api);
|
|
1515
1521
|
callbackObj = this.schema.callbacks[identifier];
|
|
1516
1522
|
if (!callbackObj || _chunkYPR7YTHMcjs.isRef.call(void 0, callbackObj)) {
|
|
1517
1523
|
return false;
|
|
@@ -1520,7 +1526,7 @@ var Operation = (_class = class {
|
|
|
1520
1526
|
let callback = callbackObj[expression];
|
|
1521
1527
|
if (!callback) return false;
|
|
1522
1528
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, callback)) {
|
|
1523
|
-
callbackObj[expression] =
|
|
1529
|
+
callbackObj[expression] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, callback, this.api);
|
|
1524
1530
|
callback = callbackObj[expression];
|
|
1525
1531
|
if (!callback || _chunkYPR7YTHMcjs.isRef.call(void 0, callback)) {
|
|
1526
1532
|
return false;
|
|
@@ -1544,7 +1550,7 @@ var Operation = (_class = class {
|
|
|
1544
1550
|
let cb = _optionalChain([this, 'access', _90 => _90.schema, 'access', _91 => _91.callbacks, 'optionalAccess', _92 => _92[callback]]);
|
|
1545
1551
|
if (!cb) return;
|
|
1546
1552
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, cb)) {
|
|
1547
|
-
this.schema.callbacks[callback] =
|
|
1553
|
+
this.schema.callbacks[callback] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, cb, this.api);
|
|
1548
1554
|
cb = this.schema.callbacks[callback];
|
|
1549
1555
|
if (!cb || _chunkYPR7YTHMcjs.isRef.call(void 0, cb)) {
|
|
1550
1556
|
return;
|
|
@@ -1554,14 +1560,14 @@ var Operation = (_class = class {
|
|
|
1554
1560
|
let callbackPath = cb[expression];
|
|
1555
1561
|
if (!callbackPath) return;
|
|
1556
1562
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) {
|
|
1557
|
-
cb[expression] =
|
|
1563
|
+
cb[expression] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, callbackPath, this.api);
|
|
1558
1564
|
callbackPath = cb[expression];
|
|
1559
1565
|
if (!callbackPath || _chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) {
|
|
1560
1566
|
return;
|
|
1561
1567
|
}
|
|
1562
1568
|
}
|
|
1563
1569
|
Object.keys(callbackPath).forEach((method) => {
|
|
1564
|
-
if (!
|
|
1570
|
+
if (!_chunkHTEFBV7Kcjs.supportedMethods.includes(method)) return;
|
|
1565
1571
|
const found = this.getCallback(callback, expression, method);
|
|
1566
1572
|
if (found) {
|
|
1567
1573
|
callbacks.push(found);
|
|
@@ -1639,12 +1645,12 @@ var Operation = (_class = class {
|
|
|
1639
1645
|
}
|
|
1640
1646
|
this.dereferencing.processing = true;
|
|
1641
1647
|
if (!this.schemasDecorated) {
|
|
1642
|
-
|
|
1648
|
+
_chunkHTEFBV7Kcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
|
|
1643
1649
|
this.schemasDecorated = true;
|
|
1644
1650
|
}
|
|
1645
1651
|
const { api, schema, promises } = this;
|
|
1646
1652
|
const circularRefs = /* @__PURE__ */ new Set();
|
|
1647
|
-
const dereferencingOptions =
|
|
1653
|
+
const dereferencingOptions = _chunkHTEFBV7Kcjs.getDereferencingOptions.call(void 0, circularRefs);
|
|
1648
1654
|
const parser = new (0, _jsonschemarefparser.$RefParser)();
|
|
1649
1655
|
return parser.dereference(
|
|
1650
1656
|
"#/__INTERNAL__",
|
|
@@ -1786,7 +1792,7 @@ var Callback = class extends Operation {
|
|
|
1786
1792
|
let parameters = (_optionalChain([this, 'access', _100 => _100.schema, 'optionalAccess', _101 => _101.parameters]) || []).map((p) => {
|
|
1787
1793
|
let param = p;
|
|
1788
1794
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
|
|
1789
|
-
param =
|
|
1795
|
+
param = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1790
1796
|
if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
|
|
1791
1797
|
}
|
|
1792
1798
|
return param;
|
|
@@ -1794,7 +1800,7 @@ var Callback = class extends Operation {
|
|
|
1794
1800
|
const commonParams = (this.parentSchema.parameters || []).map((p) => {
|
|
1795
1801
|
let param = p;
|
|
1796
1802
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
|
|
1797
|
-
param =
|
|
1803
|
+
param = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, param, this.api);
|
|
1798
1804
|
if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
|
|
1799
1805
|
}
|
|
1800
1806
|
return param;
|
|
@@ -1820,7 +1826,7 @@ var Webhook = class extends Operation {
|
|
|
1820
1826
|
}
|
|
1821
1827
|
let webhookPath = this.api.webhooks[this.path];
|
|
1822
1828
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, webhookPath)) {
|
|
1823
|
-
this.api.webhooks[this.path] =
|
|
1829
|
+
this.api.webhooks[this.path] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1824
1830
|
webhookPath = this.api.webhooks[this.path];
|
|
1825
1831
|
}
|
|
1826
1832
|
return _optionalChain([webhookPath, 'optionalAccess', _104 => _104.summary]);
|
|
@@ -1839,7 +1845,7 @@ var Webhook = class extends Operation {
|
|
|
1839
1845
|
}
|
|
1840
1846
|
let webhookPath = this.api.webhooks[this.path];
|
|
1841
1847
|
if (_chunkYPR7YTHMcjs.isRef.call(void 0, webhookPath)) {
|
|
1842
|
-
this.api.webhooks[this.path] =
|
|
1848
|
+
this.api.webhooks[this.path] = _chunkHTEFBV7Kcjs.dereferenceRef.call(void 0, webhookPath, this.api);
|
|
1843
1849
|
webhookPath = this.api.webhooks[this.path];
|
|
1844
1850
|
}
|
|
1845
1851
|
return _optionalChain([webhookPath, 'optionalAccess', _107 => _107.description]);
|
|
@@ -1863,4 +1869,4 @@ exports.Operation = Operation; exports.Callback = Callback; exports.Webhook = We
|
|
|
1863
1869
|
* @license Apache-2.0
|
|
1864
1870
|
* @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
|
|
1865
1871
|
*/
|
|
1866
|
-
//# sourceMappingURL=chunk-
|
|
1872
|
+
//# sourceMappingURL=chunk-EYI3QYOG.cjs.map
|