You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Prisma's triple-slash (///) documentation comments that span multiple lines (e.g. for JSON examples), the generator creates DBML with unescaped newlines in string literals, producing invalid DBML syntax (at least https://dbdiagram.io/ can't parse them).
E.g.:
model Example {
/// JSON structure example:
/// {
/// "key": "value",
/// "nested": {
/// "data": "here"
/// }
/// }
data Json
}
We get something like:
Table Example {
data Json [note: 'JSON structure example:
{
"key": "value",
"nested": {
"data": "here"
}
}']
}
I think we'd want something like this instead:
Table Example {
data Json [note: 'JSON structure example:\n{\n "key": "value",\n "nested": {\n "data": "here"\n }\n}']
}
Could we do one of (or have the option of):
Escape newlines with \n
Convert multi-line comments to single-line
Omit multi-line comments from DBML output
Thanks for the package!
The text was updated successfully, but these errors were encountered:
When using Prisma's triple-slash (///) documentation comments that span multiple lines (e.g. for JSON examples), the generator creates DBML with unescaped newlines in string literals, producing invalid DBML syntax (at least https://dbdiagram.io/ can't parse them).
E.g.:
We get something like:
I think we'd want something like this instead:
Could we do one of (or have the option of):
Thanks for the package!
The text was updated successfully, but these errors were encountered: