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

Fix usage of endpoint in-call http tasks #877

Merged
Show file tree
Hide file tree
Changes from 2 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
22 changes: 11 additions & 11 deletions dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ use:
call: http
with:
method: post
uri: https://fake.log.collector.com
endpoint: https://fake.log.collector.com
body:
message: "${ \"Executing task '\($task.reference)'...\" }"
after:
call: http
with:
method: post
uri: https://fake.log.collector.com
endpoint: https://fake.log.collector.com
body:
message: "${ \"Executed task '\($task.reference)'...\" }"
functions:
Expand Down Expand Up @@ -259,7 +259,7 @@ do:
call: http
with:
method: get
uri: https://petstore.swagger.io/v2/pet/{petId}
endpoint: https://petstore.swagger.io/v2/pet/{petId}
```

Serverless Workflow defines several default functions that **MUST** be supported by all implementations and runtimes:
Expand Down Expand Up @@ -371,7 +371,7 @@ do:
call: http
with:
method: get
uri: https://petstore.swagger.io/v2/pet/{petId}
endpoint: https://petstore.swagger.io/v2/pet/{petId}
```

##### OpenAPI Call
Expand Down Expand Up @@ -481,15 +481,15 @@ do:
call: http
with:
method: put
uri: https://fake-hospital.com/api/v3/alert/nurses
endpoint: https://fake-hospital.com/api/v3/alert/nurses
body:
patientId: ${ .patient.fullName }
room: ${ .room.number }
callDoctor:
call: http
with:
method: put
uri: https://fake-hospital.com/api/v3/alert/doctor
endpoint: https://fake-hospital.com/api/v3/alert/doctor
body:
patientId: ${ .patient.fullName }
room: ${ .room.number }
Expand Down Expand Up @@ -917,7 +917,7 @@ do:
call: http
with:
method: get
uri: https://
endpoint: https://
catch:
errors:
with:
Expand Down Expand Up @@ -1203,22 +1203,22 @@ use:
call: http
with:
method: post
uri: https://fake.log.collector.com
endpoint: https://fake.log.collector.com
body:
message: "${ \"Executing task '\($task.reference)'...\" }"
after:
call: http
with:
method: post
uri: https://fake.log.collector.com
endpoint: https://fake.log.collector.com
body:
message: "${ \"Executed task '\($task.reference)'...\" }"
do:
get:
call: http
with:
method: get
uri: https://fake.com/sample
endpoint: https://fake.com/sample
```

*Intercept HTTP calls to 'https://mocked.service.com' and mock its response:*
Expand Down Expand Up @@ -1247,7 +1247,7 @@ do:
call: http
with:
method: get
uri: https://fake.com/sample
endpoint: https://fake.com/sample
```

### Error
Expand Down
5 changes: 4 additions & 1 deletion schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,11 @@ $defs:
type: string
description: The HTTP method of the HTTP request to perform.
endpoint:
$ref: '#/$defs/endpoint'
description: The HTTP endpoint to send the request to.
oneOf:
- $ref: '#/$defs/endpoint'
- type: string
format: uri
matthias-pichler marked this conversation as resolved.
Show resolved Hide resolved
headers:
type: object
description: A name/value mapping of the headers, if any, of the HTTP request to perform.
Expand Down
Loading