readme: describe generation rules

This commit is contained in:
Simon Ser 2022-10-07 11:55:30 +02:00
parent 3fd30c72bc
commit 7b432ffe7f

View file

@ -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