Generates a JSON schema for the Juju API
Go
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
dependencies.tsv
schemagen.go

README.md

schemagen

Generates a JSON schema for the Juju API.

Installation

To install, you will first need go and godeps, then you can build and install it with:

go get github.com/juju/schemagen
cd $GOPATH/src/github.com/juju/schemagen
godeps -u dependencies.tsv
go install

Usage

Just run with no arguments, optionally redirecting the output to a file:

schemagen > schemas.json

Building for a New Juju Revision

Check out the specific revision of Juju that you wish to build agianst, update the schemagen dependencies to match that, tag schemagen for that version, then build and install the new version of schemagen:

cd $GOPATH/src/github.com/juju/juju
git checkout 2.1
godeps -u dependencies.tsv
cd $GOPATH/src/github.com/juju/schemagen
godeps > dependencies.tsv
godeps -u dependencies.tsv
git ci -am 'Updated to 2.1'
git tag 2.1
git push --tags
go install