diff --git a/dsl-reference.md b/dsl-reference.md index 54cc57f4..c4ce431a 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -372,6 +372,7 @@ The [HTTP Call](#http-call) enables workflows to interact with external services | endpoint | [`endpoint`](#endpoint) | `yes` | An URI or an object that describes the HTTP endpoint to call. | | headers | `map` | `no` | A name/value mapping of the HTTP headers to use, if any. | | body | `any` | `no` | The HTTP request body, if any. | +| query | `map[string, any]` | `no` | A name/value mapping of the query parameters to use, if any. | | output | `string` | `no` | The http call's output format.
*Supported values are:*
*- `raw`, which output's the base-64 encoded [http response](#http-response) content, if any.*
*- `content`, which outputs the content of [http response](#http-response), possibly deserialized.*
*- `response`, which outputs the [http response](#http-response).*
*Defaults to `content`.* | ###### Examples diff --git a/examples/http-query-params.yaml b/examples/http-query-params.yaml new file mode 100644 index 00000000..6f34c67e --- /dev/null +++ b/examples/http-query-params.yaml @@ -0,0 +1,25 @@ +# yaml-language-server: $schema=https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.yaml +document: + dsl: 1.0.0-alpha2 + namespace: examples + name: http-query-params + version: 1.0.0-alpha2 +input: + schema: + format: json + document: + type: object + required: + - searchQuery + properties: + searchQuery: + type: string +do: + - searchStarWarsCharacters: + call: http + with: + method: get + endpoint: https://swapi.dev/api/people/ + query: + search: ${.searchQuery} + diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 31fece1c..3c0e34ff 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -266,6 +266,10 @@ $defs: description: A name/value mapping of the headers, if any, of the HTTP request to perform. body: description: The body, if any, of the HTTP request to perform. + query: + type: object + additionalProperties: true + description: A name/value mapping of the query parameters, if any, of the HTTP request to perform. output: type: string enum: [ raw, content, response ]