structurizr / dsl

Structurizr DSL
https://docs.structurizr.com/dsl
Apache License 2.0
1.41k stars 266 forks source link

Trigger an error on unrecognized properties #173

Closed dgutson closed 1 year ago

dgutson commented 1 year ago

I spent a long time trying to find the reason why sequence diagrams were not shown. It turned out that there was this line in the changelog that I missed:

Renamed plantuml.sequenceDiagrams to plantuml.sequenceDiagram

I propose to throw an error on unrecognized properties. This would had help me to avoid wasting so much time. Likewise for typos.

simonbrowndotje commented 1 year ago

Unfortunately this isn't really viable, given that people might be using their own properties (example).

dgutson commented 1 year ago

In that case, what about "declaring" non-standard properties?

declare {
    property name "description"
}

This would also help documentation for users and prevent typos, help to detect breaking changes such as sequenceDiagram/s.

dgutson commented 1 year ago

Moreover, there could be a property force.declare.properties to control this behavior.

simonbrowndotje commented 1 year ago

If you'd like to perform further validation on your workspace, I'd recommend writing a DSL plugin to do this.