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

Add OmitIfEmpty option in metadata library #1238

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Add OmitIfEmpty option in metadata library #1238

merged 1 commit into from
Jun 26, 2024

Conversation

annakhm
Copy link
Collaborator

@annakhm annakhm commented Jun 25, 2024

NSX would not accept empty value for some attributes. For those, the attribute should be omitted in request. This PR add such support this behavior when flag is specified in metadata.

NSX would not accept empty value for some attributes. For those, the attribute
should  be omitted in request. This PR add such support this behavior when flag
is specified in metadata.

Signed-off-by: Anna Khmelnitsky <[email protected]>
@wsquan171
Copy link
Contributor

I guess this only applies to strings? And from stuct to schema this will be automatically bypassed since the stuct would have a nil value?

@annakhm
Copy link
Collaborator Author

annakhm commented Jun 25, 2024

I guess this only applies to strings? And from stuct to schema this will be automatically bypassed since the stuct would have a nil value?

Correct, I don't think this can be relevant to numbers and bools

@annakhm annakhm merged commit af29c99 into master Jun 26, 2024
3 checks passed
@annakhm annakhm deleted the omit-empty branch August 7, 2024 20:37
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.

3 participants