Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
a53a0ef
add an inputs file
JaredCE Jan 6, 2026
3159256
handle runtime expressions
JaredCE Jan 7, 2026
730c6b8
second attempt
JaredCE Jan 7, 2026
ab5c67f
Add runtime expression tests
JaredCE Jan 7, 2026
0f43783
Add jsdocs and simplify parts of the code, make sure we throw errors
JaredCE Jan 7, 2026
f93c3ad
Better handling of response bodies and headers
JaredCE Jan 7, 2026
e773de6
Broke simple runtime expressions
JaredCE Jan 7, 2026
5d2d64c
we broke json pointers
JaredCE Jan 7, 2026
09fad8d
No longer using the response.headers, will attach separately.
JaredCE Jan 7, 2026
e3edc35
create tests for tesing an runtime expression
JaredCE Jan 8, 2026
04cf79d
allow for evaluation of runtime expressions
JaredCE Jan 8, 2026
1389c7b
installs json pointer
JaredCE Jan 8, 2026
534d0a1
Make sure OpenAPI is called a Description
JaredCE Jan 8, 2026
1a56546
more mocks
JaredCE Jan 8, 2026
5c485d1
improve our mocks folder structure
JaredCE Jan 8, 2026
629f923
remove deprecated code
JaredCE Jan 8, 2026
7e495f9
update tests
JaredCE Jan 8, 2026
f81215f
update docs and allow for request and response params
JaredCE Jan 8, 2026
6358848
update specs
JaredCE Jan 8, 2026
eea595d
better safe evaluation
JaredCE Jan 8, 2026
4deaf45
improve our mock structure
JaredCE Jan 8, 2026
126cdea
check we can match arrays and objects
JaredCE Jan 8, 2026
6aa7b2c
match expressions to arrays and objects
JaredCE Jan 8, 2026
22c1b9a
get security information
JaredCE Jan 8, 2026
ad096e2
loads of changes here
JaredCE Jan 8, 2026
442a706
a lot of changes in here too
JaredCE Jan 8, 2026
7f023e9
prettify
JaredCE Jan 9, 2026
bd986aa
Create a Rules spec
JaredCE Jan 9, 2026
4909889
create a Rules class
JaredCE Jan 9, 2026
b0cdd8a
move mocks to their own folders
JaredCE Jan 9, 2026
5134f4d
Update tests
JaredCE Jan 9, 2026
1c1ce7a
updated input
JaredCE Jan 9, 2026
bee5959
update urlcorrect the url
JaredCE Jan 9, 2026
8859181
update input
JaredCE Jan 9, 2026
17bb1dd
create a test for Workflow failures
JaredCE Jan 9, 2026
e6d5a8e
set Workflow Failure actions
JaredCE Jan 9, 2026
255ece2
create a setStepFailureActions test
JaredCE Jan 9, 2026
16c230e
create a setStepFailures function
JaredCE Jan 9, 2026
260de0d
buidl rules test
JaredCE Jan 9, 2026
8c5a76b
add a function to build out the rules
JaredCE Jan 9, 2026
4539553
update spec
JaredCE Jan 9, 2026
c1e05b3
separation of rules
JaredCE Jan 9, 2026
4458c45
prettifies and adds a JSON Pointer test
JaredCE Jan 10, 2026
030b59c
prettifies
JaredCE Jan 10, 2026
c37b8a9
update and add to the rules spec
JaredCE Jan 10, 2026
ef66fc1
check rules against criteria
JaredCE Jan 10, 2026
9f2fe54
more mock files
JaredCE Jan 10, 2026
55bff75
prettifies
JaredCE Jan 10, 2026
93ffafb
update spec for rules tests
JaredCE Jan 10, 2026
db836ca
removes deprecated code, adds an abort handler, checks rules
JaredCE Jan 10, 2026
6414a3b
Merge pull request #16 from JaredCE/apply-rules
JaredCE Jan 10, 2026
a7e3073
create a mock with multiple sourceDescriptions
JaredCE Jan 10, 2026
ef8715b
update tests to deal with multiple source descriptions
JaredCE Jan 10, 2026
06d9e0a
remove deprecated code
JaredCE Jan 10, 2026
19f6afb
another input file
JaredCE Jan 10, 2026
f846897
install a package to heal deal with url params
JaredCE Jan 11, 2026
7635981
use the package
JaredCE Jan 11, 2026
3c47866
create onFailure rules
JaredCE Jan 11, 2026
d1285e6
remove from here
JaredCE Jan 11, 2026
0f05ce2
setup mocks
JaredCE Jan 11, 2026
9d21a90
create tests for retries
JaredCE Jan 11, 2026
8457f00
correct rules for retry
JaredCE Jan 11, 2026
91495bc
deal with retries correctly
JaredCE Jan 11, 2026
75ae961
create goto workflow
JaredCE Jan 12, 2026
b6ce63a
cleanup code
JaredCE Jan 12, 2026
8841cf0
improve console.log
JaredCE Jan 12, 2026
9d0d79d
correct tests
JaredCE Jan 12, 2026
3df6518
correctly setup goto rules
JaredCE Jan 12, 2026
f94bea0
correctly deal with retry-after header
JaredCE Jan 12, 2026
60eabf1
Merge pull request #17 from JaredCE/onFailure-rules
JaredCE Jan 12, 2026
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
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Options:
```
--format -f Whether to output the Arazzo Specification as json or yaml. Default: json
--output -o The name of the Arazzo Specification file. Default: arazzo.json
--source -s The default openAPI source file. Default: openapi.json
--source -s The default OpenAPI Description source file. Default: openapi.json
```

### Configuration
Expand Down Expand Up @@ -125,7 +125,7 @@ Mostly everything is optional in the `info` object. If you don't provide a `tit

#### sourceDescriptions

This section is optional. It allows you to document any extra OpenAPI or Arazzo Specification files that your workflows and steps may require. If you do not document this section, it will end up with a default of:
This section is optional. It allows you to document any extra OpenAPI descriptions or Arazzo Specification files that your workflows and steps may require. If you do not document this section, it will end up with a default of:

```
sourceDescriptions:
Expand All @@ -136,7 +136,7 @@ sourceDescriptions:

That is, that it generates the `name` property from the `title` property of the `info` object (or the one that is generated for you if you omitted the `info` object).

The `url` will be that of a local openapi.json file, this is what the [Serverless OpenAPI Documenter](https://github.com/JaredCE/serverless-openapi-documenter) generates by default. This can be changed by the CLI by providing a source argument with the path to a different OpenAPI file. To make this usable, this should really be an accessible URL, so you should switch the `--source` CLI input to be the final resting place of the specification (an S3 bucket perhaps), for running locally it will be fine to keep it as a local location.
The `url` will be that of a local openapi.json file, this is what the [Serverless OpenAPI Documenter](https://github.com/JaredCE/serverless-openapi-documenter) generates by default. This can be changed by the CLI by providing a source argument with the path to a different OpenAPI Description file. To make this usable, this should really be an accessible URL, so you should switch the `--source` CLI input to be the final resting place of the specification (an S3 bucket perhaps), for running locally it will be fine to keep it as a local location.

If you do provide this section, then any further additions will be added to that of the default `sourceDescription`. This is useful if you need to incorporate a step or workflow that resides in a different API (perhaps a Login service).

Expand Down Expand Up @@ -183,7 +183,7 @@ The `inputs` here will be used in a login step and can be verified by this JSON

#### steps

Describes a single workflow step which MAY be a call to an API operation (OpenAPI Operation Object) or another Workflow Object.
Describes a single workflow step which MAY be a call to an API operation (OpenAPI Description Operation Object) or another Workflow Object.

```yml
steps:
Expand All @@ -201,7 +201,7 @@ steps:
- condition:
```

Each step object requires a `stepId` which conforms to the Regex `[A-Za-z0-9_\-]+`. The `operationId` should point to an `operationId` within an OpenAPI document that is registered within the `sourceDescriptions` array. If you are using multiple OpenAPI files within the `sourceDescriptions` array, then you will need to reference the `operationId` via: `$sourceDescriptions.<name>.<operationId>` e.g.
Each step object requires a `stepId` which conforms to the Regex `[A-Za-z0-9_\-]+`. The `operationId` should point to an `operationId` within an OpenAPI Description that is registered within the `sourceDescriptions` array. If you are using multiple OpenAPI files within the `sourceDescriptions` array, then you will need to reference the `operationId` via: `$sourceDescriptions.<name>.<operationId>` e.g.

```yml
sourceDescriptions:
Expand All @@ -221,7 +221,7 @@ workflows:
operationId: $sourceDescriptions.contactOpenAPI.updateUser
```

`parameters` map to what must be passed into the referenced operation of the OpenAPI document, they map to the inputs described in the workflow section` e.g.
`parameters` map to what must be passed into the referenced operation of the OpenAPI Description, they map to the inputs described in the workflow section` e.g.

```yml
- workflowId: loginUserWorkflow
Expand All @@ -242,7 +242,7 @@ workflows:
value: $inputs.username
```

`requestBody` is very similar, the contentType should map to that of the operationId that is referenced in the OpenAPI document and the value map to the `inputs` referenced in the `workflow`.
`requestBody` is very similar, the contentType should map to that of the operationId that is referenced in the OpenAPI Description and the value map to the `inputs` referenced in the `workflow`.

For `successCriteria`, it is probably worth reading through the [Arazzo Specification for Criterion objects](https://spec.openapis.org/arazzo/v1.0.1.html#criterion-object), but this can be as simple as

Expand Down
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@
"dependencies": {
"@redocly/cli": "^2.14.0",
"@swaggerexpert/arazzo-runtime-expression": "^1.0.1",
"@swaggerexpert/json-pointer": "^2.10.2",
"ajv": "^8.17.1",
"chalk": "^4.1.2",
"js-yaml": "^4.1.1",
"jsonpath": "^1.1.1",
"openapi-params": "^0.0.4",
"peggy": "^5.0.6",
"stream-chain": "^3.4.0",
"stream-json": "^1.9.1",
Expand Down
Loading