Skip to main content

Classified diff

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — 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.

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.

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.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.