Conversation
838ab6b to
2ebd455
Compare
| // | ||
| // +kubebuilder:default=true | ||
| // +optional | ||
| ExpandList bool `json:"expandList,omitempty"` |
There was a problem hiding this comment.
So in this case... the json serializer will omit it if its false, which will then set it to true if you re-read?
There was a problem hiding this comment.
Well caught :-D
thanks!
There was a problem hiding this comment.
I see.. you brought this up before, its tricky this ay.. if you create a minimal gitopsset via golang and don't specify ExpandList, then you'll create it in a non-default state, vs. creating it via applying a yaml without specifying ExpandList? Its not a huge deal you just have to be a bit careful occasionally.
Any nice antonyms?
disableListExpansioncollapseListtreatListAsSingleEntitylistAsSingleEntitysingleIteration
There was a problem hiding this comment.
And its nice to have familiar names to other projects like kluctl
1fa72ac to
3bc4f97
Compare
| // | ||
| // +kubebuilder:default=true | ||
| // +optional | ||
| SingleElement bool `json:"singleElement"` |
There was a problem hiding this comment.
default: false + omitempty now I guess?
This allows the apiClient generator to optionally generate a single element with the entire body of the response. Combined with the repeat functionality, this allows for a set of resources to be generated from any response.
3bc4f97 to
8424fac
Compare
This allows the apiClient generator to optionally generate a single element with the entire body of the response.
Combined with the repeat functionality, this allows for a set of resources to be generated from any response.