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
As a plugin developer, I would like to define extra attributes for objects and relationships.
I could develop a plugin that renders d2 as a BMPN graph. I would then like to know which objects are a activity, which are a gateway, event, etc. This information is not encoded in d2's grammar. It's probably good to keep d2 agnostic about graph specifications such as UML and BPMN. But it would be nice if d2 could pass 'hints' to plugins, for which the interpretation is completely up to the plugin developer.
The way to do this currently would be to use comments. Ofcourse this is not very clean. And since it's not formally specified, prone to breaking changes.
An inspiration for this system may be how in the Go language struct fields are tagged. The Go languages doesn't know anything about json, but the encoding/json package can obtain information from a tag. json:"my_field"
(Based on some brainstorms in discord, #feature-requests, 29 december)
As a plugin developer, I would like to define extra attributes for objects and relationships.
I could develop a plugin that renders d2 as a BMPN graph. I would then like to know which objects are a activity, which are a gateway, event, etc. This information is not encoded in d2's grammar. It's probably good to keep d2 agnostic about graph specifications such as UML and BPMN. But it would be nice if d2 could pass 'hints' to plugins, for which the interpretation is completely up to the plugin developer.
The way to do this currently would be to use comments. Ofcourse this is not very clean. And since it's not formally specified, prone to breaking changes.
An inspiration for this system may be how in the Go language struct fields are tagged. The Go languages doesn't know anything about json, but the
encoding/json
package can obtain information from a tag.json:"my_field"
The text was updated successfully, but these errors were encountered: