Skip to content

JsonSchema does not correspond to Serde representation #40

@hgzimmerman

Description

@hgzimmerman

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:

"0.0.0.0/0"

This can be resolved by implementing JsonSchema manually

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions