feat(json): Removing Last VMClass/Contentlibrary from Namespaces VMServiceSpec using vapi #4012
Open
tribock wants to merge 2 commits into
Open
feat(json): Removing Last VMClass/Contentlibrary from Namespaces VMServiceSpec using vapi #4012tribock wants to merge 2 commits into
tribock wants to merge 2 commits into
Conversation
… it always rendered Signed-off-by: tribock <louis.baumann93@gmail.com> Signed-off-by: tribock <louis.baumann@soultec.ch>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR removes the omitempty JSON tag from the namespace field in the request/response model.
The field must always be serialized so the API receives it explicitly.
With omitempty present, zero-value data could be dropped from the payload, which can cause validation or behavior mismatches on the vSphere API side.
Closes: #4010
What changed
Removed omitempty from the target struct tag in the namespace model.
No behavioral logic changes, only JSON serialization behavior.
Impact
Requests now always include the field, even when empty/zero-valued.
Improves API compatibility where explicit presence is required.
Low risk change, scoped to marshaling output only.
How Has This Been Tested?
Temporary edit on upateFunc to print rendered request:
Output