nickel-lang / json-schema-to-nickel

Convert JSON schemas into Nickel contracts
Apache License 2.0
29 stars 0 forks source link

Support percent-encoded URIs #78

Closed yannham closed 3 months ago

yannham commented 3 months ago

Depends on #77.

This PR makes use of a proper URI parser, in particular to correctly support JSON schema references with percent-encoded characters. This might also prove useful if we ever want to resolve distant URIs at some point. Note that the url crate doesn't support the same RFC as JSON schemas, which accepts any URI fragment. I tried to find a crate with a mix of reasonable number of downloads, maturity, and reasonably recent activity for URI parsing.

Unrelatedly, the definitions module is renamed to references to better reflect the fact that it now manages general reference resolution, and not just definitions. A bunch of warning messages are marginally improved as well.