@eventcatalog/generator-openapi 7.4.3 → 7.4.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.
package/dist/index.js CHANGED
@@ -572,7 +572,7 @@ var getSummary2 = (message2) => {
572
572
  }
573
573
  return escapeSpecialCharactersThatBreakMarkdown(eventCatalogMessageSummary);
574
574
  };
575
- var buildMessage = async (pathToFile, document, operation, generateMarkdown, messageIdConfig) => {
575
+ var buildMessage = async (pathToFile, document, operation, generateMarkdown, messageIdConfig, serviceId) => {
576
576
  const requestBodiesAndResponses = await getSchemasByOperationId(pathToFile, operation.operationId);
577
577
  const extensions = operation.extensions || {};
578
578
  const operationTags = operation.tags.map((badge) => ({
@@ -595,7 +595,7 @@ var buildMessage = async (pathToFile, document, operation, generateMarkdown, mes
595
595
  }
596
596
  if (messageIdConfig?.prefixWithServiceId) {
597
597
  const separator = messageIdConfig.separator || "-";
598
- uniqueIdentifier = [apiName, uniqueIdentifier].join(separator);
598
+ uniqueIdentifier = [serviceId, uniqueIdentifier].join(separator);
599
599
  }
600
600
  return {
601
601
  id: extensions["x-eventcatalog-message-id"] || uniqueIdentifier,
@@ -2833,7 +2833,7 @@ var import_node_path = require("path");
2833
2833
  // package.json
2834
2834
  var package_default = {
2835
2835
  name: "@eventcatalog/generator-openapi",
2836
- version: "7.4.3",
2836
+ version: "7.4.4",
2837
2837
  description: "OpenAPI generator for EventCatalog",
2838
2838
  scripts: {
2839
2839
  build: "tsup",
@@ -3043,7 +3043,8 @@ Processing domain: ${domainName} (v${domainVersion})`));
3043
3043
  ...options,
3044
3044
  owners: service.setMessageOwnersToServiceOwners ? service.owners : [],
3045
3045
  serviceHasMultipleSpecFiles: Array.isArray(serviceSpec.path),
3046
- isDraft: isServiceMarkedAsDraft
3046
+ isDraft: isServiceMarkedAsDraft,
3047
+ serviceId: service.id
3047
3048
  });
3048
3049
  let owners = service.owners || [];
3049
3050
  let repository = null;
@@ -3119,7 +3120,8 @@ var processMessagesForOpenAPISpec = async (pathToSpec, document, servicePath, op
3119
3120
  document,
3120
3121
  operation,
3121
3122
  options.messages?.generateMarkdown,
3122
- options.messages?.id
3123
+ options.messages?.id,
3124
+ options.serviceId
3123
3125
  );
3124
3126
  let messageMarkdown = message2.markdown;
3125
3127
  const messageType = operation.type;