-
Notifications
You must be signed in to change notification settings - Fork 0
Built in predicates
Here you can find all Predicates defined as part of the standard package.
Predicates have a single purpose of evaluating input values and returning boolean values. This might or might not need any additional configuration as you will see form our examples.
Each predicate has a version when it was added to the app, a class implementing them, a name they are registered with, an input type, a parameter list defining how they can be configured, a description stating what they are supposed to do, and we will show an example configuration as well.
Name: anyString
Class: AnyStringPredicate
Since version: 1.0.0
Input type: String
Parameters: none
Description
This predicate returns true for any String.
Example configuration
name: "replace"
path: "$.accounts..lastName"
params:
stringFunction:
name: "regex"
pattern: (?<firstName>[A-Za-z\-]+) (?<lastName>[A-Za-z\-]+)
replacement: "${lastName}"
predicate: # this is the node defining our predicate
name: "anyString"
This example will match any String, essentially including all String nodes the JsonPath of our rule matches.