Closed swlynch99 closed 7 months ago
Attention: Patch coverage is 83.33333%
with 4 lines
in your changes are missing coverage. Please review.
Project coverage is 66.21%. Comparing base (
bb2ab60
) to head (5e36083
). Report is 5 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
serde_with/src/schemars_0_8.rs | 83.33% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
That looks great :) Thank you.
I published your new JsonSchemaAs
implementations and fix for the serde_as
macro in v3.7.0
Here's the next type. This one implements
JsonSchemaAs
forOneOrMany
. It is fortunately much simpler thanKeyValueMap
.For
OneOrMany
the transformation we want to do is basically to take this schemaand transform it into
that is, we change it so it can take either an array or a single value. The only difference between the
PreferOne
and thePreferMany
variants is that the inner object is marked aswriteOnly: true
.I have also included some tests that should cover pretty much everything.