Closed swlynch99 closed 6 months ago
The CI errors all seem to be related to the #[warn(unused_qualifications)]
lint in Cargo.toml
. That doesn't seem related to this PR and when I went to fix them the suggestions from cargo clippy --fix
seemed like they would be invalid under #[no_std]
. I'll leave this one up to you to fix and/or disable the lints and then rebase once that is done.
Attention: Patch coverage is 75.64103%
with 19 lines
in your changes are missing coverage. Please review.
Project coverage is 66.04%. Comparing base (
4c05768
) to head (a804257
). Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
serde_with/src/schemars_0_8.rs | 75.64% | 19 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thank you, this looks good. Your comments are good, explain what is going on, and I could follow them. Thanks for getting this to work :)
I'm back with yet another PR! This time we're doing
KeyValueMap
.I think this one is probably the most complicated conversion that needs to be done to make the schema work. We need to convert a schema that looks like this
into this
On its own that is not to bad but it gets more complicated since we also have to deal subschemas which can be generated from types that make use of
#[serde(untagged)]
and#[serde(flatten)]
. See the doc comment onkvmap_transform_schema
for more details.Notes
anyOf
subschema that makes use ofminProperties
andmaxProperties
(normal ones where they have a$key$
field should work fine). I'm not entirely sure there is one correct behaviour in the case either but to me this seems like a edge case that is pretty far out there so it should be fine.$key$
property ends up being defined in some external schema (i.e.$ref
points to some random document on the internet). This seems like an edge case and I don't think there's any reasonable behaviour here anyway.