# <img className="page-icon" src="/img/icons/mermaid.svg" alt="" /> Export: Mermaid

Generates a [Mermaid](https://mermaid.js.org/) entity-relationship diagram of the contract's schemas.

{/* AUTOGENERATED EXAMPLE: do not edit by hand; regenerate with the update script. */}

```bash
datacontract export mermaid orders.odcs.yaml
```

Running this against the [example `orders` contract](https://github.com/datacontract/datacontract-cli/blob/main/examples/orders/orders.odcs.yaml) produces:

```mermaid
erDiagram
        "**orders**" {
        order_id🔑🆔 string
        order_timestamp timestamp
        customer_id string
        order_total integer
        status string
}
        "**line_items**" {
        line_item_id🔑🆔 string
        order_id🔗 string
        sku string
        quantity integer
}

"**orders**" ||--o{ "**line_items**" : "order_id → order_id"
```

{/* END AUTOGENERATED EXAMPLE */}

Mermaid doesn't render diagrams longer than 50,000 characters. For larger contracts, the export draws a reduced diagram instead: each entity shows at most 5 attributes and entity names are cut to 32 characters.

All options: **[`datacontract export mermaid`](../commands/export/mermaid.md)**.
