Skip to content

disableRequiredPropertiesCheck support for primitives #984

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

Merged
merged 4 commits into from
Apr 3, 2025

Conversation

l-trotta
Copy link
Contributor

@l-trotta l-trotta commented Apr 3, 2025

Fixes #655 by adding a new requireNonNullWithDefault method to ApiHelper, which is only applied to standard fields (meaning not unions/containers) and returns the default value of a field instead of null if ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck is enabled.

@l-trotta l-trotta requested a review from swallez April 3, 2025 11:10
Copy link
Member

@swallez swallez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@l-trotta
Copy link
Contributor Author

l-trotta commented Apr 3, 2025

no backporting, will backport manually and regenerate the code

@l-trotta l-trotta merged commit afc3d31 into main Apr 3, 2025
9 checks passed
@l-trotta l-trotta deleted the support-dangerous-primitive-ignore branch April 3, 2025 14:02
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.

Improve DANGEROUS_disableRequiredPropertiesCheck so that it works with primitive types
2 participants