Closed ajonkisz closed 3 years ago
I just noticed that this is in accordance with https://tools.ietf.org/html/rfc6902#appendix-A.16 and https://tools.ietf.org/html/rfc6902#section-4.1, but I'm hoping maybe it can be extended by assing something like op: addToArray
or svalueArray
?
We are using external library for JSON patch (github.com/evanphx/json-patch). Unfortunately we cannot extend its syntax.
Describe the bug
Adding multiple array elements to an array using
patchesJson6902
andop: add
does not behave as expected.Files that can reproduce the issue Example:
kustomization.yaml
resources:
Expected output
Actual output
Kustomize version
Tested on v3.8.7 as well as v4.0.5
Platform
Both Linux and Windows have been tested
Additional Notes Specifying multiple add operations in the patch as:
Works as expected, but this is rather cumbersome and shouldn't be necessary if the type can be detected the type we're adding to is an array.