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

Import DSL/JSON file #21

Closed
tsauvajon opened this issue May 11, 2021 · 3 comments
Closed

Import DSL/JSON file #21

tsauvajon opened this issue May 11, 2021 · 3 comments

Comments

@tsauvajon
Copy link

Context

Hi!

I started using Structurizr and really like the Structurizr DSL. I started building some diagrams, and would like to supplement them with some code. Since I mainly use Go, this repo looks like a good fit.

Problem

While we can export code diagrams to SVG and/or workspaces, I didn't find a way of doing it the other way around: pulling workspaces, or reading .dsl/.json files.

I would like to do two things:

  • read existing diagrams -> generate Go code from them
  • read existing diagrams -> generate SVG diagrams from them

Question

Is there a way of doing that with your repo?
If not, where should I look at to get started and start working on it?

@raphael
Copy link
Member

raphael commented Nov 15, 2021

That's a great idea and is currently not supported. Fair warning this is probably a bit of work but the idea would be to parse the structurizr JSON into an instance of a Workspace and from there generate the corresponding DSL. It might make sense to leverage Go templates to do that.

@tsauvajon
Copy link
Author

It was 6 months ago, but as far as I remember I started trying to un marshal the JSON into a Workspace instance. I don't remember exactly into what issues I ran, but it was indeed more work than I anticipated, so I dropped it.

@raphael
Copy link
Member

raphael commented Nov 16, 2021

Happy to answer any question if you feel like taking this on again!

@raphael raphael closed this as completed Feb 1, 2023
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

No branches or pull requests

2 participants