Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from jonasbb:master #68

Merged
merged 27 commits into from
Aug 14, 2024
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented May 23, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 62.50000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 67.11%. Comparing base (72910bb) to head (729e8d2).

Files Patch % Lines
serde_with/src/chrono_0_4.rs 45.45% 6 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #68   +/-   ##
=======================================
  Coverage   67.11%   67.11%           
=======================================
  Files          38       38           
  Lines        2448     2442    -6     
=======================================
- Hits         1643     1639    -4     
+ Misses        805      803    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pull pull bot added the ⤵️ pull label May 24, 2024
jonasbb and others added 20 commits June 8, 2024 13:02
Currently, there is an `impl JsonSchema for WrapSchema<OneOrMany<...>>`.
This works fine if you only directly need `OneOrMany` but causes errors
if you want to nest it (e.g. `Option<OneOrMany<_>>`).

This PR changes the impl to a `JsonSchemaAs` impl, which is the correct
approach. I think I just missed these ones during a rebase. In any case,
the change should be fully backwards compatible due to the blanket
schema impl.

I have added a snapshot test. The actual snapshot doesn't matter - the
real test is that the struct below compiles

    #[serde_as]
    #[derive(Serialize, Deserialize, JsonSchema)]
    struct Test {
	#[serde_as(as = "Option<OneOrMany<_>>")]
	optional_vec: Option<Vec<String>>,
    }
Co-authored-by: Jonas Bushart <jonas@bushart.org>
@pull pull bot merged commit c3e489f into transparencies:master Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants