jsst
A CLI Generating Go struct file from JSON Hyper Schema (via prmd).
WIP
Demo
# from file
$ jsst schema.json > struct.go
# from stdin
$ cat schema.json | jsst > struct.go
# change package
$ jsst schema.json -p schema > struct.go
Installation
$ go get github.com/moqada/jsst
Usage
usage: jsst [<flags>] [<file>]
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-p, --package="main" Package name for Go struct file
--version Show application version.
Args:
[<file>] Path of JSON Schema
Output Example: ./convertor_test.go
Todo
- Add tests
- Support
anyOf
, allOf
, oneOf
- Support Multiple types