structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
491 stars 75 forks source link

Sample workspace JSON generates jackson exception structurizr-cli-1.12.1.jar #48

Closed nicodewet closed 3 years ago

nicodewet commented 3 years ago

Checked out master, did build and copy jar to etc ( ./gradlew bootJar && cp build/libs/structurizr-cli-1.12.1.jar etc/) then with sample / starter example I get:

com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'workspace': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')

Upload as follows: ./etc/structurizr.sh push -id -key KEY -secret -workspace structurizr-model.json

Simple example from actual structurizr docs:

` workspace {

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

    user -> softwareSystem "Uses"
}

views {
    systemContext softwareSystem {
        include *
        autolayout
    }

    theme default
}

} `

simonbrowndotje commented 3 years ago

That example isn't JSON, it's the Structurizr DSL ... try renaming the file to structurizr-model.dsl.

nicodewet commented 3 years ago

My bad, yes this worked.

$ mv structurizr-model.json structurizr-model.dsl