readme: describe generation rules
This commit is contained in:
parent
3fd30c72bc
commit
7b432ffe7f
1 changed files with 8 additions and 0 deletions
|
@ -6,6 +6,14 @@ A JSON schema code generator for Go.
|
||||||
|
|
||||||
jsonschemagen -s <schema> -o <output>
|
jsonschemagen -s <schema> -o <output>
|
||||||
|
|
||||||
|
One Go type per definition will be generated.
|
||||||
|
|
||||||
|
- `int64` is used for `"type": "integer"`.
|
||||||
|
- `json.Number` is used for `"type": "number"`.
|
||||||
|
- Go structs are generated for objects with `"additionalProperties": false`.
|
||||||
|
- `json.RawMessage` is used when a value can have multiple types. Helpers are
|
||||||
|
generated for `allOf`, `anyOf`, `oneOf` which are references.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
|
Loading…
Reference in a new issue