Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options to the StructurizrDslParser #256

Conversation

GuillaumeTaffin
Copy link
Contributor

Related to #253

After digging a bit more into the parser, it seems that adding a property to the DSL to be able to force constant declaration uniqueness is not trivial. Indeed, since the parsing is purely linear and checks rules "just in time", I did not see a simple way to prevent overrides before actually parsing the property that would forbid them.

Hence, I made this PR as a suggestion to at least allow people who use the StructurizrDslParser API directly in code to parametrize this behavior via options passed to the parser on invocation.

The only option is to force unique constant declaration, in order to prevent constants override inside a workspace.
Even if there is only one option, I feel like creating a dedicated object that contains everything will be more extensible in the probable case where one would suggest more parametrization of the parser behavior.

…sing behaviors.

The only option is to force unique constant declaration, in order to prevent constants override inside a workspace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant