-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
♻️ Improved jsonschema exporter #432
♻️ Improved jsonschema exporter #432
Conversation
c7e187b
to
71757b9
Compare
MoM:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, but I am also not using jsonschema currently so it does not break anything for me :)
Do we need backwards compatibility here? (I don't)
MoM:
|
target_type = type_map[datatype] | ||
target_type = type_map[datatype] | ||
ref["type"] = target_type[0] | ||
if len(target_type) > 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of today we expect "len" to be either 1 or 3, right? I.e. never anything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now it only will be 1 or 3. Yeah. Thought about specifying at least the lower boundary for uint64. Then we would have 2 :)
Nope, old ones were not including array restrictions and the new one is. So it will definitely break |
Signed-off-by: Sebastian Schleemilch <[email protected]>
71757b9
to
9a85ec8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Improved the jsonschema exporter
Added typed arrays using
items
Before:
Now:
Added support for custom types a.k.a
structs
:Including
minimum
andmaximum
automatically for types to express their max mins (only until uint/int64 exclusive)Fixed support for
numeric
Added
min
andmax
are in the range of the datatype