Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden-expression-and-condition-capabilities #77

Merged
merged 6 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/1.0.0/FAPI-PAR.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ workflows:
value: $inputs.PARrequestBody
successCriteria:
# assertions to determine step was successful
- $statusCode == 200
- condition: $statusCode == 200
outputs:
request_uri: $response.body.request_uri

Expand All @@ -131,7 +131,7 @@ workflows:
value: $inputs.client_id
successCriteria:
# assertions to determine step was successful
- $statusCode == 302
- condition: $statusCode == 302
outputs:
code: $response.body.code # Not really, this is a query parameter (need a way to represent out-of-band props)

Expand Down Expand Up @@ -166,7 +166,7 @@ workflows:
value: $inputs.code_verifier
successCriteria:
# assertions to determine step was successful
- $statusCode == 200
- condition: $statusCode == 200
outputs:
tokenResponse: $response.body

Expand Down
4 changes: 2 additions & 2 deletions examples/1.0.0/LoginAndRetrievePets.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ workflows:
value: $inputs.password
successCriteria:
# assertions to determine step was successful
- $statusCode == 200
- condition: $statusCode == 200
outputs:
# outputs from this step
tokenExpires: $response.header.X-Expires-After
Expand All @@ -53,7 +53,7 @@ workflows:
in: header
value: $steps.loginUser.outputs.sessionToken
successCriteria:
- $statusCode == 200
- condition: $statusCode == 200
outputs:
# outputs from this step
availablePets: $response.body
Expand Down
24 changes: 16 additions & 8 deletions examples/1.0.0/oauth.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ workflows:
grant_type: refresh_token
refresh_token: $steps.do-the-auth-flow.outputs.my_refresh_token
successCriteria:
- $statusCode == 200
- $response.body.access_token != null
- condition: $statusCode == 200
- context: $response.body
condition: $.access_token != null
type: JSONPath
outputs:
access_token: $response.body.access_token
refresh_token: $response.body.refresh_token
Expand Down Expand Up @@ -105,8 +107,10 @@ workflows:
value: 'client_credentials'

successCriteria:
- $statusCode == 200
- $response.body.access_token != null
- condition: $statusCode == 200
- context: $response.body
condition: $.access_token != null
type: JSONPath
outputs:
access_token: $response.body.access_token

Expand Down Expand Up @@ -153,8 +157,10 @@ workflows:
in: query
value: '12345'
successCriteria:
- $statusCode == 200
- $response.body.access_token != null
- condition: $statusCode == 200
- context: $response.body
condition: $.access_token != null
type: JSONPath
outputs:
code: $response.body.code # Not really, this is a query parameter

Expand Down Expand Up @@ -185,8 +191,10 @@ workflows:
value: $steps.browser-authorize.outputs.code

successCriteria:
- $statusCode == 200
- $response.body.access_token != null
- condition: $statusCode == 200
- context: $response.body
condition: $.access_token != null
type: JSONPath
outputs:
access_token: $response.body.access_token
refresh_token: $response.body.refresh_token
Expand Down
12 changes: 6 additions & 6 deletions examples/1.0.0/pet-coupons.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ workflows:
in: query
value: $inputs.my_pet_tags
successCriteria:
- $statusCode == 200
- condition: $statusCode == 200
outputs:
my_pet_id: $outputs[0].id
# there is some implied selection here - findPetsByTags responds with a list of pets,
Expand All @@ -40,7 +40,7 @@ workflows:
in: path
value: $steps.find-pet.outputs.my_pet_id
successCriteria:
- $statusCode == 200
- condition: $statusCode == 200
outputs:
my_coupon_code: $response.body.couponCode
- stepId: place-order
Expand All @@ -53,7 +53,7 @@ workflows:
in: body
value: $steps.find-coupons.outputs.my_coupon_code
successCriteria:
- $statusCode == 200
- condition: $statusCode == 200
outputs:
my_order_id: $response.body.id
- workflowId: buy-available-pet
Expand All @@ -75,7 +75,7 @@ workflows:
- $ref: '#/components/parameters/pageSize'
value: 10
successCriteria:
- $statusCode == 200
- condition: $statusCode == 200
outputs:
my_pet_id: $outputs[0].id
- stepId: place-order
Expand All @@ -85,7 +85,7 @@ workflows:
in: body
value: $steps.find-pet.outputs.my_pet_id
successCriteria:
- $statusCode == 200
- condition: $statusCode == 200
outputs:
my_order_id: $response.body.id
- workflowId: place-order
Expand Down Expand Up @@ -130,7 +130,7 @@ workflows:
target: $request.body#/complete
value: false
successCriteria:
- $statusCode == 200
- condition: $statusCode == 200
outputs:
my_order_id: $response.body.id
components:
Expand Down
Loading
Loading