@eventcatalog/generator-asyncapi 4.0.0 → 4.0.1

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.mjs CHANGED
@@ -290,7 +290,7 @@ import path2 from "path";
290
290
  // package.json
291
291
  var package_default = {
292
292
  name: "@eventcatalog/generator-asyncapi",
293
- version: "4.0.0",
293
+ version: "4.0.1",
294
294
  description: "AsyncAPI generator for EventCatalog",
295
295
  scripts: {
296
296
  build: "tsup",
@@ -1633,7 +1633,10 @@ Processing domain: ${domainName} (v${domainVersion})`));
1633
1633
  );
1634
1634
  console.log(chalk3.cyan(` - Message (v${messageVersion}) created`));
1635
1635
  if (messageHasSchema(message)) {
1636
- const schema = message.payload()?.extensions()?.get("x-parser-original-payload")?.json() || message.payload()?.json();
1636
+ let schema = message.payload()?.extensions()?.get("x-parser-original-payload")?.json() || message.payload()?.json();
1637
+ if (schema?.schema) {
1638
+ schema = schema.schema;
1639
+ }
1637
1640
  await addSchemaToMessage(
1638
1641
  messageId,
1639
1642
  {