arazzoDocument
arazzoDocument is an Arazzo-specific function for vacuum rules.
What does it validate?
Validating an Arazzo workflow properly means loading every source it points at. That is expensive, so vacuum does it once per lint using libopenapi-validator, and shares the outcome.
arazzoDocument hands one slice of those findings to a rule. The code option picks the slice.
It means eleven rules can report on the same validation pass, each with its own ID, severity and ignore entries, without the workflow being validated eleven times.
Options
| Name | Type | Required | Description |
|---|---|---|---|
| code | string |
yes | The group of findings to report. |
code accepts one of the following values.
| Code | Findings |
|---|---|
arazzo-structure |
Document structure |
arazzo-duplicate-id |
Duplicate identifiers |
arazzo-reference |
Workflow, step and source targets |
arazzo-parameter |
Parameters and linked operation metadata |
arazzo-expression |
Runtime expressions |
arazzo-selector |
Selectors and replacement targets |
arazzo-dependency |
Prerequisites and cycles |
arazzo-input-schema |
Workflow input schemas |
arazzo-source-type |
Source document types |
arazzo-validation-incomplete |
Checks that could not finish |
arazzo-advisory |
Identifier naming advice |
Result behavior
Each finding is reported at the location the validator found it, with a line number and JSONPath. That location can be in a linked source document instead of the workflow being linted.
The function returns nothing when the document is not Arazzo. given is not used to locate results, so the built-in
rules all use $.
Example ruleset configuration
The built-in rules already cover every code. The reason to configure this yourself is to give a group of findings a different rule ID, message or severity.
extends: [[vacuum:arazzo, off]]
rules:
my-broken-workflow-links:
description: Workflows must only point at things that exist
severity: error
formats: [arazzo]
given: $
then:
function: arazzoDocument
functionOptions:
code: arazzo-reference
Used by
- arazzo-structure
- arazzo-duplicate-id
- arazzo-reference
- arazzo-parameter
- arazzo-expression
- arazzo-selector
- arazzo-dependency
- arazzo-input-schema
- arazzo-source-type
- arazzo-validation-incomplete
- arazzo-advisory
