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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_slug | path | string | yes | URL-safe tenant slug that scopes the request. |
accept | header | string or null | no | Requested response content type (Accept header). |
authorization | header | string or null | no | JWT bearer token for authenticated access (Authorization: Bearer <token>). |
X-API-Key | header | string or null | no | Tenant-scoped API key used as an alternative to JWT bearer authentication. |
Request body (required)
Request body for post classified diff.
application/json—ClassifiedDiffRequest
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Classified JSON by default, or CTG-1.3 markdown when Accept: text/markdown (or text/md) is sent. | application/json ClassifiedDiffResponse; text/markdown string |
| 422 | Validation Error | application/json HTTPValidationError |
Schemas used
ClassifiedDiffRequest
Request body for classified diff: stored base vs stored or inline head.
| Property | Type | Required | Description |
|---|---|---|---|
base | ClassifiedDiffStoredRef | yes | Stored baseline revision (published contract / older side). |
head | ClassifiedDiffStoredRef or ClassifiedDiffInlineHead | yes | Head side: either another stored {project, version} or {inline} candidate document text. |
consumers | boolean | no | Include the CTG-4.2 per-consumer analysis for the base project's registered consumers. Requires consumer_contracts:view. |
blastRadius | boolean | no | Annotate 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. |
mode | string or null | no | Compatibility 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. |
transitive | boolean or null | no | Also 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. |
category | string or null | no | buf 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.
| Property | Type | Required | Description |
|---|---|---|---|
changes | array of ClassifiedDiffChangeOut | no | Changes. |
counts | map of integer | no | Counts. |
maxSeverity | string or null | no | Max Severity. |
base | ClassifiedDiffResolvedStored | yes | Base. |
head | ClassifiedDiffHeadMeta | yes | Head. |
consumers | ConsumerImpactReport or null | no | CTG-4.2 per-consumer verdicts, present only when consumers: true was sent. |
blastRadius | BlastRadiusDiffMeta or null | no | With blastRadius: true: how many breaking changes were annotated. Absent otherwise. |
evaluatedUnder | EvaluatedUnderOut | yes | What 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.
| Property | Type | Required | Description |
|---|---|---|---|
detail | array of ValidationError | no | Detail. |