Skip to content
New issue

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

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

Already on GitHub? # to your account

Implied relationships not configured correctly when DSL workspace extends a JSON workspace #233

Closed
simonbrowndotje opened this issue Jan 12, 2024 Discussed in #232 · 0 comments

Comments

@simonbrowndotje
Copy link
Contributor

Discussed in #232

Originally posted by beffge January 12, 2024
Hi Simon,

I recognised something about the implied relationships I would have expected differently. But maybe it's me and it works as intended 😇

I created the following landscape.dsl file (based on some of your examples):

workspace {

    model {
        u = person "User"
        s = softwareSystem "Software System" {
            webapp = container "Web Application" {
                c1 = component "Component 1"    
                c2 = component "Component 2"    
            }
            database = container "Database"
        }

        u -> c1 "Uses"
        c1 -> c2 "Uses"
        c2 -> database "Reads from and writes to"
    }

    views {
        component webapp "landscape-webapp" {
            include *
            autoLayout lr
        }
    }
    
}

and extended it via the following workspace.dsl:

workspace extends landscape.dsl {

    model {
        !ref s {
            c3 = container "Backend"
            c2 -> c3 "Reads from"
        }
    }
    
    views {
        container s "extended-container" {
            include *
            autoLayout lr
        }
        component webapp "extended-webapp" {
            include *
            autoLayout lr
        }
    }
    
}

If done, then like expected the default for !impliedRelationships is taken i.e. true and on the view with the key extended-container I can see the relationship between the WebApp and the Backend.

Now if I use the cli and convert the DSL to JSON docker run -it --rm -v $PWD:/usr/local/structurizr structurizr/cli export -workspace landscape.dsl -format json and change the extend from *.dsl to *.json, the relationship is missng.

I have to add explicitly !impliedRelationships true to the workspace.dsl to make it appear again.

Therefore the question: Is this intended like this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant