Forum Discussion

Stoplight's avatar
Stoplight
Community Manager
8 months ago

Trouble using Mermaid with Stoplight

Originally posted by user Sulabh Jain to the Stoplight Community on 10/16/2023 at 06:58 ET.

Hello Everyone, I am a stoplight user and trying to improve the documentation for all my API's there like adding images, making the details more interactive using MD, and using mermaid diagrams. Everything is working fine for me except for adding the mermaid sequence diagram. I am using the description field to define all the documentation related to the API. When i finally published it using GIT, everything was rendering good except the mermaid diagram. Can anyone please guide me on what is wrong with the below code for a mermaid?

  sequenceDiagram
    autonumber
    A->>+B: Book Order
    B->>+C: Create Order
    C-->>-B: Order placed successfully
    B->>+C: Check order is ready
    C-->>-B: Return order status
    B-->>-A: order processed successfully.