Expansion
Introduction
Property expansion is the process of replacing a value, or a part of a value, with the result of an expression.
The actual expression is a tag containing a (dot-separated) path to a named property.
Expansion expressions are written in the following format:
"${path.to.property}"Syntax
An expansion expression MUST:
be in string format (
"...")start with
${end with
}contain only a (dot-separated) path to a property located in an available scope (depends on context).
{
"property": "${scope.path.to.property}",
}Expansion expression MAY:
be embedded in a string
be combined
Objects
Objects can contain values, lists and objects named by keys.
Segments in paths/keys separated by . traverse nested properties in objects:
Use \. to include a literal dot in a key name, rather than traversing a nested property:
For keys that contain dots, spaces, or other special characters bracket notation can be used:
Lists
Lists can contain values, objects and lists.
Elements in lists are accessed using bracket or index-property notation:
List elements are accessed by zero-based index:
Special keywords that can be used with lists:
Misc
Dot and bracket notation can be freely combined:
Scopes and types
Scopes are the named top level objects containing expansion data (for example request or session). Available scopes depends on the context.
Data in scopes are accessed different depending on the type of objects included in the path. An expansion path can contain the following types of objects:
primitive types ("values", ie string, number, etc)
objects
arrays
A primitive type is always a leaf (last element of an expansion path) and can only contain a value, not other primitives, object or arrays.
Objects can contain other objects, primitives and arrays. When objects are nested, we traverse them using a dot-separated path containing the
Arrays are list of primitives, objects or arrays. Elements in an array are referenced using bracket or index property notation, where the first element has index 0.
Last updated