Skip to content

Commit 2f5b21a

Browse files
authored
Merge branch 'v1.1-dev' into dev
2 parents 39364e4 + 1a79fe6 commit 2f5b21a

9 files changed

Lines changed: 551 additions & 102 deletions

examples/1.0.0/bnpl-arazzo.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ workflows:
167167
contentType: application/json
168168
payload: |
169169
{
170-
"firstName": "{$inputs.customer.firstName}",
171-
"lastName": "{$inputs.customer.lastName}",
172-
"dateOfBirth": "{$inputs.customer.dateOfBirth}",
173-
"postalCode": "{$inputs.customer.postalCode}"
170+
"firstName": "{$inputs.customer#/firstName}",
171+
"lastName": "{$inputs.customer#/lastName}",
172+
"dateOfBirth": "{$inputs.customer#/dateOfBirth}",
173+
"postalCode": "{$inputs.customer#/postalCode}",
174174
"termsAndConditionsAccepted": true
175175
}
176176
successCriteria:
@@ -194,7 +194,7 @@ workflows:
194194
contentType: application/json
195195
payload: |
196196
{
197-
"enrolledCustomer": "{$inputs.customer.uri}",
197+
"enrolledCustomer": "{$inputs.customer#/uri}",
198198
"newCustomer": "{$steps.createCustomer.outputs.customer}",
199199
"products": "{$steps.checkLoanCanBeProvided.outputs.eligibleProducts}"
200200
}

src/arazzo.md

Lines changed: 444 additions & 88 deletions
Large diffs are not rendered by default.

src/schemas/validation/schema.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ properties:
88
description: The version number of the Arazzo Specification
99
type: string
1010
pattern: '^1\.1\.\d+(-.+)?$'
11+
$self:
12+
type: string
13+
format: uri-reference
14+
$comment: MUST NOT contain a fragment
15+
pattern: '^[^#]*$'
1116
info:
1217
$ref: '#/$defs/info'
1318
sourceDescriptions:
@@ -524,20 +529,12 @@ $defs:
524529
type:
525530
enum:
526531
- goto
527-
- retry
528532
then:
529533
oneOf:
530534
- required:
531535
- workflowId
532536
- required:
533537
- stepId
534-
- if:
535-
properties:
536-
type:
537-
const: retry
538-
then:
539-
required:
540-
- retryAfter
541538
- if:
542539
required:
543540
- parameters
@@ -582,6 +579,7 @@ $defs:
582579
enum:
583580
- path
584581
- query
582+
- querystring
585583
- header
586584
- cookie
587585
- channel
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
arazzo: "1.1.0"
2+
info:
3+
title: Invalid Querystring Test
4+
version: 1.0.0
5+
sourceDescriptions:
6+
- name: api
7+
url: https://api.example.com/openapi.yaml
8+
type: openapi
9+
workflows:
10+
- workflowId: testInvalid
11+
steps:
12+
- stepId: search
13+
operationId: $sourceDescriptions.api.searchItems
14+
parameters:
15+
- name: q
16+
in: querystring
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
arazzo: 1.1.0
2+
$self: https://example.com/workflows/minimal-with-self.arazzo.yaml#/workflows/basicWorkflow
3+
info:
4+
title: Minimal Arazzo Example
5+
version: 1.0.0
6+
sourceDescriptions:
7+
- name: exampleAPI
8+
url: https://example.com/openapi.yaml
9+
type: openapi
10+
workflows:
11+
- workflowId: basicWorkflow
12+
steps:
13+
- stepId: step1
14+
operationId: getUsers

tests/schema/pass/bnpl-example.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ workflows:
127127
- context: $response.body
128128
type: jsonpath
129129
condition: $[?count(@.products) == 0]
130+
onFailure:
131+
- name: Unauthorized
132+
type: end
133+
criteria:
134+
- condition: $statusCode == 401
135+
- name: Too many requests
136+
type: retry
137+
retryAfter: 1
138+
retryLimit: 1
139+
criteria:
140+
- condition: $statusCode == 429
141+
stepId: checkLoanCanBeProvided
130142
outputs:
131143
eligibilityCheckRequired: $response.body#/eligibilityCheckRequired
132144
eligibleProducts: $response.body#/products
@@ -256,4 +268,4 @@ workflows:
256268
successCriteria:
257269
- condition: $statusCode == 204
258270
outputs:
259-
finalizedPaymentPlan: $steps.retrieveFinalizedPaymentPlan.outputs.finalizedPaymentPlan
271+
finalizedPaymentPlan: $steps.retrieveFinalizedPaymentPlan.outputs.finalizedPaymentPlan
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
arazzo: 1.1.0
2+
$self: https://example.com/workflows/minimal-with-self.arazzo.yaml
3+
info:
4+
title: Minimal Arazzo Example
5+
version: 1.0.0
6+
sourceDescriptions:
7+
- name: exampleAPI
8+
url: https://example.com/openapi.yaml
9+
type: openapi
10+
workflows:
11+
- workflowId: basicWorkflow
12+
steps:
13+
- stepId: step1
14+
operationId: getUsers
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
arazzo: "1.1.0"
2+
info:
3+
title: Querystring Runtime Expression Test
4+
version: 1.0.0
5+
sourceDescriptions:
6+
- name: api
7+
url: https://api.example.com/openapi.yaml
8+
type: openapi
9+
workflows:
10+
- workflowId: testQuerystringExpr
11+
inputs:
12+
type: object
13+
properties:
14+
filter:
15+
type: string
16+
steps:
17+
- stepId: search
18+
operationId: $sourceDescriptions.api.searchItems
19+
parameters:
20+
- name: q
21+
in: querystring
22+
value: "filter={$inputs.filter}&limit=20"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
arazzo: "1.1.0"
2+
info:
3+
title: Querystring Test
4+
version: 1.0.0
5+
sourceDescriptions:
6+
- name: api
7+
url: https://api.example.com/openapi.yaml
8+
type: openapi
9+
workflows:
10+
- workflowId: testQuerystring
11+
steps:
12+
- stepId: search
13+
operationId: $sourceDescriptions.api.searchItems
14+
parameters:
15+
- name: q
16+
in: querystring
17+
value: "filter=active&sort=desc"

0 commit comments

Comments
 (0)