Add DBML and D2 support from Kroki
What does this MR do and why?
Gitlab already supports drawing diagrams with Kroki, either from https://kroki.io/ or from self-hosted kroki instance.
Now Kroki also supports drawing database diagrams with the DBML language (see https://www.dbml.org) through a tool called dbml-renderer
(https://github.com/softwaretechnik-berlin/dbml-renderer).
This merge request only extends the list of supported diagrams to include DBML too.
Screenshots or screen recordings
No idea how to run a modified instance of Gitlab.
How to set up and validate locally
- Ensure your Gitlab instance is configured to use kroki, either from https://kroki.io/ or from an up-to-date self-hosted kroki instance.
- Create any markdown text into Gitlab (issue, comment, etc.)
- Use
```dbml
to provide a diagram in DBML. Example:```dbml Table users { id integer username varchar role varchar created_at timestamp } Table posts { id integer [primary key] title varchar body text [note: 'Content of the post'] user_id integer status post_status created_at timestamp } Enum post_status { draft published private [note: 'visible via URL only'] } Ref: posts.user_id > users.id // many-to-one
- In preview or visualization, the DBML should be replaced by the same image as
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Bruno Obsomer