Generates Go struct types from a JSON Schema.
go get -u github.com/aaharu/schemarshal
SYNOPSIS
schemarshal [options] [<json_schema_file>]
OPTIONS
-h, -help
Show this help message.
-f <file>, -file <file>
Input file name.
-o <file>, -output <file>
Write output to file instead of stdout.
-p <package>, -package <package>
Package name for output. (default `main`)
-t <package>, -type <package>
Set default Type name.
-v, -version
Show version.
-nc, -nocomment
Do not output comments.
# with args
schemarshal -o api/schema/gen.go -p gen -f schema.json
# pipe
curl -s "https://raw.githubusercontent.com/aaharu/schemarshal/master/test_data/disk.json" | schemarshal
- use go/ast
- https://github.com/lestrrat/go-jsschema
- JSON Schema parser
- MIT License
- golang.org/x/crypto/ssh/terminal
- https://github.com/idubinskiy/schematyper
- https://github.com/dameleon/structr
- https://github.com/interagent/schematic
BSD-2-Clause