Skip to content

Commit 38198c9

Browse files
committed
feat: adds string literal replacement syntax
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
1 parent 67a2933 commit 38198c9

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

versions/1.2.0-dev.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,33 @@ The properties of the `update` or `copy` object MUST be compatible with the targ
157157

158158
This object MAY be extended with [Specification Extensions](#specification-extensions).
159159

160+
### String literal replacement syntax
161+
162+
The following string replacement syntax MAY be used:
163+
164+
%source.key%
165+
166+
Where **source** is a known source which value MUST ONLY be **env** for environment variables, or **param** for parameters. The key MUST only contain the following characters A-Za-z0-9, contain at least one character and start with a letter.
167+
168+
#### ABNF notation
169+
170+
```abnf
171+
replacement-string = "%" source "." key "%"
172+
source = "env" / "param"
173+
key = ALPHA *( ALPHA / DIGIT )
174+
```
175+
176+
Where ALPHA and digit rules are defined in [[RFC5234]].
177+
178+
#### Environment replacement source
179+
180+
When the environment replacement source is used, the key MUST match (case-insensitive) an environment variable defined for the process parsing the Overlay document. If the environment variable is not defined, the processor MAY either replace it with an empty string or return an error.
181+
182+
#### Parameter replacement source
183+
184+
When the parameter replacement source is used, the key MUST match (case-sensitive) a corresponding parameter defined for the action template.
185+
186+
160187
### Examples
161188

162189
#### Structured Overlay Example

0 commit comments

Comments
 (0)