@usearazzo/validator checks an Arazzo document and reports every problem it finds. Problems come back as Language Server Protocol diagnostics: a location, a severity, a code, and a message. An editor can underline them, a CI step can count them, and a terminal can print them.
The checks come from the SpecLynx ApiDOM Language Service. Documents are read with @usearazzo/parser.
Installation
npm install @usearazzo/validator
The package ships ESM and CommonJS builds with TypeScript declarations, and requires Node.js 20.10 or newer. It is pre-1.0: the version documented here is an alpha, and the API may still change before the stable release.
Exports
| Export | Kind | What it is |
|---|---|---|
validateURI |
function | Validate a document from a path or URL. |
validate |
function | Validate a document already in memory, as a TextDocument. |
createTextDocument |
function | Wrap a URI and content in a TextDocument ready for validate. |
TextDocument |
class | Re-exported from vscode-languageserver-textdocument. |
ARAZZO_LANGUAGE_ID, DEFAULT_DOCUMENT_VERSION |
constant | The language ID ('apidom') and version (1) createTextDocument uses. |
defaultLanguageServiceContext |
constant | The validation settings your options are merged over. |
defaultArazzoResolveOptions |
constant | The file and HTTP resolvers validateURI fetches the document with. |
ValidateError |
class | Thrown when validateURI cannot fetch the document. |
Diagnostic, DiagnosticSeverity |
type, constant | Re-exported from vscode-languageserver-types. |
LanguageServiceContext |
type | The shape of the options. |
validateURI
validateURI(
uri: string,
context?: PartialDeep<LanguageServiceContext>,
resolveOptions?: PartialDeep<ApiDOMReferenceResolveOptions>,
): Promise<Diagnostic[]>
Fetches the document at uri, validates it, and returns every diagnostic:
import { validateURI, DiagnosticSeverity } from '@usearazzo/validator';
const diagnostics = await validateURI('/path/to/adopt-a-pet.arazzo.yaml');
const errors = diagnostics.filter((d) => d.severity === DiagnosticSeverity.Error);
const isValid = errors.length === 0;
An empty array means nothing was found. A document with problems is not an error: it resolves to its diagnostics like any other.
Inputs
uri is a location, as a string:
- A file system path. A relative path is read from the current working directory.
- A
file://URL. - An HTTP or HTTPS URL.
await validateURI('./adopt-a-pet.arazzo.yaml');
await validateURI('file:///path/to/adopt-a-pet.arazzo.yaml');
await validateURI('https://example.com/adopt-a-pet.arazzo.yaml');
All three forms land on the same absolute location. Relative URLs inside the document, such as sourceDescriptions[].url: ./petstore.openapi.json, resolve against it, whichever form you passed.
The second argument is the options, shared with validate.
Fetching the document
validateURI reads the document with the parser’s file and HTTP resolvers, exported as defaultArazzoResolveOptions:
- Files. Only
.json,.yaml, and.ymlfiles are read, dotfiles included. - HTTP. A 15 second timeout, at most 5 redirects, and no credentials.
The third argument is merged over them. It is an ApiDOM reference resolve options object. resolverOpts entries are set on each resolver, so the keys worth setting are the resolver’s own: timeout, redirects, withCredentials, and cache for HTTP.
const diagnostics = await validateURI('https://example.com/adopt-a-pet.arazzo.yaml', {}, {
resolverOpts: { timeout: 10000 },
});
These resolvers fetch the entry document only. What source descriptions may read is a separate setting, parseContext.fileAllowList.
Errors
validateURI throws a ValidateError only when it cannot fetch the document: a missing file, an HTTP error, a file the resolvers do not allow. The message names the location you passed. The underlying error is on cause:
import { validateURI, ValidateError } from '@usearazzo/validator';
try {
await validateURI('./missing.arazzo.yaml');
} catch (error) {
if (error instanceof ValidateError) {
error.message; // 'Failed to read Arazzo Document at "./missing.arazzo.yaml"'
error.cause.message; // 'Error while reading file "/home/you/project/missing.arazzo.yaml"'
}
throw error;
}
The cause comes from ApiDOM. Its name is often ResolveError, ApiDOM’s own class of that name. Use instanceof on the outer error only.
Everything wrong with a document that was fetched is a diagnostic, never an exception. That includes a document that is not Arazzo at all: see Documents that are not Arazzo.
validate
validate(
textDocument: TextDocument,
context?: PartialDeep<LanguageServiceContext>,
): Promise<Diagnostic[]>
Validates content you already hold. It fetches nothing for the document itself, and never throws for a bad document.
import { validate, createTextDocument } from '@usearazzo/validator';
const textDocument = createTextDocument('file:///path/to/adopt-a-pet.arazzo.yaml', yamlText);
const diagnostics = await validate(textDocument);
validateURI is this function with a fetch in front of it. It reads the document, wraps it in a TextDocument named after the absolute location, and calls validate.
TextDocument
validate takes a TextDocument, the document model of the Language Server Protocol. An editor extension already has one. Anything else can build one:
import { createTextDocument, TextDocument } from '@usearazzo/validator';
const a = createTextDocument('file:///path/to/adopt-a-pet.arazzo.yaml', yamlText);
const b = TextDocument.create('file:///path/to/adopt-a-pet.arazzo.yaml', 'apidom', 1, yamlText);
Both are the same document. createTextDocument fills in ARAZZO_LANGUAGE_ID and DEFAULT_DOCUMENT_VERSION for you. JSON and YAML are both accepted; the format is detected from the content.
Relative URLs
A relative sourceDescriptions[].url resolves against the TextDocument’s URI. Give the TextDocument the document’s real, absolute location, such as file:///path/to/adopt-a-pet.arazzo.yaml or https://example.com/adopt-a-pet.arazzo.yaml. A made-up URI works for everything else, but its source descriptions then resolve against the made-up location.
Documents that are not Arazzo
Content that is not recognized as Arazzo returns exactly one diagnostic, spanning the whole document, and nothing else runs:
{
"range": { "start": { "line": 0, "character": 0 }, "end": { "line": 3, "character": 0 } },
"severity": 1,
"code": 9000001,
"source": "apilint",
"message": "Document content is not recognized as an Arazzo Specification"
}
That covers an OpenAPI document, a JSON or YAML array, an empty file, and a document that matches both Arazzo and another specification.
It also covers YAML that does not parse, anywhere in the document: a YAML syntax error is reported this way, not as a syntax error at its location. JSON is different. A JSON syntax error comes back as a diagnostic at the error, with source syntax and code 0, alongside the rules that still apply to what did parse.
Diagnostics
Both functions return an array of Diagnostic objects, the type VS Code and every Language Server Protocol client render.
Shape
A workflow whose two steps share a stepId reports each step:
{
"range": { "start": { "line": 12, "character": 8 }, "end": { "line": 15, "character": 41 } },
"severity": 1,
"code": 9040403,
"source": "apilint",
"message": "Every step must have a unique 'stepId' within a workflow."
}
Every diagnostic has these five fields:
| Field | What it holds |
|---|---|
range |
Where the problem is. Lines and characters count from 0. |
severity |
1 error, 2 warning, 4 hint. Compare against DiagnosticSeverity. |
code |
Which rule fired. See Codes and sources. |
source |
Which part of the validator reported it. |
message |
A human-readable description. |
Warnings and hints are advice, not violations. A missing description on a workflow is a warning; a missing summary is a hint. To decide whether a document is valid, count errors only.
Codes and sources
| Source | Code | Reported by |
|---|---|---|
apilint |
A number, such as 9040403 |
A rule. The number is stable: match on it. |
apilint |
9000001 |
The document is not Arazzo. |
apilint |
A generated string | A $ref whose target does not exist (message local reference not found). |
syntax |
0 |
A JSON syntax error. |
Arazzo 1.0 Schema |
'json-schema' |
JSON Schema validation, when enabled. |
The code of an unresolvable $ref is different on every run, so it cannot be matched on. Match on the message instead.
The numeric codes have names in ApilintCodes, exported by @speclynx/api-languageservice. ApilintCodes.ARAZZO_NOT_DETECTED is 9000001, for example.
Options
The second argument of both functions is a deep-partial LanguageServiceContext. It is merged over defaultLanguageServiceContext.
What runs
Five options under validationContext decide which checks run and how their messages read:
| Option | Default | Effect when on |
|---|---|---|
semanticValidation |
true |
Every rule runs. |
semanticLinting |
true |
Only rules marked as lint rules run. No Arazzo rule is, so on its own it adds nothing. |
referenceValidation |
true |
Every local $ref inside a JSON Schema, such as #/components/inputs/adopter, must point at something that exists. External $refs to other files are not checked. |
jsonSchemaValidation |
false |
Arazzo 1.0.x documents are also checked against the Arazzo 1.0 JSON Schema. Arazzo 1.1.0 documents get no JSON Schema check. |
betterAjvErrors |
true |
Friendlier messages for JSON Schema validation. |
Turning semanticValidation off therefore turns every rule off, whatever semanticLinting says.
JSON Schema validation is off by default because the rules already report most of what it finds, so turning it on mostly doubles the output. What it adds is structural, such as telling the variants of a Reusable Object apart:
{
"range": { "start": { "line": 1, "character": 0 }, "end": { "line": 1, "character": 4 } },
"severity": 1,
"code": "json-schema",
"source": "Arazzo 1.0 Schema",
"message": "\"info\" property must have required property \"version\""
}
const diagnostics = await validateURI('/path/to/adopt-a-pet.arazzo.yaml', {
validationContext: { jsonSchemaValidation: true },
});
Source descriptions
The documents listed under sourceDescriptions are fetched and parsed while the entry document is validated. Two options under parseContext control that:
| Option | Default | Effect |
|---|---|---|
arazzo.sourceDescriptionsResolution |
true |
Fetch and parse each source description. |
fileAllowList |
[/\.json$/i, /\.ya?ml$/i] |
Which local files a source description may read. An empty array turns resolution off entirely. |
The default allow list matches the parser’s: local .json, .yaml, and .yml files, dotfiles included, and nothing else. Its entries are regular expressions, tested against the file’s absolute path. Glob strings are accepted too, but a glob such as '*' never matches a dotfile such as .petstore.yaml. HTTP and HTTPS source descriptions are not affected by this list.
No rule reads the parsed source descriptions yet. A source description that is missing, cannot be fetched, or does not parse produces no diagnostic, and an operationId is not checked against the OpenAPI document it names. The rules check the shape of $sourceDescriptions expressions, and resolve workflows and steps within the document itself.
Defaults and merging
import { defaultLanguageServiceContext } from '@usearazzo/validator';
console.dir(defaultLanguageServiceContext, { depth: null });
Your options are merged over the defaults key by key. Objects merge; arrays and every other value replace. Setting fileAllowList therefore replaces the default list, it does not add to it:
// read .json, .yaml, .yml, and .openapi files
const diagnostics = await validateURI('/path/to/adopt-a-pet.arazzo.yaml', {
parseContext: { fileAllowList: [/\.json$/i, /\.ya?ml$/i, /\.openapi$/i] },
});
The defaults also set defaultContentLanguage to Arazzo 1.0.1. That is not the version checked: each document is checked against the version in its own arazzo field.
Untrusted documents
An Arazzo document decides what its source descriptions point at. By default the validator reads every .json, .yaml, and .yml file a source description names, wherever it is, and fetches every HTTP and HTTPS one. For a document you wrote, that is what you want. For a document you did not, restrict it.
No access beyond the document
Turn source description resolution off. The validator then reads the entry document and nothing else:
const diagnostics = await validateURI('/path/to/untrusted.arazzo.yaml', {
parseContext: {
fileAllowList: [],
arazzo: { sourceDescriptionsResolution: false },
},
});
Since no rule reads source descriptions yet, this changes no diagnostic today.
One directory only
To let source descriptions resolve, but only inside one directory, anchor the allow list to that directory:
const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
// percent-encoded the way the validator encodes paths, with the trailing slash
const root = encodeURI('/home/you/specs/').replace(/#/g, '%23').replace(/\?/g, '%3F');
const diagnostics = await validateURI('/home/you/specs/adopt-a-pet.arazzo.yaml', {
parseContext: {
fileAllowList: [new RegExp(`^${escapeRegExp(root)}.*\\.(json|ya?ml)$`, 'i')],
},
});
The pattern is tested against the final, absolute location, so a URL cannot climb out of the directory:
../segments are resolved first../sub/../other/../petstore.jsonis tested as/home/you/specs/petstore.json.- Percent-encoded dots are decoded first.
./%2e%2e/%2e%2e/secrets.jsonis tested as the real path outside the directory, and rejected. - The path is percent-encoded when tested: a space is
%20,#is%23, and?is%3F. That is whyrootis encoded the same way.encodeURIalone leaves#and?as they are.
Three limits:
- Keep the trailing slash. Without it,
/home/you/specsalso matches/home/you/specs-private/. - Symlinks are not resolved. The check compares paths, not files on disk. A symlink inside the directory that points outside it passes.
- HTTP is not covered. The allow list is for local files only. To stop network access as well, turn resolution off as above.
Rules
Every rule the validator runs on an Arazzo document, grouped by the object it checks. All of them run when semanticValidation is on, which is the default.
- Rule is the diagnostic’s
code, the number to match on, with the rule’s name inApilintCodesunder it. The name never appears in a diagnostic, but it says what the rule checks. - Only in marks a rule that applies to Arazzo 1.0.x or 1.1.0 documents only. Empty means both.
The messages are quoted exactly as the validator reports them.
Any object
Applies to every object in the document.
| Rule | Severity | Message |
|---|---|---|
14999DUPLICATE_ |
Error | an object cannot contain duplicate keys |
Arazzo Specification Object
The document root.
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9020100ARAZZO_ |
Error | should always have an 'arazzo' version field | |
9020101ARAZZO_ |
Error | arazzo version must be a string | |
9020102ARAZZO_ |
Error | arazzo version must match the pattern 1.0.x or 1.1.x | |
9020200ARAZZO_ |
Error | should always have an 'info' object | |
9020201ARAZZO_ |
Error | info must be an object | |
9020300ARAZZO_ |
Error | should always have a 'sourceDescriptions' list | |
9020301ARAZZO_ |
Error | sourceDescriptions must be an array of Source Description Objects | |
9020302ARAZZO_ |
Error | sourceDescriptions must have at least one entry | |
9020400ARAZZO_ |
Error | should always have a 'workflows' list | |
9020401ARAZZO_ |
Error | workflows must be an array of Workflow Objects | |
9020402ARAZZO_ |
Error | workflows must have at least one entry | |
9020500ARAZZO_ |
Error | components must be an object | |
9020700ARAZZO_ |
Error | $self must be a string | 1.1.0 |
9020701ARAZZO_ |
Error | $self must be in the format of a URI-reference. | 1.1.0 |
9020702ARAZZO_ |
Error | $self MUST NOT contain a fragment identifier | 1.1.0 |
Info Object
| Rule | Severity | Message |
|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields |
9010100ARAZZO_ |
Error | description must be a string |
9010101ARAZZO_ |
Warning | Info 'description' should be present and non-empty string. |
9010200ARAZZO_ |
Error | should always have a 'title' |
9010201ARAZZO_ |
Error | title must be a string |
9010300ARAZZO_ |
Error | should always have a 'version' |
9010301ARAZZO_ |
Error | version must be a string |
9010400ARAZZO_ |
Error | summary must be a string |
9010401ARAZZO_ |
Hint | Info 'summary' is recommended to be present and a non-empty string. |
9020600ARAZZO_ |
Error | Markdown title must not contain "<script>" tags. |
9020600ARAZZO_ |
Error | Markdown description must not contain "<script>" tags. |
9020600ARAZZO_ |
Error | Markdown summary must not contain "<script>" tags. |
Source Description Object
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9030100ARAZZO_ |
Error | should always have a 'name' | |
9030101ARAZZO_ |
Error | name must be a string | |
9030102ARAZZO_ |
Warning | name SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9030200ARAZZO_ |
Error | should always have a 'url' | |
9030201ARAZZO_ |
Error | url must be a string | |
9030300ARAZZO_ |
Error | type must be a string | |
9030301ARAZZO_ |
Error | type must be one of: 'openapi', 'arazzo' | 1.0.x |
9030301ARAZZO_ |
Error | type must be one of: 'openapi', 'arazzo', 'asyncapi' | 1.1.0 |
Workflow Object
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9020600ARAZZO_ |
Error | Markdown summary must not contain "<script>" tags. | |
9020600ARAZZO_ |
Error | Markdown description must not contain "<script>" tags. | |
9040100ARAZZO_ |
Error | should always have a 'workflowId' | |
9040101ARAZZO_ |
Error | workflowId must be a string | |
9040102ARAZZO_ |
Warning | workflowId SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9040103ARAZZO_ |
Error | Every workflow must have a unique 'workflowId'. | |
9040200ARAZZO_ |
Error | summary must be a string | |
9040201ARAZZO_ |
Error | description must be a string | |
9040202ARAZZO_ |
Warning | Workflow 'description' should be present and non-empty string. | |
9040203ARAZZO_ |
Hint | Workflow 'summary' is recommended to be present and a non-empty string. | |
9040300ARAZZO_ |
Error | inputs must be a JSON Schema object | |
9040400ARAZZO_ |
Error | should always have a 'steps' list | |
9040401ARAZZO_ |
Error | steps must be an array of Step Objects | |
9040402ARAZZO_ |
Error | steps must have at least one entry | |
9040500ARAZZO_ |
Error | dependsOn must be an array of strings | |
9040501ARAZZO_ |
Error | 'dependsOn' entries must be unique. | |
9040502ARAZZO_ |
Error | "dependsOn" entries must reference existing workflow IDs. | |
9040503ARAZZO_ |
Error | dependsOn entry references a sourceDescription that is not of type 'arazzo' | |
9040600ARAZZO_ |
Error | successActions must be an array of Success Action or Reusable Objects | |
9040700ARAZZO_ |
Error | failureActions must be an array of Failure Action or Reusable Objects | |
9040800ARAZZO_ |
Error | outputs must be an object | |
9040801ARAZZO_ |
Error | output keys must match the pattern [a-zA-Z0-9.\-_]+ | |
9040802ARAZZO_ |
Error | output values must be strings (Runtime Expressions) | 1.0.x |
9040802ARAZZO_ |
Error | output values must be strings (Runtime Expressions) or Selector Objects | 1.1.0 |
9040803ARAZZO_ |
Error | Workflow output names must be unique. | |
9040804ARAZZO_ |
Error | Workflow output values must be valid Arazzo Runtime Expressions. | |
9040900ARAZZO_ |
Error | parameters must be an array of Parameter or Reusable Objects |
Step Object
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9020600ARAZZO_ |
Error | Markdown description must not contain "<script>" tags. | |
9040403ARAZZO_ |
Error | Every step must have a unique 'stepId' within a workflow. | |
9050100ARAZZO_ |
Error | should always have a 'stepId' | |
9050101ARAZZO_ |
Error | stepId must be a string | |
9050102ARAZZO_ |
Warning | stepId SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9050200ARAZZO_ |
Error | description must be a string | |
9050201ARAZZO_ |
Warning | Step 'description' should be present and non-empty string. | |
9050300ARAZZO_ |
Error | operationId must be a string | |
9050301ARAZZO_ |
Error | operationPath must be a string | |
9050302ARAZZO_ |
Error | workflowId must be a string | |
9050303ARAZZO_ |
Hint | It is recommended to use 'operationId' rather than 'operationPath'. | |
9050304ARAZZO_ |
Error | Step "workflowId" must reference an existing workflow. | |
9050305ARAZZO_ |
Warning | workflowId SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9050306ARAZZO_ |
Error | operationId references a sourceDescription that is not of type 'openapi' | 1.0.x |
9050306ARAZZO_ |
Error | operationId references a sourceDescription that is not of type 'openapi' or 'asyncapi' | 1.1.0 |
9050307ARAZZO_ |
Error | workflowId references a sourceDescription that is not of type 'arazzo' | |
9050400ARAZZO_ |
Error | requestBody must be a Request Body Object | |
9050500ARAZZO_ |
Error | successCriteria must be an array of Criterion Objects | |
9050600ARAZZO_ |
Error | onSuccess must be an array of Success Action or Reusable Objects | |
9050700ARAZZO_ |
Error | onFailure must be an array of Failure Action or Reusable Objects | |
9050800ARAZZO_ |
Error | outputs must be an object | |
9050801ARAZZO_ |
Error | output keys must match the pattern [a-zA-Z0-9.\-_]+ | |
9050802ARAZZO_ |
Error | output values must be strings (Runtime Expressions) | 1.0.x |
9050802ARAZZO_ |
Error | output values must be strings (Runtime Expressions) or Selector Objects | 1.1.0 |
9050803ARAZZO_ |
Error | Step output names must be unique. | |
9050804ARAZZO_ |
Error | Step output values must be valid Arazzo Runtime Expressions. | |
9050900ARAZZO_ |
Error | parameters must be an array of Parameter or Reusable Objects | |
9051000ARAZZO_ |
Error | operationId is mutually exclusive with operationPath, channelPath and workflowId | |
9051001ARAZZO_ |
Error | operationPath is mutually exclusive with operationId, channelPath and workflowId | |
9051002ARAZZO_ |
Error | workflowId is mutually exclusive with operationId, operationPath and channelPath | |
9051100ARAZZO_ |
Error | channelPath must be a string | 1.1.0 |
9051101ARAZZO_ |
Error | channelPath is mutually exclusive with operationId, operationPath and workflowId | 1.1.0 |
9051200ARAZZO_ |
Error | timeout must be an integer | 1.1.0 |
9051300ARAZZO_ |
Error | correlationId only applies when action is 'receive' | 1.1.0 |
9051301ARAZZO_ |
Error | correlationId requires action to be present and set to 'receive' | 1.1.0 |
9051400ARAZZO_ |
Error | action must be a string | 1.1.0 |
9051401ARAZZO_ |
Error | action must be one of: 'send', 'receive' | 1.1.0 |
9051500ARAZZO_ |
Error | dependsOn must be an array of strings | 1.1.0 |
9051501ARAZZO_ |
Error | 'dependsOn' entries must be unique. | 1.1.0 |
9051502ARAZZO_ |
Error | "dependsOn" entries must reference an existing stepId or a valid runtime expression. | 1.1.0 |
9051503ARAZZO_ |
Error | dependsOn entry references a sourceDescription that is not of type 'arazzo' | 1.1.0 |
Parameter Object
| Rule | Severity | Message |
|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields |
9050901ARAZZO_ |
Error | Parameters must be unique by 'name' and 'in' combination. |
9060100ARAZZO_ |
Error | should always have a 'name' |
9060101ARAZZO_ |
Error | name must be a string |
9060200ARAZZO_ |
Error | in must be a string |
9060201ARAZZO_ |
Error | in must be one of: 'path', 'query', 'header', 'cookie' |
9060300ARAZZO_ |
Error | should always have a 'value' |
9060301ARAZZO_ |
Error | Parameter value starting with "$" must be a valid Arazzo Runtime Expression. |
Success Action Object
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9050601ARAZZO_ |
Error | Every success action must have a unique 'name'. | |
9070100ARAZZO_ |
Error | should always have a 'name' | |
9070101ARAZZO_ |
Error | name must be a string | |
9070200ARAZZO_ |
Error | should always have a 'type' | |
9070201ARAZZO_ |
Error | type must be a string | |
9070202ARAZZO_ |
Error | type must be one of: 'end', 'goto' | |
9070300ARAZZO_ |
Error | workflowId must be a string | |
9070301ARAZZO_ |
Error | Success action "workflowId" must reference an existing workflow. | |
9070302ARAZZO_ |
Warning | workflowId SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9070303ARAZZO_ |
Error | workflowId references a sourceDescription that is not of type 'arazzo' | |
9070400ARAZZO_ |
Error | stepId must be a string | |
9070401ARAZZO_ |
Error | Success action "stepId" must reference an existing step in the same workflow. | |
9070402ARAZZO_ |
Warning | stepId SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9070500ARAZZO_ |
Error | criteria must be an array of Criterion Objects | |
9070600ARAZZO_ |
Error | workflowId is mutually exclusive with stepId | |
9070601ARAZZO_ |
Error | stepId is mutually exclusive with workflowId | |
9070700ARAZZO_ |
Error | parameters must be an array of Parameter or Reusable Objects | 1.1.0 |
9070701ARAZZO_ |
Warning | parameters only applies when workflowId is set | 1.1.0 |
Failure Action Object
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9050701ARAZZO_ |
Error | Every failure action must have a unique 'name'. | |
9080100ARAZZO_ |
Error | should always have a 'name' | |
9080101ARAZZO_ |
Error | name must be a string | |
9080200ARAZZO_ |
Error | should always have a 'type' | |
9080201ARAZZO_ |
Error | type must be a string | |
9080202ARAZZO_ |
Error | type must be one of: 'end', 'goto', 'retry' | |
9080300ARAZZO_ |
Error | workflowId must be a string | |
9080301ARAZZO_ |
Error | Failure action "workflowId" must reference an existing workflow. | |
9080302ARAZZO_ |
Warning | workflowId SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9080303ARAZZO_ |
Error | workflowId references a sourceDescription that is not of type 'arazzo' | |
9080400ARAZZO_ |
Error | stepId must be a string | |
9080401ARAZZO_ |
Error | Failure action "stepId" must reference an existing step in the same workflow. | |
9080402ARAZZO_ |
Warning | stepId SHOULD match the pattern [A-Za-z0-9_\-]+ | |
9080500ARAZZO_ |
Error | retryAfter must be a number | |
9080501ARAZZO_ |
Error | retryAfter must be a non-negative number | |
9080600ARAZZO_ |
Error | retryLimit must be a number | |
9080601ARAZZO_ |
Error | retryLimit must be a non-negative integer | |
9080700ARAZZO_ |
Error | criteria must be an array of Criterion Objects | |
9080800ARAZZO_ |
Error | workflowId is mutually exclusive with stepId | |
9080801ARAZZO_ |
Error | stepId is mutually exclusive with workflowId | |
9080900ARAZZO_ |
Warning | retryAfter only applies when type is "retry" | |
9080901ARAZZO_ |
Warning | retryLimit only applies when type is "retry" | |
9081000ARAZZO_ |
Error | parameters must be an array of Parameter or Reusable Objects | 1.1.0 |
9081001ARAZZO_ |
Warning | parameters only applies when workflowId is set | 1.1.0 |
Components Object
| Rule | Severity | Message |
|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields |
9090100ARAZZO_ |
Error | inputs must be an object |
9090101ARAZZO_ |
Error | inputs values must be JSON Schema Objects |
9090102ARAZZO_ |
Error | component keys must match the pattern [a-zA-Z0-9.\-_]+ |
9090200ARAZZO_ |
Error | parameters must be an object |
9090201ARAZZO_ |
Error | parameters values must be Parameter Objects |
9090202ARAZZO_ |
Error | component keys must match the pattern [a-zA-Z0-9.\-_]+ |
9090300ARAZZO_ |
Error | successActions must be an object |
9090301ARAZZO_ |
Error | successActions values must be Success Action Objects |
9090302ARAZZO_ |
Error | component keys must match the pattern [a-zA-Z0-9.\-_]+ |
9090400ARAZZO_ |
Error | failureActions must be an object |
9090401ARAZZO_ |
Error | failureActions values must be Failure Action Objects |
9090402ARAZZO_ |
Error | component keys must match the pattern [a-zA-Z0-9.\-_]+ |
Reusable Object
| Rule | Severity | Message |
|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields |
9140100ARAZZO_ |
Error | should always have a 'reference' |
9140101ARAZZO_ |
Error | reference must be a string (Runtime Expression) |
9140200ARAZZO_ |
Error | value must be a string |
Criterion Object
| Rule | Severity | Message |
|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields |
9100100ARAZZO_ |
Error | should always have a 'condition' |
9100101ARAZZO_ |
Error | condition must be a string |
9100102ARAZZO_ |
Error | Criterion "condition" must be a valid regular expression when type is "regex". |
9100200ARAZZO_ |
Error | context must be a string (Runtime Expression) |
9100201ARAZZO_ |
Error | Criterion "context" must be a valid Arazzo Runtime Expression. |
9100301ARAZZO_ |
Warning | type must be one of: 'simple', 'regex', 'jsonpath', 'xpath', or an Expression Type Object |
9100400ARAZZO_ |
Error | context MUST be provided when type is specified |
Criterion Expression Type Object
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9110100ARAZZO_ |
Error | should always have a 'type' | |
9110101ARAZZO_ |
Error | type must be a string | |
9110102ARAZZO_ |
Error | type must be one of: 'jsonpath', 'xpath' | 1.0.x |
9110102ARAZZO_ |
Error | type must be one of: 'jsonpath', 'xpath', 'jsonpointer' | 1.1.0 |
9110200ARAZZO_ |
Error | should always have a 'version' | 1.0.x |
9110201ARAZZO_ |
Error | version must be a string | |
9110300ARAZZO_ |
Error | when type is 'jsonpath', version must be one of: 'rfc9535', 'draft-goessner-dispatch-jsonpath-00' | |
9110301ARAZZO_ |
Error | when type is 'xpath', version must be one of: 'xpath-10', 'xpath-20', 'xpath-30', 'xpath-31' | |
9110302ARAZZO_ |
Error | when type is 'jsonpointer', version must be 'rfc6901' |
Request Body Object
| Rule | Severity | Message |
|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields |
9120100ARAZZO_ |
Error | contentType must be a string |
9120101ARAZZO_ |
Warning | Request body "contentType" should be a valid MIME type (e.g. "application/json"). |
9120200ARAZZO_ |
Error | replacements must be an array of Payload Replacement Objects |
Payload Replacement Object
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | |
9130100ARAZZO_ |
Error | should always have a 'target' | |
9130101ARAZZO_ |
Error | target must be a string (JSON Pointer or XPath Expression) | |
9130200ARAZZO_ |
Error | should always have a 'value' | |
9130300ARAZZO_ |
Error | targetSelectorType must be a string or an Expression Type Object | 1.1.0 |
9130301ARAZZO_ |
Error | targetSelectorType must be one of: 'jsonpointer', 'jsonpath', 'xpath', or an Expression Type Object | 1.1.0 |
Selector Object
Arazzo 1.1.0 only.
| Rule | Severity | Message | Only in |
|---|---|---|---|
15000NOT_ |
Error | Object includes not allowed fields | 1.1.0 |
9150101ARAZZO_ |
Error | context must be a string (Runtime Expression) | 1.1.0 |
9150201ARAZZO_ |
Error | selector must be a string | 1.1.0 |
9150301ARAZZO_ |
Error | type must be a string or an Expression Type Object | 1.1.0 |
9150302ARAZZO_ |
Error | type must be one of: 'jsonpointer', 'jsonpath', 'xpath', or an Expression Type Object | 1.1.0 |
Schema Object
JSON Schemas under workflow.inputs and components.inputs.
| Rule | Severity | Message |
|---|---|---|
10001SCHEMA_ |
Error | type must be one of allowed values |
10002SCHEMA_ |
Error | maxLength must be a non-negative integer |
10003SCHEMA_ |
Warning | maxLength has no effect on non strings |
10004SCHEMA_ |
Error | minLength must be a non-negative integer |
10005SCHEMA_ |
Warning | minLength has no effect on non strings |
10009SCHEMA_ |
Error | enum' value must be an array with unique values |
10010SCHEMA_ |
Error | multipleOf' value must be a number > 0 |
10011SCHEMA_ |
Error | pattern' value must be a string |
10014SCHEMA_ |
Error | 'maximum' value must be a number |
10015SCHEMA_ |
Error | 'minimum' value must be a number |
10016SCHEMA_ |
Error | 'exclusiveMaximum' value must be a number |
10017SCHEMA_ |
Error | 'exclusiveMinimum' value must be a number |
10018SCHEMA_ |
Error | items must be a schema or array of schemas |
10019SCHEMA_ |
Warning | items has no effect on non arrays |
10020SCHEMA_ |
Error | additionalItems must be a schema object or a boolean JSON schema |
10021SCHEMA_ |
Warning | additionalItems has no effect on non arrays |
10022SCHEMA_ |
Error | maxItems must be a non-negative integer |
10023SCHEMA_ |
Warning | maxItems has no effect on non arrays |
10024SCHEMA_ |
Error | minItems must be a non-negative integer |
10025SCHEMA_ |
Warning | minItems has no effect on non arrays |
10026SCHEMA_ |
Error | uniqueItems must be a boolean |
10027SCHEMA_ |
Warning | uniqueItems has no effect on non arrays |
10028SCHEMA_ |
Error | contains must be a schema object or a boolean JSON schema |
10029SCHEMA_ |
Warning | contains has no effect on non arrays |
10030SCHEMA_ |
Error | maxProperties must be a non-negative integer |
10031SCHEMA_ |
Warning | maxProperties has no effect on non objects |
10032SCHEMA_ |
Error | minProperties must be a non-negative integer |
10033SCHEMA_ |
Warning | minProperties has no effect on non objects |
10034SCHEMA_ |
Error | required must be an array of strings |
10035SCHEMA_ |
Warning | required has no effect on non objects |
10036SCHEMA_ |
Warning | required properties should be defined in `properties` when `additionalProperties` is false |
10037SCHEMA_ |
Error | properties members must be schemas |
10038SCHEMA_ |
Warning | properties has no effect on non objects |
10039SCHEMA_ |
Error | properties must be an object |
10040SCHEMA_ |
Error | patternProperties members must be schema objects or boolean JSON schemas |
10041SCHEMA_ |
Error | patternProperties keys must be valid regex |
10042SCHEMA_ |
Warning | patternProperties has no effect on non objects |
10043SCHEMA_ |
Error | patternProperties must be an object |
10044SCHEMA_ |
Error | additionalProperties must be a Schema or a Boolean |
10045SCHEMA_ |
Warning | additionalProperties has no effect on non objects |
10046SCHEMA_ |
Error | propertyNames must be a schema object or a boolean JSON schema |
10047SCHEMA_ |
Warning | propertyNames has no effect on non objects |
10048SCHEMA_ |
Error | "if" must be a schema object or a boolean JSON schema |
10049SCHEMA_ |
Warning | "if" has no effect without a "then" |
10050SCHEMA_ |
Error | "else" must be a schema object or a boolean JSON schema |
10051SCHEMA_ |
Warning | "else" has no effect without a "if" |
10052SCHEMA_ |
Error | "then" must be a schema object or a boolean JSON schema |
10053SCHEMA_ |
Warning | "then" has no effect without a "if" |
10054SCHEMA_ |
Error | allOf must be a non-empty array of schema objects or boolean JSON schemas |
10055SCHEMA_ |
Error | oneOf must be a non-empty array of schema objects or boolean JSON schemas |
10056SCHEMA_ |
Error | anyOf must be a non-empty array of schema objects or boolean JSON schemas |
10057SCHEMA_ |
Error | "not" must be a schema object or a boolean JSON schema |
10058SCHEMA_ |
Error | 'format' value must be a string |
10063SCHEMA_ |
Error | title' value must be a string |
10064SCHEMA_ |
Error | description' value must be a string |
10065SCHEMA_ |
Error | readOnly must be a boolean |
10066SCHEMA_ |
Error | writeOnly must be a boolean |
10067SCHEMA_ |
Error | examples must be an array |
10072SCHEMA_ |
Hint | Schema does not include any Schema Object keywords |
10075SCHEMA_ |
Error | Schemas with "type: array" require a sibling "items" field |
10076SCHEMA_ |
Error | deprecated must be a boolean |
8030100JSON_ |
Error | $id value must be a valid URI-reference |
8030200JSON_ |
Error | The value of $schema keyword MUST be a URI [RFC3986] containing a scheme |
8030300JSON_ |
Error | The value of the "$ref" keyword MUST be a string which is a URI-Reference. |
8030400JSON_ |
Error | $comment value must be a string |
9020600ARAZZO_ |
Error | Markdown title must not contain "<script>" tags. |
9020600ARAZZO_ |
Error | Markdown description must not contain "<script>" tags. |
Supported versions
Both JSON and YAML are accepted for every version. The format is detected from the content, not the file extension.