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

Ability to use expressions in a json patch #33

Merged
merged 1 commit into from
May 11, 2024

Conversation

jordipiqueselles
Copy link
Collaborator

Introducing the JsonPatchParserV2. This new json patch parser is backwards compatible with the already supported json patch operations. On top of that, it adds the ability to use expressions to generate new values on a json patch operation. For example, we can add a prefix to the pod name:

op: expr
path: .metadata.name
value: '"prefix-" ++ .metadata.name'

Introducing the JsonPatchParserV2. This new json patch parser is
backwards compatible with the already supported json patch operations.
On top of that, it adds the ability to use expressions to generate new
values on a json patch operation. For example, we can add a prefix to
the pod name:

```
op: expr
path: .metadata.name
value: '"prefix-" ++ .metadata.name'
```
@jordipiqueselles jordipiqueselles added the enhancement New feature or request label May 11, 2024
@jordipiqueselles jordipiqueselles merged commit bc26b6d into main May 11, 2024
2 checks passed
@jordipiqueselles jordipiqueselles deleted the jordi/jsonpatch-expr branch May 11, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant