-
Notifications
You must be signed in to change notification settings - Fork 23
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 and Remove operators should support an array of things to add or remove #469
Comments
I agree with this idea for The To clarify my expectations, the following should be allowed: type: remove
field: myfield1 type: remove
field:
- myfield1
- myfield2 |
Yes, I've been thinking about how to format the add for an array, and I could only come up with 2 solutions. Solution 1:
Essentially allowing field to appear multiple times. Solution 2:
Such that key1-value1 are paired together, and so on. |
Unfortunately, I don't think solution 1 is possible due to the nature of yaml and the map structure it represents. Solution 2 is generally considered an antipattern, as it requires the user to make implicit connections between values. As soon as there are more than a handful of values, it becomes very difficult to understand what is happening. |
Yeah, I should have added neither is a good solution. Just the only 2 that come to mind. Which is unfortunate, but it is what it is. Remove really is the important one here anyway. At least for my use case. We used |
Is your feature request related to a problem? Please describe.
Currently I have to specify multiple removes, with defined IDs, in order to remove 3 fields that I combined into a single field.
Describe the solution you'd like
Allow an array to be passed, such as we do with other operators, of fields to add or remove
Describe alternatives you've considered
Currently using multiple entries for remove. Each requires an ID in order to be unique.
The text was updated successfully, but these errors were encountered: