You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix further dsl-reference.md / schema/workflow.yaml mismatches (#1161)
Follow-up to the mismatches reported in #1156:
Doc alignments (dsl-reference.md):
- Add the required `namespace` property to the Run -> Workflow Process table.
- Remove the spurious `extension` value from the extension `extend` enum
(there is no "extension" task type).
- Mark AsyncAPI `channel`/`operation` as optional; they are mutually
alternative depending on the AsyncAPI version, not both required.
- Document catch `errors.with` as the static error filter, matching the
schema and examples.
- Lowercase the Duration property names (days, hours, ...) to match the
schema keys.
- Document the `pullPolicy` enum values (ifNotPresent, always, never).
- Change `issuers` from `uri-template[]` to `string[]` to match the
schema and RFC 7519 (StringOrURI).
Script language token (js):
- Standardize the script language token on `js` (as used by the Java SDK),
replacing `javascript` in dsl-reference.md, dsl.md and the example.
Schema (schema/workflow.yaml):
- Rename the errorFilter `details` property to `detail`, matching the
`error` definition and RFC 7807.
- Require `authority` and `grant` for inline OAuth2/OIDC authentication
(oauth2AuthenticationProperties); `grant_type` is REQUIRED per RFC 6749
and neither field has a default.
Signed-off-by: Dmitriy <dimastbk@proton.me>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: dsl-reference.md
+19-15Lines changed: 19 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,14 +332,17 @@ The [AsyncAPI Call](#asyncapi-call) enables workflows to interact with external
332
332
| Name | Type | Required | Description |
333
333
|:-----|:----:|:--------:|:------------|
334
334
| document | [`externalResource`](#external-resource) | `yes` | The AsyncAPI document that defines the [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) to call. |
335
-
| channel | `string` | `yes` | The name of the channel on which to perform the operation. The operation to perform is defined by declaring either `message`, in which case the [channel](https://v2.asyncapi.com/docs/reference/specification/v2.6.0#channelItemObject)'s `publish` operation will be executed, or `subscription`, in which case the [channel](https://v2.asyncapi.com/docs/reference/specification/v2.6.0#channelItemObject)'s `subscribe` operation will be executed.<br>*Used only in case the referenced document uses AsyncAPI `v2.6.0`.* |
336
-
| operation | `string` | `yes` | A reference to the AsyncAPI [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) to call.<br>*Used only in case the referenced document uses AsyncAPI `v3.0.0`.* |
335
+
| channel | `string` | `no` | The name of the channel on which to perform the operation. The operation to perform is defined by declaring either `message`, in which case the [channel](https://v2.asyncapi.com/docs/reference/specification/v2.6.0#channelItemObject)'s `publish` operation will be executed, or `subscription`, in which case the [channel](https://v2.asyncapi.com/docs/reference/specification/v2.6.0#channelItemObject)'s `subscribe` operation will be executed.<br>*Used only in case the referenced document uses AsyncAPI `v2.6.0`.* |
336
+
| operation | `string` | `no` | A reference to the AsyncAPI [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) to call.<br>*Used only in case the referenced document uses AsyncAPI `v3.0.0`.* |
337
337
| server | [`asyncApiServer`](#asyncapi-server) | `no` | An object used to configure to the [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject) to call the specified AsyncAPI [operation](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationObject) on.<br>If not set, default to the first [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject) matching the operation's channel. |
338
338
| protocol | `string` | `no` | The [protocol](https://www.asyncapi.com/docs/reference/specification/v3.0.0#definitionsProtocol) to use to select the target [server](https://www.asyncapi.com/docs/reference/specification/v3.0.0#serverObject). <br>Ignored if `server` has been set.<br>*Supported values are: `amqp`, `amqp1`, `anypointmq`, `googlepubsub`, `http`, `ibmmq`, `jms`, `kafka`, `mercure`, `mqtt`, `mqtt5`, `nats`, `pulsar`, `redis`, `sns`, `solace`, `sqs`, `stomp` and `ws`* |
339
339
| message | [`asyncApiMessage`](#asyncapi-outbound-message) | `no` | An object used to configure the message to publish using the target operation.<br>*Required if `subscription` has not been set.* |
340
340
| subscription | [`asyncApiSubscription`](#asyncapi-subscription) | `no` | An object used to configure the subscription to messages consumed using the target operation.<br>*Required if `message` has not been set.* |
341
341
| authentication | `string`<br>[`authentication`](#authentication) | `no` | The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. |
342
342
343
+
> [!NOTE]
344
+
> Exactly one of `channel` (AsyncAPI `v2.6.0`) or `operation` (AsyncAPI `v3.0.0`) **must** be set, paired with exactly one of `message` or `subscription`.
345
+
343
346
###### Examples
344
347
345
348
```yaml
@@ -895,7 +898,7 @@ do:
895
898
- runScript:
896
899
run:
897
900
script:
898
-
language: javascript
901
+
language: js
899
902
code: >
900
903
Some cool multiline script
901
904
@@ -930,7 +933,7 @@ Enables the execution of external processes encapsulated within a containerized
930
933
| stdin | `string` | `no` | A runtime expression, if any, passed as standard input to the command or default container CMD|
931
934
| arguments | `string[]` | `no` | A list of the arguments, if any, passed as argv to the command or default container CMD |
932
935
| lifetime | [`containerLifetime`](#container-lifetime) | `no` | An object used to configure the container's lifetime. |
933
-
| pullPolicy | `string` | `no` | Policy that controls how the container's image should be pulled from the registry.Defaults to `ifNotPresent` |
936
+
| pullPolicy | `string` | `no` | Policy that controls how the container's image should be pulled from the registry.<br>*Supported values are `ifNotPresent`, `always` and `never`.*<br>*Defaults to `ifNotPresent`.* |
934
937
935
938
###### Examples
936
939
@@ -1003,7 +1006,7 @@ do:
1003
1006
- runScript:
1004
1007
run:
1005
1008
script:
1006
-
language: javascript
1009
+
language: js
1007
1010
arguments:
1008
1011
- hello
1009
1012
- world
@@ -1060,6 +1063,7 @@ Enables the invocation and execution of nested workflows within a parent workflo
1060
1063
1061
1064
| Name | Type | Required | Description |
1062
1065
|:--|:---:|:---:|:---|
1066
+
| namespace | `string` | `yes` | The namespace the workflow to run belongs to. |
1063
1067
| name | `string` | `yes` | The name of the workflow to run |
1064
1068
| version | `string` | `yes` | The version of the workflow to run. Defaults to `latest` |
1065
1069
| input | `any` | `no` | The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified |
@@ -1245,7 +1249,7 @@ Defines the configuration of a catch clause, which a concept used to catch error
1245
1249
1246
1250
| Name | Type | Required | Description |
1247
1251
|:--|:---:|:---:|:---|
1248
-
| errors | [`errorFilter`](#error) | `no` | The definition of the errors to catch. |
1252
+
| errors.with | [`errorFilter`](#error) | `no` | A static filter, used to catch only the errors whose properties match the specified values. |
1249
1253
| as | `string` | `no` | The name of the runtime expression variable to save the error as. Defaults to 'error'. |
1250
1254
| when | `string`| `no` | A runtime expression used to determine whether or not to catch the filtered error. |
1251
1255
| exceptWhen | `string` | `no` | A runtime expression used to determine whether or not to catch the filtered error. |
@@ -1857,7 +1861,7 @@ Defines the fundamentals of an 'oauth2' authentication.
1857
1861
| client.assertion | `string` | `no` | A JWT containing a signed assertion with your application credentials.<br>Required when `client.authentication` has been set to `private_key_jwt`. |
1858
1862
| client.authentication | `string` | `no` | The client authentication method to use.<br>Supported values are `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt` or `none`.<br>Defaults to `client_secret_post`. |
1859
1863
| request.encoding | `string` | `no` | The encoding of the token request.<br>Supported values are `application/x-www-form-urlencoded` and `application/json`.<br>Defaults to application/x-www-form-urlencoded. |
1860
-
| issuers | `uri-template[]` | `no` | A list that contains that contains valid issuers that will be used to check against the issuer of generated tokens. |
1864
+
| issuers | `string[]` | `no` | A list that contains valid issuers that will be used to check against the issuer of generated tokens. |
1861
1865
| scopes | `string[]` | `no` | The scopes, if any, to request the token for. |
1862
1866
| audiences | `string[]` | `no` | The audiences, if any, to request the token for. |
1863
1867
| username | `string` | `no` | The username to use. Used only if the grant type is `Password`. |
@@ -1919,7 +1923,7 @@ Defines the fundamentals of an 'oidc' authentication.
1919
1923
| client.assertion | `string` | `no` | A JWT containing a signed assertion with your application credentials.<br>Required when `client.authentication` has been set to `private_key_jwt`. |
1920
1924
| client.authentication | `string` | `no` | The client authentication method to use.<br>Supported values are `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt` or `none`.<br>Defaults to `client_secret_post`. |
1921
1925
| request.encoding | `string` | `no` | The encoding of the token request.<br>Supported values are `application/x-www-form-urlencoded` and `application/json`.<br>Defaults to application/x-www-form-urlencoded. |
1922
-
| issuers | `uri-template[]` | `no` | A list that contains that contains valid issuers that will be used to check against the issuer of generated tokens. |
1926
+
| issuers | `string[]` | `no` | A list that contains valid issuers that will be used to check against the issuer of generated tokens. |
1923
1927
| scopes | `string[]` | `no` | The scopes, if any, to request the token for. |
1924
1928
| audiences | `string[]` | `no` | The audiences, if any, to request the token for. |
1925
1929
| username | `string` | `no` | The username to use. Used only if the grant type is `Password`. |
@@ -2001,7 +2005,7 @@ Extensions enable the execution of tasks prior to those they extend, offering th
2001
2005
2002
2006
| Property | Type | Required | Description |
2003
2007
|----------|:----:|:--------:|-------------|
2004
-
| extend | `string` | `yes` | The type of task to extend<br>Supported values are: `call`, `composite`, `emit`, `extension`, `for`, `listen`, `raise`, `run`, `set`, `switch`, `try`, `wait` and `all` |
2008
+
| extend | `string` | `yes` | The type of task to extend<br>Supported values are: `call`, `composite`, `emit`, `for`, `listen`, `raise`, `run`, `set`, `switch`, `try`, `wait` and `all` |
2005
2009
| when | `string` | `no` | A runtime expression used to determine whether or not the extension should apply in the specified context |
2006
2010
| before | [`task[]`](#task) | `no` | The list of tasks to execute, if any, before the extended task |
2007
2011
| after | [`task[]`](#task) | `no` | The list of tasks to execute, if any, after the extended task |
@@ -2384,11 +2388,11 @@ Defines a duration. Durations can be defined through properties, with an ISO 860
2384
2388
2385
2389
| Property | Type | Required | Description |
2386
2390
|----------|:----:|:--------:|-------------|
2387
-
| Days | `integer` | `no` | Number of days, if any. |
2388
-
| Hours | `integer` | `no` | Number of hours, if any. |
2389
-
| Minutes | `integer` | `no`| Number of minutes, if any. |
2390
-
| Seconds | `integer` | `no`| Number of seconds, if any. |
2391
-
| Milliseconds | `integer` | `no`| Number of milliseconds, if any. |
2391
+
| days | `integer` | `no` | Number of days, if any. |
2392
+
| hours | `integer` | `no` | Number of hours, if any. |
2393
+
| minutes | `integer` | `no`| Number of minutes, if any. |
2394
+
| seconds | `integer` | `no`| Number of seconds, if any. |
2395
+
| milliseconds | `integer` | `no`| Number of milliseconds, if any. |
0 commit comments