Arazzo in Apiome
An Arazzo document describes workflows: sequences of API calls, each step calling an operation of an OpenAPI (or, in Arazzo 1.1, AsyncAPI) description, with the inputs a workflow takes, the outputs it returns, and what happens when a step succeeds or fails. Apiome treats Arazzo 1.0.x and 1.1.x as first-class: you can bring a workflow in with the API files it calls, read it as a flow, check that every step points at a real operation, compare two revisions, export it back, and run it against a deployment or a mock.
Each part has its own page. This page shows how they fit together.
When to use it
- You document how an API is meant to be used, not only what it offers. A checkout, an onboarding or an adopt-a-pet flow lives next to the APIs it calls, with its steps resolved to their operations.
- A workflow must keep working as its APIs change. A change to a workflow's inputs, outputs, criteria or sources is graded like any other breaking change, and a stored workflow can be run in CI against a mock or a staging deployment.
- Agents or partners follow your workflows. The steps, their success criteria and their outputs are readable from the UI, the CLI and the REST API.
The lifecycle at a glance
| You want to… | Where | Details |
|---|---|---|
| Bring in a workflow with the OpenAPI and AsyncAPI files it calls | Import dialog, or apiome import arazzo <archive or folder> | Import an Arazzo workflow with its API files |
| Read its steps, inputs, outputs and success and failure paths | The Workflows tab of a catalog item or project; apiome arazzo list and apiome arazzo show | Arazzo workflows |
| Check that every step resolved and every source was found | apiome arazzo validate, or apiome arazzo validate FILE for a local document | Arazzo workflow records |
Lint its structure — expressions, criteria, goto targets, ids, inputs and outputs | The Quality score of the revision; GET /v1/lint/rules lists the rules | Lint rules |
| Compare two revisions and see what breaks a workflow's callers | apiome diff, the diff GitHub Action, the publish check and catalog change reports | Arazzo workflow changes |
| Export it back, or start workflows for an API you already have | Export dialog → REST & HTTP → Arazzo | Arazzo from any source, Arazzo exports |
| Run it, step by step, against a deployment or a mock | apiome arazzo run <workflowId> --target <target> | Run a workflow against a target |
Arazzo 1.0 and 1.1
Every surface accepts both lines and keeps the version a document declares:
- Import and validation check a document against the JSON Schema for its own version, 1.0.x or 1.1.x, so a 1.1 document is not judged by 1.0 rules.
- Arazzo 1.1 additions come in and go back out unchanged: AsyncAPI source descriptions, steps
that wait on an event channel (
channelPath, withaction,correlationIdandtimeout), workflow-levelparameters,querystringparameters and$self. - Export writes 1.0 or 1.1 as you choose. A workflow with AsyncAPI sources needs 1.1, because 1.0 cannot express them; asking for 1.0 is refused rather than silently dropping the sources.
- Round trips are tested against the OpenAPI Initiative's own examples and files from Redocly, Spectral and Specmatic; the fidelity report on the Arazzo card names any difference.
Lint rules
Every Arazzo revision is linted by the arazzo rule pack, under the rules of the version it
declares. All of these are errors by default; a style guide can turn any of them down or off.
| The pack checks that… | Rule |
|---|---|
each step's operationId or operationRef names an operation of a declared source | arazzo.dangling-operation-id, arazzo.unresolvable-operation-ref |
every $-expression parses — the finding gives the position where it stops | arazzo.runtime-expression-invalid |
a jsonpath or regex success criterion names its context | arazzo.success-criteria-context-required |
a goto action's stepId or workflowId exists | arazzo.on-success-target-unresolved, arazzo.on-failure-target-unresolved |
every $components.* reference names a declared component | arazzo.component-ref-unresolved |
| step ids are unique in their workflow, and workflow ids in the document | arazzo.step-id-duplicate, arazzo.workflow-id-duplicate |
workflow dependsOn chains do not loop back | arazzo.depends-on-cycle |
a parameter's in is one its step's source defines: path, query, header or cookie for OpenAPI (plus querystring in 1.1); header or channel for an AsyncAPI step | arazzo.parameter-in-invalid |
workflow inputs are valid JSON Schema 2020-12 | arazzo.inputs-schema-invalid |
| every output is a runtime expression (or, from 1.1, a selector object) | arazzo.outputs-expression-invalid |
each source description's type is one the version defines — asyncapi only from 1.1 | arazzo.source-description-type-invalid, arazzo.async-source-before-1-1 |
Two warnings round out the pack:
arazzo.missing-success-criteria and
arazzo.unused-workflow-input.
The operationRef rule shipped as arzzo.unresolvable-operation-ref. Findings now carry
arazzo.unresolvable-operation-ref, and the old id is kept as an alias: a style guide that
names it, a stored finding and a waiver recorded against it all still match.
Fixes
Three Arazzo findings can be repaired by a deterministic fix: a repeated stepId, a step with no
successCriteria whose embedded source operation declares a 2xx response, and an arazzo: 1.0.x
marker on a document that uses a 1.1-only feature. See
Fixable Arazzo rules.
How the pieces fit
- Import stores the workflow as records. Each workflow and each of its steps is stored on the
revision, and each step's
operationIdoroperationRefis matched to the operation it calls — in the same archive or repository selection, in a spec already in the catalog, or fetched from its URL. A step that matches nothing is kept as written and marked unresolved, with the reason; so is a source description nothing could find. - Every read uses those records. The Workflows tab,
apiome arazzo list|show|validateand theGET /v1/workflows/…routes all read the same workflows, steps and resolution states. - Changes are graded by workflow rules. Comparing two revisions grades each change by what a workflow's callers depend on: a newly required input or a removed output is Breaking, a changed success criterion is flagged for review, an added optional input is Safe. A change no rule covers is reported as breaking.
- A run sends the steps in order.
apiome arazzo runbuilds each request from the inputs and earlier steps' outputs, judges each step's success criteria with expected and actual values, and followsgoto,retryandend. It sends onlyGET,HEADandOPTIONSsteps unless the target allows writes, the run opts in, and a fixture names the operation. Every run is recorded as verification evidence.
From the command line
apiome import arazzo ./checkout.zip --dry-run # what would come in
apiome import arazzo ./checkout/ --root checkout.arazzo.yaml
apiome arazzo list --catalog <item-uuid> # workflows and resolution
apiome arazzo show checkout --catalog <item-uuid>
apiome arazzo validate checkout.arazzo.yaml # local schema check
apiome arazzo validate --catalog <item-uuid> # exit 7 when a step did not resolve
apiome arazzo run checkout --catalog <item-uuid> --target checkout-mock --input cartId=42
See apiome arazzo and
apiome import arazzo in the CLI reference, and
Arazzo workflows in the REST reference.
Where next
- Arazzo workflows — the Workflows tab, the step graph, and running a workflow
- Import an Arazzo workflow with its API files
- Arazzo workflow changes
- Contract testing and CI gates