achanda / ipnetwork

A library to work with CIDRs in rust
Apache License 2.0
121 stars 38 forks source link

Correct and validate JsonSchema for Ipv4Network, Ipv6Network, and IpNetwork #157

Closed ahl closed 2 years ago

ahl commented 2 years ago

Fixes #156

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:

Neither of these is strictly necessary. I can remove them if desired, but I think they add an extra degree of polish

achanda commented 2 years ago

Looks great to me, thanks @ahl 🙏