add required regex attribute for extractors to Transformation doc
@@ -189,12 +189,14 @@ An extraction must have one of two sources:
extractors:
myExtractor:
header: 'foo'
+ regex: '.*'
```
- `body`: extract information from the body. This attribute takes an empty value (as there is always only one body).
```yaml
extractors:
myExtractor:
body: {}
+ regex: '.*'
```
{{% notice note %}}
@@ -205,6 +207,10 @@ Extracting the body is generally not useful when Gloo Edge has already parsed it
An extraction must also define which information is to be extracted from the source. This can be done by providing a regular expression via the `regex` attribute. The regular expression will be applied to the body or to the value of relevant header. If your regular expression uses _capturing groups_, you can select the group match you want to use via the `subgroup` attribute.
+{{% notice note %}}
+The `regex` attribute is required when specifying an extraction. Even if a `regex` attribute is not required to capture a subset of the source information, you must still specify a catch-all pattern like `regex: '.*'`. If no `regex` is specified, the extractor will silently fail.
+{{% /notice %}}
+
As an example, to define an extraction named `foo` which will contain the value of the `foo` query parameter you can apply the following configuration:
```yaml
