-
Notifications
You must be signed in to change notification settings - Fork 26
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
JsonSchema does not correspond to Serde representation #40
Comments
Hi @hgzimmerman - thanks. Yeah I figured this would be needed hence asking in the original PR #31 if the default output was actually satisfactory. Since @smklein was the original requestor for this with the use case at his employer Oxide I wonder if he could weigh in here on whether this change will work for him or not? CC @ralpha and @xfbs in case they have opinions too. Thanks |
That change works for us - the |
Thanks @hgzimmerman and @smklein I've merged and published these fixes. |
Thanks! |
Currently, the
JsonSchema
trait is derived instead of manually implemented to match the parser forIpNet
,IpV4Net
, andIpV6Net
.This causes it to generate a schema object that indicates that for
IpV4Net
, the serde deserializer expects a JSON object like:when in reality, the deserializer expects, and serializer produces:
"0.0.0.0/0"
This can be resolved by implementing
JsonSchema
manuallyThe text was updated successfully, but these errors were encountered: