Installation
go get github.com/minodisk/go-jsonschema/tools/jsonschema
Usage
Help
jsonschema help
Generate implementation in Go
Struct
jsonschema struct schema.json
Routing
jsonschema router schema.json
Validator
jsonschema validator schema.json
Client
Generate client code to access to APIs.
You can make SDK of APIs easily.
jsonshcema client schema.json
You can find other options with jsonschema client -h
.
Test
jsonschema test schema.json
Mock server
jsonschema mock schema.json
Then mock server will be started.
You can access http://localhost:3333 (in default).
You can find other options with jsonschema mock -h
.
jsonschema doc -o schema.md schema.json
You can output other formats you like with template.
jsonschema doc -o schema.html -t schema.html.tmpl schema.json
Combine schema files in YAML or JSON into one schema file in JSON
jsonschema combine -m meta.yml -o schema.json ./fixtures/yaml