apiome schema
Global options such as --base-url, --tenant and --json go before the command — see CLI reference. Exit codes are listed in Exit codes.
apiome schema
Download and diff published specs; test payloads against schemas.
apiome schema [OPTIONS] COMMAND [ARGS]...
Subcommands: arazzo, diff, json, test.
apiome schema arazzo
Download a published version's Arazzo workflows.
Fetches GET /v1/arazzo/{tenant}/{project}/{version}, or the per-class route with --class, and writes the document byte for byte as served. A summary with its sha256 checksum goes to stderr (with --json, a JSON line: on stdout when --output is a file, on stderr when the document goes to stdout).
Exit codes: 0 written; 6 --expect-sha256 did not match (nothing written); 2 bad usage, or the version or class is unknown, unpublished, or private without an API key; 1 a transport or server error.
apiome schema arazzo [OPTIONS] TENANT/PROJECT/VERSION
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
REF | text | yes | Published version by slugs, e.g. acme-corp/payments-api/2.1.0. |
Options
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
--class | text | Download only this class's workflows (the per-class route). | ||
--format | text | yaml | json or yaml (default yaml, the usual form for Arazzo). | |
--output, -o | text | - | File to write, or - for stdout (default). | |
--expect-sha256 | text | Fail with exit 6, writing nothing, unless the document has this SHA-256. |
apiome schema diff
Compare two published versions: paths, classes and properties.
Both sides are fetched from the public GET /v1/schema/{tenant}/{project}/{version} (no login; APIOME_API_KEY is sent for private versions) and compared in the CLI. A version typed as v2.1.0 that is not found is retried as 2.1.0. This lists what changed; to grade changes as breaking, use apiome versions compatibility.
Exit codes: 0 done (with --exit-code: identical); 1 with --exit-code, differences found; 2 bad usage, or a version is unknown, unpublished or private without a key. Without --exit-code a transport or server error exits 1; with it, 2, so 1 always means "differs".
apiome schema diff [OPTIONS] TENANT/PROJECT V1 V2
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
PROJECT_REF | text | yes | Project by slugs, e.g. acme-corp/payments-api. |
BASE_VERSION | text | yes | Base (older) published version, e.g. 2.0.0. |
HEAD_VERSION | text | yes | Head (newer) published version, e.g. 2.1.0. |
Options
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
--format | text | summary | summary (default), unified, sarif or json. Global --json means json. | |
--scope | text | all | Compare paths, schemas or all (default). | |
--ignore | text (repeatable) | Drop a kind of change (repeatable): description-only. | ||
--exit-code | flag | Git-like: exit 1 if there are differences, 0 if identical. | ||
--output, -o | text | - | File to write, or - for stdout (default). |
apiome schema json
Download a published version's JSON Schema.
Fetches GET /v1/json/{tenant}/{project}/{version}, or the per-class route with --class, and streams the document byte for byte as served (no transformation), so it pipes straight into code generators. A summary with its sha256 checksum goes to stderr (with --json, a JSON line: on stdout when --output is a file, on stderr when the document goes to stdout).
Exit codes: 0 written; 6 --expect-sha256 did not match (nothing written); 2 bad usage, or the version or class is unknown, unpublished, or private without an API key; 1 a transport or server error.
apiome schema json [OPTIONS] TENANT/PROJECT/VERSION
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
REF | text | yes | Published version by slugs, e.g. acme-corp/payments-api/2.1.0. |
Options
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
--class | text | Download only this class's schema (the per-class route). | ||
--format | text | json | json (default) or yaml. | |
--output, -o | text | - | File to write, or - for stdout (default). | |
--expect-sha256 | text | Fail with exit 6, writing nothing, unless the document has this SHA-256. |
apiome schema test
Run schema tests server-side and gate on the verdicts.
Exit codes: 0 every case passed; 6 at least one case failed (a payload's verdict did not match its expectation, or a mutant did not violate its intended constraint); 1 a case could not be checked at all, a transport/server fault, or an empty run; 2 bad usage, rejected credentials, or a schema reference the server refused (any 4xx).
apiome schema test [OPTIONS]
Options
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
--schema | text | yes | Path-shaped schema reference: project/{slug}/{version}/{type}, catalog/{item}/{version}/{type}, or registry/{namespace}/{name}; the trailing /{type} segment is optional. {version} is a version label, a revision id, or 'latest'. | |
--payload | path (repeatable) | Payload file to validate (repeatable). JSON by default; *.xml is sent as XML. | ||
--generate / --no-generate | flag | --no-generate | Run the generated set: valid instances plus single-constraint mutants, each verified server-side. Default: off, except in --suite mode where it is on. | |
--suite | path | Suite mode: a directory of saved payload files (all expected valid), or an IXH-1.1 corpus manifest whose 'instance-payload' entries are run with expectations from validity_class. Also runs the generated set unless --no-generate. | ||
--seed | integer range | 0 | Synthesis seed: the same schema and seed generate byte-identical payloads. | |
--junit | path | Write the run as JUnit XML to this file ('-' for stdout). |