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
To generate an Arazzo Specification, you can call the plugin from the CLI like:
53
+
```bash
54
+
serverless arazzo generate -f json
55
+
```
41
56
42
57
Options:
43
58
@@ -109,6 +124,8 @@ Workflows comprise of one or many workflow objects, one workflow might be for lo
109
124
110
125
Each workflow object requires a `workflowId` and a set of `steps`. `workflowId` should conform to the Regex `[A-Za-z0-9_\-]+` and should be unique across the Arazzo Specification.
111
126
127
+
##### inputs
128
+
112
129
`inputs`is a [JSON Schema](https://json-schema.org/) of the various inputs you will need for each step e.g.
113
130
114
131
```yml
@@ -124,7 +141,7 @@ Each workflow object requires a `workflowId` and a set of `steps`. `workflowId`
124
141
type: string
125
142
```
126
143
127
-
The `inputs` here will be used in a login step and can be verified by this JSON Schema.
144
+
The `inputs` here will be used in a login step and can be verified by this JSON Schema. If you are to be usng the runner part of this plugin (see [Running](#running-the-arazzo-specification)), then the inputs should map to the input file (see [Input File](#input-file)).
128
145
129
146
#### steps
130
147
@@ -219,3 +236,44 @@ custom:
219
236
```
220
237
221
238
`other-field`here will not make it to the generated Arazzo document.
239
+
240
+
## Running the Arazzo Specification
241
+
242
+
For now, I recommend using the [Redocly CLI](https://redocly.com/redocly-cli) to [run your Arazzo Workflows](https://redocly.com/learn/arazzo/testing-arazzo-workflows).
243
+
244
+
### Here be Dragons
245
+
246
+
To run the generated Arazzo Specification, you can call the plugin from the CLI like:
247
+
248
+
```bash
249
+
serverless arazzo run
250
+
```
251
+
252
+
Options:
253
+
254
+
```
255
+
--source -s The default Arazzo Specification source file. Default: arazzo.json
256
+
--input -i The file containign input variables to run the Workflow steps. Default: input.json
257
+
```
258
+
259
+
### Input file
260
+
261
+
The input file is where you keep your variables that you wish to use within your workflow and should be a json file structured like:
262
+
263
+
```json
264
+
{
265
+
"worflowId1": {
266
+
"name": "Jared"
267
+
}
268
+
}
269
+
```
270
+
271
+
The file should contain objects for each workflow, by workflowId, with the variables matching up to the inputs that you defined in your workflow [inputs](#inputs) schema.
272
+
273
+
This file is likely to be comitted to your repository, so you should not store secrets in the file, instead you might use something like [jq](https://jqlang.org/) that can take repository variables and insert them into your input file:
Obviously, if you have a lot of secret variables that need adding as inputs, then you might need to write a script that can alter the `input.json` file for you within your CI/CD runner.
0 commit comments