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

Expand ignore_empty into ignore to handle other semantics #137

Merged
merged 6 commits into from
Dec 4, 2023

Conversation

rodaine
Copy link
Member

@rodaine rodaine commented Nov 30, 2023

With #124 et al, ignore_empty semantics have been made consistent with required, but it's still limiting (and confusing) in situations where skipping validation rules is still desired when a field is either unpopulated or set to the default value (for instance, within an update request that allows conditionally updating a field on a resource that is itself a nullable field).

This patch deprecates ignore_empty, expanding into ignore which is now an enum that supports the original semantics, as well as this expanded~looser definition. ignore_empty will be removed from the proto with a v1 release.

Conformance + examples will be added after this is released (due to the two-phased managed module)

@rodaine rodaine requested review from emcfarlane and bufdev November 30, 2023 20:09
@rodaine rodaine merged commit 474108b into main Dec 4, 2023
2 checks passed
@rodaine rodaine deleted the rodaine/ignore-expansion branch December 4, 2023 19:18
rodaine added a commit that referenced this pull request Feb 16, 2024
Follow up to #137 to add matching (exhaustive) conformance tests.
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