Skip to main content

Classified diff

Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: classified-diff · 1 operation

POST /v1/diff/{tenant_slug}/classified​

Post Classified Diff

Classify changes between a stored base revision and a stored or inline head.

Supports stored-vs-stored (head: {project, version}) and inline-vs-stored (head: {inline}) for the CI PR use case. Inline documents larger than 10MB UTF-8 are rejected with 413.

Default response is JSON (:class:ClassifiedDiffResponse). When Accept includes text/markdown or text/md, returns the CTG-1.3 markdown changelog for the same classification (used by apiome diff --format md).

With consumers: true the response also carries the CTG-4.2 per-consumer analysis — consumers on the body, and the touched handles on each change — and the markdown gains a "Consumer impact" section. Consumers are those registered against the base project, since that is the published contract they declared against; the flag needs consumer_contracts:view.

With blastRadius: true each breaking change also carries blastRadius — consumers affected, their owner teams and verification runs invalidated, from the CDG-3.3 blast radius of the change against the base project and revision — and each breaking row of the markdown gains a "Blast radius:" line. The flag needs projects:view.

Stored OpenAPI sides are read from the rendered document cache (COA-5.6); the X-Apiome-Document-Cache header reports hit or miss for base, head and, on a transitive comparison, prior. It is absent when the sides were compared as canonical models.

Operation id: post_classified_diff_v1_diff__tenant_slug__classified_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
acceptheaderstring or nullnoRequested response content type (Accept header).
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for post classified diff.

Responses

StatusDescriptionBody
200Classified JSON by default, or CTG-1.3 markdown when Accept: text/markdown (or text/md) is sent.application/json ClassifiedDiffResponse; text/markdown string
422Validation Errorapplication/json HTTPValidationError

Schemas used​

ClassifiedDiffRequest​

Request body for classified diff: stored base vs stored or inline head.

PropertyTypeRequiredDescription
baseClassifiedDiffStoredRefyesStored baseline revision (published contract / older side).
headClassifiedDiffStoredRef or ClassifiedDiffInlineHeadyesHead side: either another stored {project, version} or {inline} candidate document text.
consumersbooleannoInclude the CTG-4.2 per-consumer analysis for the base project's registered consumers. Requires consumer_contracts:view.
blastRadiusbooleannoAnnotate each breaking change with its CDG-3.3 blast radius against the base project: consumers affected, their owner teams and the verification runs invalidated. Requires projects:view.
modestring or nullnoCompatibility mode (XPC-4.5): BACKWARD, FORWARD, FULL or NONE, any case. A _TRANSITIVE name (FULL_TRANSITIVE) also sets transitive. Omit to use the base project's style-guide policy.
transitiveboolean or nullnoAlso compare the head against every earlier revision of the base, not only the base (XPC-4.5). Omit to use the base project's policy.
categorystring or nullnobuf breaking category Protobuf changes are graded at (XPC-4.5): WIRE, WIRE_JSON, PACKAGE or FILE. Omit to use the base project's policy.

ClassifiedDiffResponse​

Classified change list with summary counts, max severity, and resolved sides.

PropertyTypeRequiredDescription
changesarray of ClassifiedDiffChangeOutnoChanges.
countsmap of integernoCounts.
maxSeveritystring or nullnoMax Severity.
baseClassifiedDiffResolvedStoredyesBase.
headClassifiedDiffHeadMetayesHead.
consumersConsumerImpactReport or nullnoCTG-4.2 per-consumer verdicts, present only when consumers: true was sent.
blastRadiusBlastRadiusDiffMeta or nullnoWith blastRadius: true: how many breaking changes were annotated. Absent otherwise.
evaluatedUnderEvaluatedUnderOutyesWhat the changes were graded under: mode, transitivity, Protobuf category, the formats compared, whether the mode was applied, the ruleset and the revisions compared (XPC-4.5).

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.