@eventcatalog/generator-openapi 7.1.0 → 7.2.0

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/index.js CHANGED
@@ -5872,9 +5872,9 @@ var require_src = __commonJS({
5872
5872
  }
5873
5873
  });
5874
5874
 
5875
- // ../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js
5875
+ // ../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js
5876
5876
  var require_helpers = __commonJS({
5877
- "../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports2) {
5877
+ "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js"(exports2) {
5878
5878
  "use strict";
5879
5879
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
5880
5880
  if (k2 === void 0) k2 = k;
@@ -5942,9 +5942,9 @@ var require_helpers = __commonJS({
5942
5942
  }
5943
5943
  });
5944
5944
 
5945
- // ../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/index.js
5945
+ // ../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js
5946
5946
  var require_dist = __commonJS({
5947
- "../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/index.js"(exports2) {
5947
+ "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/index.js"(exports2) {
5948
5948
  "use strict";
5949
5949
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
5950
5950
  if (k2 === void 0) k2 = k;
@@ -6040,7 +6040,7 @@ var require_dist = __commonJS({
6040
6040
  // In order to properly update the socket pool, we need to call `getName()` on
6041
6041
  // the core `https.Agent` if it is a secureEndpoint.
6042
6042
  getName(options) {
6043
- const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options);
6043
+ const secureEndpoint = this.isSecureEndpoint(options);
6044
6044
  if (secureEndpoint) {
6045
6045
  return https_1.Agent.prototype.getName.call(this, options);
6046
6046
  }
@@ -6640,7 +6640,7 @@ var getSummary = (document2) => {
6640
6640
  const summary = document2.info.description ? document2.info.description : "";
6641
6641
  return summary && summary.length < 150 ? summary : "";
6642
6642
  };
6643
- var buildService = (serviceOptions, document2) => {
6643
+ var buildService = (serviceOptions, document2, generateMarkdown) => {
6644
6644
  const schemaPath = import_path.default.basename(serviceOptions.path) || "openapi.yml";
6645
6645
  const documentTags = document2.tags || [];
6646
6646
  const serviceId = serviceOptions.id || (0, import_slugify.default)(document2.info.title, { lower: true, strict: true });
@@ -6653,7 +6653,7 @@ var buildService = (serviceOptions, document2) => {
6653
6653
  specifications: {
6654
6654
  openapiPath: schemaPath
6655
6655
  },
6656
- markdown: defaultMarkdown2(document2, schemaPath),
6656
+ markdown: generateMarkdown ? generateMarkdown(document2, schemaPath) : defaultMarkdown2(document2, schemaPath),
6657
6657
  badges: documentTags.map((tag) => ({ content: tag.name, textColor: "blue", backgroundColor: "blue" })),
6658
6658
  owners: serviceOptions.owners || [],
6659
6659
  setMessageOwnersToServiceOwners: serviceOptions.setMessageOwnersToServiceOwners || true
@@ -8293,7 +8293,7 @@ var import_node_path2 = require("path");
8293
8293
  // package.json
8294
8294
  var package_default = {
8295
8295
  name: "@eventcatalog/generator-openapi",
8296
- version: "7.1.0",
8296
+ version: "7.2.0",
8297
8297
  description: "OpenAPI generator for EventCatalog",
8298
8298
  scripts: {
8299
8299
  build: "tsup",
@@ -9256,7 +9256,7 @@ var index_default = async (_, options) => {
9256
9256
  const document2 = specification.document;
9257
9257
  const version = document2.info.version;
9258
9258
  const specPath = specification.path;
9259
- const service = buildService({ ...serviceSpec, path: specPath }, document2);
9259
+ const service = buildService({ ...serviceSpec, path: specPath }, document2, serviceSpec.generateMarkdown);
9260
9260
  let serviceMarkdown = service.markdown;
9261
9261
  let serviceSpecificationsFiles = [];
9262
9262
  let serviceSpecifications = service.specifications;