Currently, the JsonSchema trait is derived instead of manually implemented to match the parser for IpNet, IpV4Net, and IpV6Net.
This causes it to generate a schema object that indicates that for IpV4Net, the serde deserializer expects a JSON object like:
{
"addr": "0.0.0.0",
"prefix_len": 0
}
when in reality, the deserializer expects, and serializer produces:
This can be resolved by implementing JsonSchema manually
Currently, the
JsonSchematrait 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:{ "addr": "0.0.0.0", "prefix_len": 0 }when in reality, the deserializer expects, and serializer produces:
"0.0.0.0/0"This can be resolved by implementing
JsonSchemamanually