Closed hgzimmerman closed 2 years ago
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 0.0.0.0/0
format actually matches our hand-rolled implementation more closely than the derived version!
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 forIpV4Net
, the serde deserializer expects a JSON object like:when in reality, the deserializer expects, and serializer produces:
This can be resolved by implementing
JsonSchema
manually