This corrects the JsonSchema impl for Ipv4Network, Ipv6Network, and IpNetwork. It uses the does-it-json crate to validate that the schemas and serialization match. There's a little bit of extra niceness in the schemas:
They specify the x-rust-type extension so that code generators can substitute in the ipnetwork::*
IpNetwork includes labels for the two oneOf schema variants in order to let code generators produce nicer code
Neither of these is strictly necessary. I can remove them if desired, but I think they add an extra degree of polish
Fixes #156
This corrects the
JsonSchema
impl forIpv4Network
,Ipv6Network
, andIpNetwork
. It uses thedoes-it-json
crate to validate that the schemas and serialization match. There's a little bit of extra niceness in the schemas:x-rust-type
extension so that code generators can substitute in theipnetwork::*
IpNetwork
includes labels for the twooneOf
schema variants in order to let code generators produce nicer codeNeither of these is strictly necessary. I can remove them if desired, but I think they add an extra degree of polish