Skip to content

disableRequiredPropertiesCheck support for primitives - #984

Merged
l-trotta merged 4 commits into
mainfrom
support-dangerous-primitive-ignore
Apr 3, 2025
Merged

disableRequiredPropertiesCheck support for primitives#984
l-trotta merged 4 commits into
mainfrom
support-dangerous-primitive-ignore

Conversation

@l-trotta

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

Copy link
Copy Markdown
Contributor

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

@swallez swallez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@l-trotta

l-trotta commented Apr 3, 2025

Copy link
Copy Markdown
Contributor Author

no backporting, will backport manually and regenerate the code

@l-trotta
l-trotta merged commit afc3d31 into main Apr 3, 2025
@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