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

Make Option<Struct> nullable in schema #29

Merged
merged 2 commits into from
Jan 11, 2025

Conversation

markhilb
Copy link
Contributor

@markhilb markhilb commented Jan 7, 2025

Currently Option<Struct> is just encoded as a #ref to the struct (without being nullable).

This PR makes Option<Struct> encode as a nullable allOf with the only entry being the #ref to the struct.

@kurtbuilds
Copy link
Owner

Thank you for this contribution!

I'm going to modify the logic to just change the required list, rather than changing the schema into an allOf. Creates a cleaner spec IMO. If that doesn't work for you, let me know and happy to re-open!

@kurtbuilds kurtbuilds merged commit 8bcff24 into kurtbuilds:master Jan 11, 2025
1 check passed
@kurtbuilds
Copy link
Owner

published as 0.21.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants