event-catalog / eventcatalog

An open source documentation tool to bring discoverability to your event-driven architectures
https://eventcatalog.dev
MIT License
1.66k stars 137 forks source link

Schema visualisation does not render correctly when used at the bottom of the page #561

Open debae opened 1 month ago

debae commented 1 month ago

Summary

Schema visualisation does not render correctly when used at the bottom of the page

Description

Whenever you add the component as last one on the page it does not render correctly. So in the index.md I have the following content :

---
id: xxxxxx
name: xxxxxx
version: 1.0.0
summary: |
  xxxxxx
owners:
    - dbaert
badges:
    - content: ACE
      backgroundColor: blue
      textColor: blue
schemaPath: 'schema.avro'
---

### Details
...

<NodeGraph title="Consumer / Producer Diagram" />

<Schema file="schema.avro" />

This will render like this : image

instead of

image

andy-g commented 1 month ago

I noticed this if it didn't have a preceding payload code block.

Using the example OrderConfirmed event, as soon as I remove the code block and save it, the schema rendering breaks.

With Code Block:

image

Once Code block is removed:

image