Commit graph

11 commits

Author SHA1 Message Date
Simon Ser
49d4519492 Use json.RawMessage instead of interface{}
This allows the user to perform custom logic to decide how to
decode the JSON.
2022-10-07 11:29:04 +02:00
Simon Ser
7ffb8e8292 Sort struct fields by name 2022-10-07 09:21:00 +02:00
Simon Ser
9d15ffaa5c Sort definitions by name 2022-10-07 09:19:34 +02:00
Simon Ser
1a70f56123 Don't generate type for root if it's a ref 2022-10-07 09:16:38 +02:00
Simon Ser
c7b65e3ab4 Improve formatId() robustness 2022-10-07 09:15:43 +02:00
Simon Ser
4677a978a1 Add pointer if struct is optional 2022-10-06 19:39:34 +02:00
Simon Ser
e1d654c3ba Add "omitempty" to json struct tag if optional 2022-10-06 19:15:48 +02:00
Simon Ser
a640ba04bc Generate types for all $defs 2022-10-06 19:09:57 +02:00
Simon Ser
0b18cdd7be Handle patternProperties with a single element 2022-10-06 19:05:51 +02:00
Simon Ser
5e9f28cc05 Handle non-extensible nested objects 2022-10-06 16:13:46 +02:00
Simon Ser
dde5b75d7a Initial commit 2022-10-06 09:26:45 +02:00