oas 32.1.2 → 32.1.4

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.
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
 
16
- var _chunkLCRF6REScjs = require('./chunk-LCRF6RES.cjs');
16
+ var _chunk3IEA3ASVcjs = require('./chunk-3IEA3ASV.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 (!_chunkLCRF6REScjs.isObject.call(void 0, thing)) {
57
+ if (!_chunk3IEA3ASVcjs.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 = _chunkLCRF6REScjs.dereferenceRef.call(void 0, objectifySchema, opts.definition, seenRefs);
136
+ objectifySchema = _chunk3IEA3ASVcjs.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
  }
@@ -297,7 +297,7 @@ function getMediaTypeExamples(mediaType, mediaTypeObject, definition, opts = {})
297
297
  }
298
298
  }
299
299
  if (mediaTypeObject.schema) {
300
- if (!_chunkLCRF6REScjs.matches_mimetype_default.xml(mediaType)) {
300
+ if (!_chunk3IEA3ASVcjs.matches_mimetype_default.xml(mediaType)) {
301
301
  return [
302
302
  {
303
303
  value: samples_default(structuredClone(mediaTypeObject.schema), {
@@ -318,7 +318,7 @@ function getResponseExamples(operation, definition) {
318
318
  let onlyHeaders = false;
319
319
  if (!response) return false;
320
320
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
321
- response = _chunkLCRF6REScjs.dereferenceRef.call(void 0, response, definition);
321
+ response = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, response, definition);
322
322
  if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) return false;
323
323
  }
324
324
  const mediaTypes = {};
@@ -358,14 +358,14 @@ function getCallbackExamples(operation, definition) {
358
358
  let callback = _optionalChain([operation, 'access', _16 => _16.callbacks, 'optionalAccess', _17 => _17[identifier]]);
359
359
  if (!callback) return [];
360
360
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, callback)) {
361
- callback = _chunkLCRF6REScjs.dereferenceRef.call(void 0, callback, definition);
361
+ callback = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, callback, definition);
362
362
  if (!callback || _chunkYPR7YTHMcjs.isRef.call(void 0, callback)) return [];
363
363
  }
364
364
  const items = Object.keys(callback).map((expression) => {
365
365
  let callbackPath = callback[expression];
366
366
  if (!callbackPath) return [];
367
367
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) {
368
- callbackPath = _chunkLCRF6REScjs.dereferenceRef.call(void 0, callbackPath, definition);
368
+ callbackPath = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, callbackPath, definition);
369
369
  if (!callbackPath || _chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) return [];
370
370
  }
371
371
  return Object.keys(callbackPath).map((method) => {
@@ -448,7 +448,7 @@ function getExampleGroups(operation) {
448
448
  Object.entries(param.examples || {}).forEach(([exampleKey, paramExample]) => {
449
449
  let example = paramExample;
450
450
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, example)) {
451
- example = _chunkLCRF6REScjs.dereferenceRef.call(void 0, example, operation.api);
451
+ example = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, example, operation.api);
452
452
  if (!example || _chunkYPR7YTHMcjs.isRef.call(void 0, example)) return;
453
453
  }
454
454
  groups[exampleKey] = {
@@ -496,7 +496,7 @@ function getRequestBodyExamples(operation, definition) {
496
496
  if (!requestBody) {
497
497
  return [];
498
498
  } else if (_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
499
- requestBody = _chunkLCRF6REScjs.dereferenceRef.call(void 0, requestBody, definition);
499
+ requestBody = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, requestBody, definition);
500
500
  }
501
501
  if (!requestBody || _chunkYPR7YTHMcjs.isRef.call(void 0, requestBody) || !requestBody.content) {
502
502
  return [];
@@ -561,23 +561,31 @@ function getOperationId(path, method, operation, opts = {}) {
561
561
  }
562
562
 
563
563
  // src/operation/transformers/get-response-as-json-schema.ts
564
- var isJSON = _chunkLCRF6REScjs.matches_mimetype_default.json;
564
+ var isJSON = _chunk3IEA3ASVcjs.matches_mimetype_default.json;
565
565
  function buildHeadersSchema(response, schemaOptions) {
566
566
  const headersSchema = {
567
567
  type: "object",
568
568
  properties: {}
569
569
  };
570
+ const api = schemaOptions.definition;
571
+ const seenRefs = _nullishCoalesce(schemaOptions.seenRefs, () => ( /* @__PURE__ */ new Set()));
570
572
  if (response.headers) {
571
573
  Object.keys(response.headers).forEach((key) => {
572
- if (!_optionalChain([response, 'access', _44 => _44.headers, 'optionalAccess', _45 => _45[key]]) || _chunkYPR7YTHMcjs.isRef.call(void 0, _optionalChain([response, 'access', _46 => _46.headers, 'optionalAccess', _47 => _47[key]]))) {
573
- return;
574
+ let headerEntry = _optionalChain([response, 'access', _44 => _44.headers, 'optionalAccess', _45 => _45[key]]);
575
+ if (!headerEntry) return;
576
+ if (_chunkYPR7YTHMcjs.isRef.call(void 0, headerEntry)) {
577
+ headerEntry = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, headerEntry, api, seenRefs);
578
+ if (!headerEntry || _chunkYPR7YTHMcjs.isRef.call(void 0, headerEntry)) return;
574
579
  }
575
- if (response.headers[key].schema) {
576
- const header = response.headers[key];
577
- if (!header.schema || _chunkYPR7YTHMcjs.isRef.call(void 0, header.schema)) {
578
- return;
580
+ if (headerEntry.schema) {
581
+ const header = headerEntry;
582
+ let headerSchema = header.schema;
583
+ if (!headerSchema) return;
584
+ if (_chunkYPR7YTHMcjs.isRef.call(void 0, headerSchema)) {
585
+ headerSchema = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, headerSchema, api, seenRefs);
586
+ if (!headerSchema || _chunkYPR7YTHMcjs.isRef.call(void 0, headerSchema)) return;
579
587
  }
580
- headersSchema.properties[key] = _chunkLCRF6REScjs.toJSONSchema.call(void 0, header.schema, {
588
+ headersSchema.properties[key] = _chunk3IEA3ASVcjs.toJSONSchema.call(void 0, _chunk3IEA3ASVcjs.cloneObject.call(void 0, headerSchema), {
581
589
  addEnumsToDescriptions: true,
582
590
  ...schemaOptions
583
591
  });
@@ -631,35 +639,35 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
631
639
  }
632
640
  if (preferredContentType) {
633
641
  if (contentTypes.includes(preferredContentType)) {
634
- const schema2 = _chunkLCRF6REScjs.cloneObject.call(void 0, content[preferredContentType].schema);
642
+ const schema2 = _chunk3IEA3ASVcjs.cloneObject.call(void 0, content[preferredContentType].schema);
635
643
  if (!schema2) {
636
644
  return null;
637
645
  }
638
- return _chunkLCRF6REScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
646
+ return _chunk3IEA3ASVcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
639
647
  }
640
648
  return null;
641
649
  }
642
650
  for (let i = 0; i < contentTypes.length; i++) {
643
651
  if (isJSON(contentTypes[i])) {
644
- const schema2 = _chunkLCRF6REScjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
652
+ const schema2 = _chunk3IEA3ASVcjs.cloneObject.call(void 0, content[contentTypes[i]].schema);
645
653
  if (!schema2) {
646
654
  return {};
647
655
  }
648
- return _chunkLCRF6REScjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
656
+ return _chunk3IEA3ASVcjs.toJSONSchema.call(void 0, schema2, baseSchemaOptions);
649
657
  }
650
658
  }
651
659
  const contentType = contentTypes.shift();
652
660
  if (!contentType) {
653
661
  return {};
654
662
  }
655
- const schema = _chunkLCRF6REScjs.cloneObject.call(void 0, content[contentType].schema);
663
+ const schema = _chunk3IEA3ASVcjs.cloneObject.call(void 0, content[contentType].schema);
656
664
  if (!schema) {
657
665
  return {};
658
666
  }
659
- return _chunkLCRF6REScjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
667
+ return _chunk3IEA3ASVcjs.toJSONSchema.call(void 0, schema, baseSchemaOptions);
660
668
  }
661
- const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _48 => _48.contentType]));
662
- if (_optionalChain([opts, 'optionalAccess', _49 => _49.contentType]) && !foundSchema) {
669
+ const foundSchema = getPreferredSchema(response.content, _optionalChain([opts, 'optionalAccess', _46 => _46.contentType]));
670
+ if (_optionalChain([opts, 'optionalAccess', _47 => _47.contentType]) && !foundSchema) {
663
671
  return null;
664
672
  }
665
673
  if (foundSchema) {
@@ -675,23 +683,23 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
675
683
  // able to render so instead of generating a JSON Schema with an `undefined` type we should
676
684
  // default to `string` so there's at least *something* the end-user can interact with.
677
685
  type: _nullishCoalesce(schemaType, () => ( "string")),
678
- schema: _chunkLCRF6REScjs.isPrimitive.call(void 0, schema) ? schema : {
686
+ schema: _chunk3IEA3ASVcjs.isPrimitive.call(void 0, schema) ? schema : {
679
687
  ...schema,
680
- $schema: _chunkLCRF6REScjs.getSchemaVersionString.call(void 0, schema, api)
688
+ $schema: _chunk3IEA3ASVcjs.getSchemaVersionString.call(void 0, schema, api)
681
689
  },
682
690
  label: "Response body"
683
691
  };
684
692
  if (response.description && schemaWrapper.schema) {
685
693
  schemaWrapper.description = response.description;
686
694
  }
687
- _chunkLCRF6REScjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
695
+ _chunk3IEA3ASVcjs.applyDiscriminatorOneOfToUsedSchemas.call(void 0, api, usedSchemas, (ref) => {
688
696
  if (usedSchemas.has(ref)) {
689
697
  return usedSchemas.get(ref);
690
698
  }
691
699
  try {
692
- const resolved = _chunkLCRF6REScjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
700
+ const resolved = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, { $ref: ref }, api, seenRefs);
693
701
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, resolved)) return void 0;
694
- const converted = _chunkLCRF6REScjs.toJSONSchema.call(void 0, structuredClone(resolved), {
702
+ const converted = _chunk3IEA3ASVcjs.toJSONSchema.call(void 0, structuredClone(resolved), {
695
703
  ...baseSchemaOptions,
696
704
  seenRefs
697
705
  });
@@ -703,9 +711,9 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
703
711
  });
704
712
  if (schemaWrapper.schema && usedSchemas.size > 0) {
705
713
  const refsInGroup = _nullishCoalesce(refsByGroup.get("body"), () => ( /* @__PURE__ */ new Set()));
706
- const referencedSchemas = _chunkLCRF6REScjs.filterRequiredRefsToReferenced.call(void 0, refsInGroup, usedSchemas);
714
+ const referencedSchemas = _chunk3IEA3ASVcjs.filterRequiredRefsToReferenced.call(void 0, refsInGroup, usedSchemas);
707
715
  if (referencedSchemas.size > 0) {
708
- _chunkLCRF6REScjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
716
+ _chunk3IEA3ASVcjs.mergeReferencedSchemasIntoRoot.call(void 0, schemaWrapper.schema, referencedSchemas);
709
717
  }
710
718
  }
711
719
  jsonSchema.push(schemaWrapper);
@@ -717,9 +725,9 @@ function getResponseAsJSONSchema(operation, api, statusCode, opts) {
717
725
  });
718
726
  if (headersWrapper.schema && usedSchemas.size > 0) {
719
727
  const refsInGroup = _nullishCoalesce(refsByGroup.get("headers"), () => ( /* @__PURE__ */ new Set()));
720
- const referencedSchemas = _chunkLCRF6REScjs.filterRequiredRefsToReferenced.call(void 0, refsInGroup, usedSchemas);
728
+ const referencedSchemas = _chunk3IEA3ASVcjs.filterRequiredRefsToReferenced.call(void 0, refsInGroup, usedSchemas);
721
729
  if (referencedSchemas.size > 0) {
722
- _chunkLCRF6REScjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
730
+ _chunk3IEA3ASVcjs.mergeReferencedSchemasIntoRoot.call(void 0, headersWrapper.schema, referencedSchemas);
723
731
  }
724
732
  }
725
733
  jsonSchema.push(headersWrapper);
@@ -820,11 +828,11 @@ var Operation = (_class = class {
820
828
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
821
829
  */
822
830
  getSummary() {
823
- if (_optionalChain([this, 'access', _50 => _50.schema, 'optionalAccess', _51 => _51.summary]) && typeof this.schema.summary === "string") {
831
+ if (_optionalChain([this, 'access', _48 => _48.schema, 'optionalAccess', _49 => _49.summary]) && typeof this.schema.summary === "string") {
824
832
  return this.schema.summary;
825
833
  }
826
- const pathItem = _optionalChain([this, 'access', _52 => _52.api, 'access', _53 => _53.paths, 'optionalAccess', _54 => _54[this.path]]);
827
- if (_optionalChain([pathItem, 'optionalAccess', _55 => _55.summary]) && typeof pathItem.summary === "string") {
834
+ const pathItem = _optionalChain([this, 'access', _50 => _50.api, 'access', _51 => _51.paths, 'optionalAccess', _52 => _52[this.path]]);
835
+ if (_optionalChain([pathItem, 'optionalAccess', _53 => _53.summary]) && typeof pathItem.summary === "string") {
828
836
  return pathItem.summary;
829
837
  }
830
838
  return void 0;
@@ -836,11 +844,11 @@ var Operation = (_class = class {
836
844
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
837
845
  */
838
846
  getDescription() {
839
- if (_optionalChain([this, 'access', _56 => _56.schema, 'optionalAccess', _57 => _57.description]) && typeof this.schema.description === "string") {
847
+ if (_optionalChain([this, 'access', _54 => _54.schema, 'optionalAccess', _55 => _55.description]) && typeof this.schema.description === "string") {
840
848
  return this.schema.description;
841
849
  }
842
- const pathItem = _optionalChain([this, 'access', _58 => _58.api, 'access', _59 => _59.paths, 'optionalAccess', _60 => _60[this.path]]);
843
- if (_optionalChain([pathItem, 'optionalAccess', _61 => _61.description]) && typeof pathItem.description === "string") {
850
+ const pathItem = _optionalChain([this, 'access', _56 => _56.api, 'access', _57 => _57.paths, 'optionalAccess', _58 => _58[this.path]]);
851
+ if (_optionalChain([pathItem, 'optionalAccess', _59 => _59.description]) && typeof pathItem.description === "string") {
844
852
  return pathItem.description;
845
853
  }
846
854
  return void 0;
@@ -859,18 +867,18 @@ var Operation = (_class = class {
859
867
  let types = [];
860
868
  if (this.schema.requestBody) {
861
869
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, this.schema.requestBody)) {
862
- this.schema.requestBody = _chunkLCRF6REScjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
870
+ this.schema.requestBody = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, this.schema.requestBody, this.api);
863
871
  }
864
872
  if (this.schema.requestBody && "content" in this.schema.requestBody) {
865
873
  types = Object.keys(this.schema.requestBody.content);
866
874
  }
867
875
  }
868
876
  this.contentType = "application/json";
869
- if (_optionalChain([types, 'optionalAccess', _62 => _62.length])) {
877
+ if (_optionalChain([types, 'optionalAccess', _60 => _60.length])) {
870
878
  this.contentType = types[0];
871
879
  }
872
880
  types.forEach((t) => {
873
- if (_chunkLCRF6REScjs.matches_mimetype_default.json(t)) {
881
+ if (_chunk3IEA3ASVcjs.matches_mimetype_default.json(t)) {
874
882
  this.contentType = t;
875
883
  }
876
884
  });
@@ -883,7 +891,7 @@ var Operation = (_class = class {
883
891
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
884
892
  */
885
893
  isFormUrlEncoded() {
886
- return _chunkLCRF6REScjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
894
+ return _chunk3IEA3ASVcjs.matches_mimetype_default.formUrlEncoded(this.getContentType());
887
895
  }
888
896
  /**
889
897
  * Checks if the current operation has a mutipart content type payload.
@@ -892,7 +900,7 @@ var Operation = (_class = class {
892
900
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
893
901
  */
894
902
  isMultipart() {
895
- return _chunkLCRF6REScjs.matches_mimetype_default.multipart(this.getContentType());
903
+ return _chunk3IEA3ASVcjs.matches_mimetype_default.multipart(this.getContentType());
896
904
  }
897
905
  /**
898
906
  * Checks if the current operation has a JSON-like content type payload.
@@ -901,7 +909,7 @@ var Operation = (_class = class {
901
909
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
902
910
  */
903
911
  isJson() {
904
- return _chunkLCRF6REScjs.matches_mimetype_default.json(this.getContentType());
912
+ return _chunk3IEA3ASVcjs.matches_mimetype_default.json(this.getContentType());
905
913
  }
906
914
  /**
907
915
  * Checks if the current operation has an XML content type payload.
@@ -910,7 +918,7 @@ var Operation = (_class = class {
910
918
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-request-body-content}
911
919
  */
912
920
  isXml() {
913
- return _chunkLCRF6REScjs.matches_mimetype_default.xml(this.getContentType());
921
+ return _chunk3IEA3ASVcjs.matches_mimetype_default.xml(this.getContentType());
914
922
  }
915
923
  /**
916
924
  * Checks if the current operation is a webhook or not.
@@ -929,7 +937,7 @@ var Operation = (_class = class {
929
937
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#security-requirement-object}
930
938
  */
931
939
  getSecurity() {
932
- if (!_optionalChain([this, 'access', _63 => _63.api, 'optionalAccess', _64 => _64.components, 'optionalAccess', _65 => _65.securitySchemes]) || !Object.keys(this.api.components.securitySchemes).length) {
940
+ if (!_optionalChain([this, 'access', _61 => _61.api, 'optionalAccess', _62 => _62.components, 'optionalAccess', _63 => _63.securitySchemes]) || !Object.keys(this.api.components.securitySchemes).length) {
933
941
  return [];
934
942
  }
935
943
  return this.schema.security || this.api.security || [];
@@ -955,10 +963,10 @@ var Operation = (_class = class {
955
963
  const keysWithTypes = keys.map((key) => {
956
964
  let security;
957
965
  try {
958
- security = _optionalChain([this, 'access', _66 => _66.api, 'optionalAccess', _67 => _67.components, 'optionalAccess', _68 => _68.securitySchemes, 'optionalAccess', _69 => _69[key]]);
966
+ security = _optionalChain([this, 'access', _64 => _64.api, 'optionalAccess', _65 => _65.components, 'optionalAccess', _66 => _66.securitySchemes, 'optionalAccess', _67 => _67[key]]);
959
967
  if (!security) return false;
960
968
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, security)) {
961
- security = _chunkLCRF6REScjs.dereferenceRef.call(void 0, security, this.api);
969
+ security = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, security, this.api);
962
970
  if (!security || _chunkYPR7YTHMcjs.isRef.call(void 0, security)) return false;
963
971
  }
964
972
  } catch (e4) {
@@ -1007,7 +1015,7 @@ var Operation = (_class = class {
1007
1015
  if (!prev[security.type]) prev[security.type] = [];
1008
1016
  const exists = prev[security.type].some((sec) => sec._key === security.security._key);
1009
1017
  if (!exists) {
1010
- if (_optionalChain([security, 'access', _70 => _70.security, 'optionalAccess', _71 => _71._requirements])) delete security.security._requirements;
1018
+ if (_optionalChain([security, 'access', _68 => _68.security, 'optionalAccess', _69 => _69._requirements])) delete security.security._requirements;
1011
1019
  prev[security.type].push(security.security);
1012
1020
  }
1013
1021
  });
@@ -1039,7 +1047,7 @@ var Operation = (_class = class {
1039
1047
  this.schema.parameters.map((p) => {
1040
1048
  let param = p;
1041
1049
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
1042
- param = _chunkLCRF6REScjs.dereferenceRef.call(void 0, param, this.api);
1050
+ param = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, param, this.api);
1043
1051
  if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
1044
1052
  }
1045
1053
  if (param.in && param.in === "header") return param.name;
@@ -1052,20 +1060,20 @@ var Operation = (_class = class {
1052
1060
  let response = this.schema.responses[r];
1053
1061
  if (!response) return [];
1054
1062
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
1055
- this.schema.responses[r] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, response, this.api);
1063
+ this.schema.responses[r] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, response, this.api);
1056
1064
  response = this.schema.responses[r];
1057
1065
  if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
1058
1066
  return [];
1059
1067
  }
1060
1068
  }
1061
- return _optionalChain([response, 'optionalAccess', _72 => _72.headers]) ? Object.keys(response.headers) : [];
1069
+ return _optionalChain([response, 'optionalAccess', _70 => _70.headers]) ? Object.keys(response.headers) : [];
1062
1070
  }).reduce((a, b) => a.concat(b), []);
1063
1071
  }
1064
1072
  if (!this.headers.request.includes("Content-Type") && this.schema.requestBody) {
1065
1073
  let requestBody = this.schema.requestBody;
1066
1074
  if (requestBody) {
1067
1075
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
1068
- this.schema.requestBody = _chunkLCRF6REScjs.dereferenceRef.call(void 0, requestBody, this.api);
1076
+ this.schema.requestBody = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, requestBody, this.api);
1069
1077
  requestBody = this.schema.requestBody;
1070
1078
  }
1071
1079
  if (requestBody && !_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody) && "content" in requestBody && Object.keys(requestBody.content)) {
@@ -1075,10 +1083,10 @@ var Operation = (_class = class {
1075
1083
  }
1076
1084
  if (this.schema.responses) {
1077
1085
  const hasResponseContent = Object.keys(this.schema.responses).some((r) => {
1078
- let response = _optionalChain([this, 'access', _73 => _73.schema, 'access', _74 => _74.responses, 'optionalAccess', _75 => _75[r]]);
1086
+ let response = _optionalChain([this, 'access', _71 => _71.schema, 'access', _72 => _72.responses, 'optionalAccess', _73 => _73[r]]);
1079
1087
  if (!response) return false;
1080
1088
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
1081
- this.schema.responses[r] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, response, this.api);
1089
+ this.schema.responses[r] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, response, this.api);
1082
1090
  response = this.schema.responses[r];
1083
1091
  if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
1084
1092
  return false;
@@ -1142,7 +1150,7 @@ var Operation = (_class = class {
1142
1150
  return [];
1143
1151
  }
1144
1152
  const oasTagMap = /* @__PURE__ */ new Map();
1145
- if (Array.isArray(_optionalChain([this, 'access', _76 => _76.api, 'optionalAccess', _77 => _77.tags]))) {
1153
+ if (Array.isArray(_optionalChain([this, 'access', _74 => _74.api, 'optionalAccess', _75 => _75.tags]))) {
1146
1154
  this.api.tags.forEach((tag) => {
1147
1155
  oasTagMap.set(tag.name, tag);
1148
1156
  });
@@ -1185,18 +1193,18 @@ var Operation = (_class = class {
1185
1193
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-parameters}
1186
1194
  */
1187
1195
  getParameters() {
1188
- let parameters = (_optionalChain([this, 'access', _78 => _78.schema, 'optionalAccess', _79 => _79.parameters]) || []).map((p) => {
1196
+ let parameters = (_optionalChain([this, 'access', _76 => _76.schema, 'optionalAccess', _77 => _77.parameters]) || []).map((p) => {
1189
1197
  let param = p;
1190
1198
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
1191
- param = _chunkLCRF6REScjs.dereferenceRef.call(void 0, param, this.api);
1199
+ param = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, param, this.api);
1192
1200
  if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
1193
1201
  }
1194
1202
  return param;
1195
1203
  }).filter((param) => param !== void 0);
1196
- const commonParams = (_optionalChain([this, 'access', _80 => _80.api, 'optionalAccess', _81 => _81.paths, 'optionalAccess', _82 => _82[this.path], 'optionalAccess', _83 => _83.parameters]) || []).map((p) => {
1204
+ const commonParams = (_optionalChain([this, 'access', _78 => _78.api, 'optionalAccess', _79 => _79.paths, 'optionalAccess', _80 => _80[this.path], 'optionalAccess', _81 => _81.parameters]) || []).map((p) => {
1197
1205
  let param = p;
1198
1206
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
1199
- param = _chunkLCRF6REScjs.dereferenceRef.call(void 0, param, this.api);
1207
+ param = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, param, this.api);
1200
1208
  if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
1201
1209
  }
1202
1210
  return param;
@@ -1234,10 +1242,10 @@ var Operation = (_class = class {
1234
1242
  );
1235
1243
  }
1236
1244
  if (!this.schemasDecorated) {
1237
- _chunkLCRF6REScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1245
+ _chunk3IEA3ASVcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1238
1246
  this.schemasDecorated = true;
1239
1247
  }
1240
- return _chunkLCRF6REScjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
1248
+ return _chunk3IEA3ASVcjs.getParametersAsJSONSchema.call(void 0, this, this.api, {
1241
1249
  includeDiscriminatorMappingRefs: true,
1242
1250
  ...opts
1243
1251
  });
@@ -1262,7 +1270,7 @@ var Operation = (_class = class {
1262
1270
  );
1263
1271
  }
1264
1272
  if (!this.schemasDecorated) {
1265
- _chunkLCRF6REScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1273
+ _chunk3IEA3ASVcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1266
1274
  this.schemasDecorated = true;
1267
1275
  }
1268
1276
  return getResponseAsJSONSchema(this, this.api, statusCode, {
@@ -1290,7 +1298,7 @@ var Operation = (_class = class {
1290
1298
  let resp = response;
1291
1299
  if (!resp) return;
1292
1300
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, resp)) {
1293
- resp = _chunkLCRF6REScjs.dereferenceRef.call(void 0, resp, this.api);
1301
+ resp = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, resp, this.api);
1294
1302
  if (!resp || _chunkYPR7YTHMcjs.isRef.call(void 0, resp)) {
1295
1303
  return;
1296
1304
  }
@@ -1319,7 +1327,7 @@ var Operation = (_class = class {
1319
1327
  let requestBody = this.schema.requestBody;
1320
1328
  if (!requestBody) return false;
1321
1329
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
1322
- this.schema.requestBody = _chunkLCRF6REScjs.dereferenceRef.call(void 0, requestBody, this.api);
1330
+ this.schema.requestBody = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, requestBody, this.api);
1323
1331
  requestBody = this.schema.requestBody;
1324
1332
  if (!requestBody || _chunkYPR7YTHMcjs.isRef.call(void 0, requestBody)) {
1325
1333
  return false;
@@ -1389,7 +1397,7 @@ var Operation = (_class = class {
1389
1397
  let availableMediaType;
1390
1398
  const mediaTypes = this.getRequestBodyMediaTypes();
1391
1399
  mediaTypes.forEach((mt) => {
1392
- if (!availableMediaType && _chunkLCRF6REScjs.matches_mimetype_default.json(mt)) {
1400
+ if (!availableMediaType && _chunk3IEA3ASVcjs.matches_mimetype_default.json(mt)) {
1393
1401
  availableMediaType = mt;
1394
1402
  }
1395
1403
  });
@@ -1416,7 +1424,7 @@ var Operation = (_class = class {
1416
1424
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#request-body-examples}
1417
1425
  */
1418
1426
  getRequestBodyExamples() {
1419
- const isRequestExampleValueDefined = typeof _optionalChain([this, 'access', _84 => _84.requestBodyExamples, 'optionalAccess', _85 => _85[0], 'optionalAccess', _86 => _86.examples, 'optionalAccess', _87 => _87[0], 'access', _88 => _88.value]) !== "undefined";
1427
+ const isRequestExampleValueDefined = typeof _optionalChain([this, 'access', _82 => _82.requestBodyExamples, 'optionalAccess', _83 => _83[0], 'optionalAccess', _84 => _84.examples, 'optionalAccess', _85 => _85[0], 'access', _86 => _86.value]) !== "undefined";
1420
1428
  if (this.requestBodyExamples && isRequestExampleValueDefined) {
1421
1429
  return this.requestBodyExamples;
1422
1430
  }
@@ -1437,7 +1445,7 @@ var Operation = (_class = class {
1437
1445
  let response = this.schema.responses[statusCode];
1438
1446
  if (!response) return false;
1439
1447
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
1440
- this.schema.responses[statusCode] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, response, this.api);
1448
+ this.schema.responses[statusCode] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, response, this.api);
1441
1449
  response = this.schema.responses[statusCode];
1442
1450
  if (!response || _chunkYPR7YTHMcjs.isRef.call(void 0, response)) {
1443
1451
  return false;
@@ -1481,7 +1489,7 @@ var Operation = (_class = class {
1481
1489
  let callbackObj = this.schema.callbacks[identifier];
1482
1490
  if (!callbackObj) return false;
1483
1491
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, callbackObj)) {
1484
- this.schema.callbacks[identifier] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, callbackObj, this.api);
1492
+ this.schema.callbacks[identifier] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, callbackObj, this.api);
1485
1493
  callbackObj = this.schema.callbacks[identifier];
1486
1494
  if (!callbackObj || _chunkYPR7YTHMcjs.isRef.call(void 0, callbackObj)) {
1487
1495
  return false;
@@ -1490,7 +1498,7 @@ var Operation = (_class = class {
1490
1498
  let callback = callbackObj[expression];
1491
1499
  if (!callback) return false;
1492
1500
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, callback)) {
1493
- callbackObj[expression] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, callback, this.api);
1501
+ callbackObj[expression] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, callback, this.api);
1494
1502
  callback = callbackObj[expression];
1495
1503
  if (!callback || _chunkYPR7YTHMcjs.isRef.call(void 0, callback)) {
1496
1504
  return false;
@@ -1511,10 +1519,10 @@ var Operation = (_class = class {
1511
1519
  if (!this.hasCallbacks()) return [];
1512
1520
  const callbacks = [];
1513
1521
  Object.keys(this.schema.callbacks).forEach((callback) => {
1514
- let cb = _optionalChain([this, 'access', _89 => _89.schema, 'access', _90 => _90.callbacks, 'optionalAccess', _91 => _91[callback]]);
1522
+ let cb = _optionalChain([this, 'access', _87 => _87.schema, 'access', _88 => _88.callbacks, 'optionalAccess', _89 => _89[callback]]);
1515
1523
  if (!cb) return;
1516
1524
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, cb)) {
1517
- this.schema.callbacks[callback] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, cb, this.api);
1525
+ this.schema.callbacks[callback] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, cb, this.api);
1518
1526
  cb = this.schema.callbacks[callback];
1519
1527
  if (!cb || _chunkYPR7YTHMcjs.isRef.call(void 0, cb)) {
1520
1528
  return;
@@ -1524,14 +1532,14 @@ var Operation = (_class = class {
1524
1532
  let callbackPath = cb[expression];
1525
1533
  if (!callbackPath) return;
1526
1534
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) {
1527
- cb[expression] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, callbackPath, this.api);
1535
+ cb[expression] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, callbackPath, this.api);
1528
1536
  callbackPath = cb[expression];
1529
1537
  if (!callbackPath || _chunkYPR7YTHMcjs.isRef.call(void 0, callbackPath)) {
1530
1538
  return;
1531
1539
  }
1532
1540
  }
1533
1541
  Object.keys(callbackPath).forEach((method) => {
1534
- if (!_chunkLCRF6REScjs.supportedMethods.includes(method)) return;
1542
+ if (!_chunk3IEA3ASVcjs.supportedMethods.includes(method)) return;
1535
1543
  const found = this.getCallback(callback, expression, method);
1536
1544
  if (found) {
1537
1545
  callbacks.push(found);
@@ -1574,7 +1582,7 @@ var Operation = (_class = class {
1574
1582
  * @deprecated Use `oas.getExtension(extension, operation)` instead.
1575
1583
  */
1576
1584
  getExtension(extension) {
1577
- return _optionalChain([this, 'access', _92 => _92.schema, 'optionalAccess', _93 => _93[extension]]);
1585
+ return _optionalChain([this, 'access', _90 => _90.schema, 'optionalAccess', _91 => _91[extension]]);
1578
1586
  }
1579
1587
  /**
1580
1588
  * Returns an object with groups of all example definitions (body/header/query/path/response/etc.).
@@ -1609,12 +1617,12 @@ var Operation = (_class = class {
1609
1617
  }
1610
1618
  this.dereferencing.processing = true;
1611
1619
  if (!this.schemasDecorated) {
1612
- _chunkLCRF6REScjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1620
+ _chunk3IEA3ASVcjs.decorateComponentSchemasWithRefName.call(void 0, this.api);
1613
1621
  this.schemasDecorated = true;
1614
1622
  }
1615
1623
  const { api, schema, promises } = this;
1616
1624
  const circularRefs = /* @__PURE__ */ new Set();
1617
- const dereferencingOptions = _chunkLCRF6REScjs.getDereferencingOptions.call(void 0, circularRefs);
1625
+ const dereferencingOptions = _chunk3IEA3ASVcjs.getDereferencingOptions.call(void 0, circularRefs);
1618
1626
  const parser = new (0, _jsonschemarefparser.$RefParser)();
1619
1627
  return parser.dereference(
1620
1628
  "#/__INTERNAL__",
@@ -1661,7 +1669,7 @@ var Operation = (_class = class {
1661
1669
  // We need to convert our `Set` to an array in order to match the typings.
1662
1670
  circularRefs: [...circularRefs]
1663
1671
  };
1664
- if (_optionalChain([opts, 'optionalAccess', _94 => _94.cb])) {
1672
+ if (_optionalChain([opts, 'optionalAccess', _92 => _92.cb])) {
1665
1673
  opts.cb();
1666
1674
  }
1667
1675
  }).then(() => {
@@ -1725,7 +1733,7 @@ var Callback = class extends Operation {
1725
1733
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
1726
1734
  */
1727
1735
  getSummary() {
1728
- if (_optionalChain([this, 'access', _95 => _95.schema, 'optionalAccess', _96 => _96.summary]) && typeof this.schema.summary === "string") {
1736
+ if (_optionalChain([this, 'access', _93 => _93.schema, 'optionalAccess', _94 => _94.summary]) && typeof this.schema.summary === "string") {
1729
1737
  return this.schema.summary;
1730
1738
  } else if (this.parentSchema.summary && typeof this.parentSchema.summary === "string") {
1731
1739
  return this.parentSchema.summary;
@@ -1739,7 +1747,7 @@ var Callback = class extends Operation {
1739
1747
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
1740
1748
  */
1741
1749
  getDescription() {
1742
- if (_optionalChain([this, 'access', _97 => _97.schema, 'optionalAccess', _98 => _98.description]) && typeof this.schema.description === "string") {
1750
+ if (_optionalChain([this, 'access', _95 => _95.schema, 'optionalAccess', _96 => _96.description]) && typeof this.schema.description === "string") {
1743
1751
  return this.schema.description;
1744
1752
  } else if (this.parentSchema.description && typeof this.parentSchema.description === "string") {
1745
1753
  return this.parentSchema.description;
@@ -1753,10 +1761,10 @@ var Callback = class extends Operation {
1753
1761
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-parameters}
1754
1762
  */
1755
1763
  getParameters() {
1756
- let parameters = (_optionalChain([this, 'access', _99 => _99.schema, 'optionalAccess', _100 => _100.parameters]) || []).map((p) => {
1764
+ let parameters = (_optionalChain([this, 'access', _97 => _97.schema, 'optionalAccess', _98 => _98.parameters]) || []).map((p) => {
1757
1765
  let param = p;
1758
1766
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
1759
- param = _chunkLCRF6REScjs.dereferenceRef.call(void 0, param, this.api);
1767
+ param = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, param, this.api);
1760
1768
  if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
1761
1769
  }
1762
1770
  return param;
@@ -1764,7 +1772,7 @@ var Callback = class extends Operation {
1764
1772
  const commonParams = (this.parentSchema.parameters || []).map((p) => {
1765
1773
  let param = p;
1766
1774
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, param)) {
1767
- param = _chunkLCRF6REScjs.dereferenceRef.call(void 0, param, this.api);
1775
+ param = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, param, this.api);
1768
1776
  if (!param || _chunkYPR7YTHMcjs.isRef.call(void 0, param)) return void 0;
1769
1777
  }
1770
1778
  return param;
@@ -1783,17 +1791,17 @@ var Webhook = class extends Operation {
1783
1791
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-summary}
1784
1792
  */
1785
1793
  getSummary() {
1786
- if (_optionalChain([this, 'access', _101 => _101.schema, 'optionalAccess', _102 => _102.summary]) && typeof this.schema.summary === "string") {
1794
+ if (_optionalChain([this, 'access', _99 => _99.schema, 'optionalAccess', _100 => _100.summary]) && typeof this.schema.summary === "string") {
1787
1795
  return this.schema.summary;
1788
1796
  } else if (!this.api.webhooks) {
1789
1797
  return void 0;
1790
1798
  }
1791
1799
  let webhookPath = this.api.webhooks[this.path];
1792
1800
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, webhookPath)) {
1793
- this.api.webhooks[this.path] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, webhookPath, this.api);
1801
+ this.api.webhooks[this.path] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1794
1802
  webhookPath = this.api.webhooks[this.path];
1795
1803
  }
1796
- return _optionalChain([webhookPath, 'optionalAccess', _103 => _103.summary]);
1804
+ return _optionalChain([webhookPath, 'optionalAccess', _101 => _101.summary]);
1797
1805
  }
1798
1806
  /**
1799
1807
  * Retrieve the `description` for this operation.
@@ -1802,17 +1810,17 @@ var Webhook = class extends Operation {
1802
1810
  * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.2.md#user-content-operation-description}
1803
1811
  */
1804
1812
  getDescription() {
1805
- if (_optionalChain([this, 'access', _104 => _104.schema, 'optionalAccess', _105 => _105.description]) && typeof this.schema.description === "string") {
1813
+ if (_optionalChain([this, 'access', _102 => _102.schema, 'optionalAccess', _103 => _103.description]) && typeof this.schema.description === "string") {
1806
1814
  return this.schema.description;
1807
1815
  } else if (!this.api.webhooks) {
1808
1816
  return void 0;
1809
1817
  }
1810
1818
  let webhookPath = this.api.webhooks[this.path];
1811
1819
  if (_chunkYPR7YTHMcjs.isRef.call(void 0, webhookPath)) {
1812
- this.api.webhooks[this.path] = _chunkLCRF6REScjs.dereferenceRef.call(void 0, webhookPath, this.api);
1820
+ this.api.webhooks[this.path] = _chunk3IEA3ASVcjs.dereferenceRef.call(void 0, webhookPath, this.api);
1813
1821
  webhookPath = this.api.webhooks[this.path];
1814
1822
  }
1815
- return _optionalChain([webhookPath, 'optionalAccess', _106 => _106.description]);
1823
+ return _optionalChain([webhookPath, 'optionalAccess', _104 => _104.description]);
1816
1824
  }
1817
1825
  };
1818
1826
 
@@ -1833,4 +1841,4 @@ exports.Operation = Operation; exports.Callback = Callback; exports.Webhook = We
1833
1841
  * @license Apache-2.0
1834
1842
  * @see {@link https://github.com/swagger-api/swagger-ui/blob/master/src/core/plugins/samples/fn.js}
1835
1843
  */
1836
- //# sourceMappingURL=chunk-TBIEIVIF.cjs.map
1844
+ //# sourceMappingURL=chunk-I2TE44UE.cjs.map