Skip to main content

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

ArgumentTypeRequiredDescription
REFtextyesPublished version by slugs, e.g. acme-corp/payments-api/2.1.0.

Options

OptionTypeDefaultRequiredDescription
--classtextDownload only this class's workflows (the per-class route).
--formattextyamljson or yaml (default yaml, the usual form for Arazzo).
--output, -otext-File to write, or - for stdout (default).
--expect-sha256textFail 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

ArgumentTypeRequiredDescription
PROJECT_REFtextyesProject by slugs, e.g. acme-corp/payments-api.
BASE_VERSIONtextyesBase (older) published version, e.g. 2.0.0.
HEAD_VERSIONtextyesHead (newer) published version, e.g. 2.1.0.

Options

OptionTypeDefaultRequiredDescription
--formattextsummarysummary (default), unified, sarif or json. Global --json means json.
--scopetextallCompare paths, schemas or all (default).
--ignoretext (repeatable)Drop a kind of change (repeatable): description-only.
--exit-codeflagGit-like: exit 1 if there are differences, 0 if identical.
--output, -otext-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

ArgumentTypeRequiredDescription
REFtextyesPublished version by slugs, e.g. acme-corp/payments-api/2.1.0.

Options

OptionTypeDefaultRequiredDescription
--classtextDownload only this class's schema (the per-class route).
--formattextjsonjson (default) or yaml.
--output, -otext-File to write, or - for stdout (default).
--expect-sha256textFail 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

OptionTypeDefaultRequiredDescription
--schematextyesPath-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'.
--payloadpath (repeatable)Payload file to validate (repeatable). JSON by default; *.xml is sent as XML.
--generate / --no-generateflag--no-generateRun the generated set: valid instances plus single-constraint mutants, each verified server-side. Default: off, except in --suite mode where it is on.
--suitepathSuite 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.
--seedinteger range0Synthesis seed: the same schema and seed generate byte-identical payloads.
--junitpathWrite the run as JUnit XML to this file ('-' for stdout).