References
Template references#
Resources could contain references to other resources.
These references are defined inside templates.
A template inside a property is initialized with two curly brackets {{ }}.
All references consist out of two parts.
The resource you want to reference, and the property path {{ <resource>:<path> }}.
Paths reference a property within the resource.
Paths could target single properties or entire objects.
Resource properties#
A template reference consist out of the following parts: <resource>:<path>.
Some resources consist out of multiple resource properties.
The default resource property is used when no resource property is given.
The following resource properties are available for the variouse resources:
- Input
- Error
- Resource
| Parameter | Template | Note |
|---|---|---|
| request | {{ input.request:path }} | default |
| header | {{ input.header:path }} |
| Parameter | Template | Note |
|---|---|---|
| response | {{ error.response:path }} | default |
| params | {{ error.params:path }} |
| Parameter | Template | Note |
|---|---|---|
| request | {{ resource.request:path }} | |
| response | {{ resource.response:path }} | default |
| header | {{ resource.header:path }} | |
| error | {{ resource.error:path }} | only self references |
Properties in action#
Resource dependencies#
References automatically define dependencies across resources.
Sometimes do resources depend on one another without a direct reference.
Dependencies could manually be created through the depends_on property.