structurizr / dsl

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

Add url for relationship in dynamic view #359

Closed hungphamvn closed 11 months ago

hungphamvn commented 12 months ago

Description

Hi there, Thanks for the super cool project. I think it would be awesome to add a URL to the relationship in the dynamic view (or any workaround that I can do to add the link into it since the relationship is clickable)

dynamic mySystem "myDynamic" "Summarises how the feature works." {
            frontend -> backend "Sends request to" 
}

Thanks

Priority

Low

Resolution

I have no budget and there's no rush, please add this feature for free

More information

No response

simonbrowndotje commented 11 months ago

At the moment you can do something like this, which will create a double-clickable relationship:

workspace {

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

        user -> softwareSystem "Uses" {
            url https://google.com
        }
    }

    views {
        dynamic * "key" {
            user -> softwareSystem
            autoLayout
        }
    }

}

The url property on dynamic view relationships is overridable via the underlying Java library (this is a new feature added recently), but it's not been exposed via the DSL yet.

hungphamvn commented 11 months ago

Dear @simonbrowndotje, Thanks for your response. I hope that feature will be exposed soon.