structurizr / dsl

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

Dynamic View does not allow !script tag #336

Closed simonwfarrow closed 1 year ago

simonwfarrow commented 1 year ago

Description

Hi,

When running the CLI to parse a DSL file into JSON, I recieve the following error if I include a !script tag in a Dynamic View:

com.structurizr.dsl.StructurizrDslParserException: The relationship "!script" does not exist

Steps to reproduce

  1. Create a dynamic view with a script tag i.e.

    dynamic * "TestFlow" {
    !script external.groovy
    rel1 -> rel2  
    }
  2. Run the DSL file through the CLI to format to JSON i.e. docker run -t --rm -v ${PWD}:/usr/local/structurizr structurizr/cli export -workspace workspaces/test.dsl -format json -output target

Screenshot

No response

Code sample

dynamic * "TestFlow" {
  !script external.groovy
  rel1 -> rel2  
}

Configuration

No response

Severity

Major

Priority

Medium

Resolution

I have no budget, please fix this for free

More information

No response