structurizr / dsl

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

Allow adding tags to relationships by referencing via !ref #93

Closed juanrferia closed 2 years ago

juanrferia commented 2 years ago

Nowadays it is possible to add tags to an existing element in a model by referencing it via !ref. However, the same is not supported for relationships. It would be great to allow also referencing an existing relationship to allow adding extra tags.

Giving the following example:

workspace {

    model {
        user = person "User"
        softwareSystem = softwareSystem "Software System"

        userToSystem = user -> softwareSystem "Uses"

        !ref user {
            tags "test"
        }

        !ref userToSystem {
            tags "test"
        }

    }

    views {
        systemContext softwareSystem {
            include *
            autolayout
        }

        theme default
    }

}

The reference to "user" works, but after adding the reference to userToSystem, I face an error: An element referenced by "userToSystem" could not be found at line 13: !ref userToSystem {