Skip to content

Commit 9a91579

Browse files
committed
MQE-1729: Added document for PR #377
1 parent 167c7e7 commit 9a91579

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/metadata.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This directory contains XML files with metadata required to create a valid reque
2525
A metadata file contains a list of operations with different types (defined in `type`).
2626
Each [operation] includes:
2727

28-
- The set of adjustments for processing a request in [attributes][operation], and in some cases, a response (see `successRegex` and `returnRegex` in [reference details][operation]).
28+
- The set of adjustments for processing a request in [attributes][operation], and in some cases, a response (see `successRegex`, `returnRegex` and `returnIndex` in [reference details][operation]).
2929
- The type of body content encoding in [contentType].
3030
- The body of the request represented as a tree of objects, arrays, and fields.
3131

@@ -336,7 +336,7 @@ There are two different attributes to split access to different areas:
336336
- `auth="adminFormKey"` is used for objects in an Admin area.
337337
- `auth="customerFormKey"` is used for objects in a storefront.
338338

339-
You are able to create assurances with `successRegex`, and even return values with `returnRegex`.
339+
You are able to create assurances with `successRegex`, and even optionally return values with `returnRegex`. You can also use `returnIndex` when `returnRegex` matches multiple values.
340340

341341
### Create an object in Admin {#create-object-as-adminFormKey}
342342

@@ -418,6 +418,7 @@ Root element that points to the corresponding XML Schema.
418418
| `method` | string | optional | HTTP method of the operation. Possible values: `POST`, `DELETE`, `PUT`, `GET`. |
419419
| `successRegex` | string | optional | Determines if the operation was successful. Parses the HTML body in response and asserts if the value assigned to the `successRegex` exists. |
420420
| `returnRegex` | string | optional | Determines if the response contains the matching value to return. |
421+
| `returnIndex` | string | optional | Specifies index at which the value will be returned when `returnRegex` matches multiple values |
421422
| `removeBackend` | boolean | optional | Removes backend name from requested URL. Applicable when `auth="adminFormKey"`. |
422423
| `filename` | string | optional | |
423424

0 commit comments

Comments
 (0)