Skip to main content

apiome contract

Global options such as --base-url, --tenant and --json go before the command — see CLI reference. Exit codes are listed in Exit codes.

apiome contract​

Compile and inspect executable contract suites for a version.

apiome contract [OPTIONS] COMMAND [ARGS]...

Subcommands: suite.

apiome contract suite​

Compile a contract suite (POST /v1/tenants/{tenant}/contracts/{ref}/suite).

Prints a summary, or the whole manifest with the global --json flag. Exits non-zero when the version yields no suite, or when the digest does not match the manifest's own bytes.

apiome contract suite [OPTIONS]

Options

OptionTypeDefaultRequiredDescription
--projecttextyesProject slug or UUID (or Catalog item slug/UUID with --kind catalog).
--versiontextyesVersion label, revision UUID, or 'latest'.
--kindtextprojectWhich surface the artifact lives on: project (default) or catalog.
--seedinteger range0Seed for generated values. The same version and seed give the same suite.
--examples / --no-examplesflag--examplesCompile the examples declared in the source document (on by default).
--generated / --no-generatedflag--generatedCompile schema-valid generated bodies (on by default).
--negative / --no-negativeflag--negativeCompile the negative cases a contract needs to be worth running (on by default).
--operationtext (repeatable)Restrict to this operation key (repeatable), e.g. 'GET /pets/{petId}'.
--max-operationsinteger rangeCap on compiled operations. Truncation is reported as a finding.
--outpathWrite the manifest's canonical bytes to this file (the bytes the digest covers).