Skip to content

Commit

Permalink
Remove mutual exclusivity constraint between payload and pointers
Browse files Browse the repository at this point in the history
…. Rename to `replacements` (#183)

* Remove mutual exclusivity constraint between `payload` and `pointers`. Rename to `replacements`

* chore: update payload description

Co-authored-by: Adam Altman <[email protected]>

---------

Co-authored-by: Adam Altman <[email protected]>
  • Loading branch information
frankkilcommins and adamaltman authored May 8, 2024
1 parent 78aa694 commit 0c12c6f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions versions/1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ The Workflows Specification can articulate these workflows in a human-readable a
- [Request Body Object](#request-body-object)
- [Fixed Fields](#fixed-fields-12)
- [Request Body Object Example](#requestbody-object-example)
- [Payload Pointer Object](#payload-pointer-object)
- [Payload Replacement Object](#payload-replacement-object)
- [Fixed Fields](#fixed-fields-13)
- [Payload Pointer Object Example](#payload-pointer-object-example)
- [Payload Replacement Object Example](#payload-replacement-object-example)
- [Runtime Expressions](#runtime-expressions)
- [Specification Extensions](#specification-extensions)
- [Security Considerations](#security-considerations)
Expand Down Expand Up @@ -769,8 +769,9 @@ A single request body describing the `Content-Type` and request body content to
Field Name | Type | Description
---|:---:|---
<a name="requestBodyContentType"></a>contentType | `string` | The Content-Type for the request content. If omitted then refer to Content-Type specified at the targeted operation to understand serialization requirements.
<a name="requestBodyPayload"></a>payload | Any | A value representing the request body payload. The value can be a literal value or can contain [Runtime Expressions](#runtime-expressions) which MUST be evaluated prior to calling the referenced operation. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. This field is mutually exclusive to `pointers`.
<a name="requestBodyPointers"></a>pointers | [[Payload Pointer Object](#payload-pointer-object)] | A list of locations and values to set within a payload. This field is mutually exclusive to `payload`.
<a name="requestBodyPayload"></a>payload | Any | A value representing the request body payload. The value can be a literal value or can contain [Runtime Expressions](#runtime-expressions) which MUST be evaluated prior to calling the referenced operation. To represent examples of media types that cannot be naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary.

<a name="requestBodyReplacements"></a>replacements | [[Payload Replacement Object](#payload-replacement-object)] | A list of locations and values to set within a payload.

This object MAY be extended with [Specification Extensions](#specificationExtensions).

Expand Down Expand Up @@ -839,18 +840,18 @@ This object MAY be extended with [Specification Extensions](#specificationExtens
payload: "client_id={$inputs.clientId}&grant_type={$inputs.grantType}&redirect_uri={$inputs.redirectUri}&client_secret={$inputs.clientSecret}&code{$steps.browser-authorize.outputs.code}&scope=$inputs.scope}"
```

#### Payload Pointer Object
Described a target location within a payload (e.g., a request body) and a value to set within the target location.
#### Payload Replacement Object
Describes a location within a payload (e.g., a request body) and a value to set within the location.

##### Fixed Fields
Field Name | Type | Description
---|:---:|---
<a name="payloadPointerTarget"></a>target | `string` | **REQUIRED**. A [JSON Pointer](https://tools.ietf.org/html/rfc6901) or [XPath Expression](https://www.w3.org/TR/xpath-31/#id-expressions) which MUST be resolved against the request body. Used to identify the location to inject the `value`.
<a name="payloadPointerValue"></a> value | Any \| {expression} | **REQUIRED**. The value set within the target location. The value can be a constant or a [Runtime Expression](#runtime-expressions) to be evaluated and passed to the referenced operation or workflow.
<a name="payloadReplacementTarget"></a>target | `string` | **REQUIRED**. A [JSON Pointer](https://tools.ietf.org/html/rfc6901) or [XPath Expression](https://www.w3.org/TR/xpath-31/#id-expressions) which MUST be resolved against the request body. Used to identify the location to inject the `value`.
<a name="payloadReplacementValue"></a> value | Any \| {expression} | **REQUIRED**. The value set within the target location. The value can be a constant or a [Runtime Expression](#runtime-expressions) to be evaluated and passed to the referenced operation or workflow.

This object MAY be extended with [Specification Extensions](#specificationExtensions).

##### Payload Pointer Object Example
##### Payload Replacement Object Example

**Runtime Expression Example**
```yaml
Expand Down

0 comments on commit 0c12c6f

Please sign in to comment.