Skip to main content

Style guides

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: style-guides · 23 operations

GET /v1/style-guides/{tenant_slug}​

List Style Guides

List the tenant's style guides with list-view rollups (rules on, assignments).

Builtin guide first, then by name; one page of at most limit guides (1,000 at most). Pass the page's nextCursor as cursor while hasMore is true (#7196).

Args: tenant_slug: The tenant in the URL. limit: Page size. cursor: Where the page starts (nextCursor of the previous page). auth_data: The authenticated principal.

Returns: The page of guides and whether another follows.

Raises: HTTPException: 400 for a malformed cursor.

Operation id: list_style_guides_v1_style_guides__tenant_slug__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
limitqueryintegernoPage size. At most 1000.
cursorquerystring or nullnoOpaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page.
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.

Responses

StatusDescriptionBody
200Successful response for list style guides.application/json StyleGuideListResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/style-guides/{tenant_slug}​

Create Style Guide

Create a custom guide; sourceGuideId copies that guide's rules (duplicate).

Operation id: create_style_guide_v1_style_guides__tenant_slug__post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
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 create style guide.

Responses

StatusDescriptionBody
201Successful response for create style guide.application/json StyleGuideOut
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/style-guides/{tenant_slug}/assignments/projects/{project_id}​

Unassign Project

Remove a project's guide assignment; it falls back to the tenant default.

Operation id: unassign_project_v1_style_guides__tenant_slug__assignments_projects__project_id__delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_idpathstringyesProject identifier that scopes the request.
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.

Responses

StatusDescriptionBody
200Successful response for unassign project.application/json map of string
422Validation Errorapplication/json HTTPValidationError

POST /v1/style-guides/{tenant_slug}/import​

Import Style Guide

Create a custom guide from an apiome.style-guide export document (#1747).

The document comes from content (a paste or an uploaded file's text) or url (fetched through the SSRF guard). It is validated in full before anything is written, so a malformed document creates nothing. Built-in rule ids this instance does not register are reported in skipped rather than failing the import. name overrides the document's guide.name — use it to import next to an existing guide of the same name.

Operation id: import_style_guide_v1_style_guides__tenant_slug__import_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
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 import style guide.

Responses

StatusDescriptionBody
201Successful response for import style guide.application/json StyleGuideImportResponse
400The url could not be fetched or was blocked by the SSRF guard.—
409A guide with the resulting name already exists (detail.code).—
422Malformed document: detail.message explains the problem and detail.pointer points at the offending node.—

PATCH /v1/style-guides/{tenant_slug}/{guide_id}​

Update Style Guide

Rename / re-describe a custom guide (the builtin guide is read-only).

Operation id: update_style_guide_v1_style_guides__tenant_slug___guide_id__patch

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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 update style guide.

Responses

StatusDescriptionBody
200Successful response for update style guide.application/json StyleGuideOut
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/style-guides/{tenant_slug}/{guide_id}​

Delete Style Guide

Delete a custom guide; its assignments cascade and the affected projects fall back to the tenant default. Deleting the current default promotes the builtin guide.

Operation id: delete_style_guide_v1_style_guides__tenant_slug___guide_id__delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
200Successful response for delete style guide.application/json map of string
422Validation Errorapplication/json HTTPValidationError

PUT /v1/style-guides/{tenant_slug}/{guide_id}/assignments/projects/{project_id}​

Assign Project

Assign a guide to one project (replaces the project's previous assignment).

A project-level assignment wins over the tenant default in the GOV-1.4 resolution order, so the project's next lint run scores under this guide.

Operation id: assign_project_v1_style_guides__tenant_slug___guide_id__assignments_projects__project_id__put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
project_idpathstringyesProject identifier that scopes the request.
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.

Responses

StatusDescriptionBody
200Successful response for assign project.application/json map of string
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/custom-rules​

Get Style Guide Custom Rules

The guide's custom-rules YAML document (GOV-2.3, #4435).

Returns the Spectral-compatible YAML the custom-rules tab edits. Readable by any tenant member — the tab renders read-only for non-admins and the built-in guide.

Operation id: get_style_guide_custom_rules_v1_style_guides__tenant_slug___guide_id__custom_rules_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
200Successful response for get style guide custom rules.application/json StyleGuideCustomRulesResponse
422Validation Errorapplication/json HTTPValidationError

PUT /v1/style-guides/{tenant_slug}/{guide_id}/custom-rules​

Put Style Guide Custom Rules

Replace the guide's custom-rule rows from YAML (GOV-2.3, #4435).

Strictly validates the document (same contract as POST /v1/lint/custom-rules/validate, but rules: {} clears every custom rule). Built-in rows are untouched. Malformed YAML returns HTTP 422 with a pointer for inline editor markers.

Operation id: put_style_guide_custom_rules_v1_style_guides__tenant_slug___guide_id__custom_rules_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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 put style guide custom rules.

Responses

StatusDescriptionBody
200Successful response for put style guide custom rules.application/json StyleGuideCustomRulesResponse
422Malformed guide: detail.message explains the problem and detail.pointer points at the offending YAML node.—

POST /v1/style-guides/{tenant_slug}/{guide_id}/custom-rules/preview​

Preview Style Guide Custom Rules

Dry-run draft custom rules against a project revision (GOV-2.3, #4435).

Parses the draft YAML, reconstructs the revision's OpenAPI document, evaluates only the custom rules, and returns their violations — nothing is persisted.

Operation id: preview_style_guide_custom_rules_v1_style_guides__tenant_slug___guide_id__custom_rules_preview_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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 preview style guide custom rules.

Responses

StatusDescriptionBody
200Successful response for preview style guide custom rules.application/json StyleGuideCustomRulesPreviewResponse
422Malformed draft YAML: detail.message + detail.pointer.—

PUT /v1/style-guides/{tenant_slug}/{guide_id}/default​

Set Tenant Default

Make a guide the tenant default — what every project without its own assignment lints under from the next run onward.

Operation id: set_tenant_default_v1_style_guides__tenant_slug___guide_id__default_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
200Successful response for set tenant default.application/json StyleGuideOut
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/export​

Export Style Guide

Download a guide's rule configuration as an apiome.style-guide document (#1747).

The document carries the guide's name, description, external lint profile, built-in rule overrides and custom rules — exactly what POST …/import reads back. Readable by any tenant member, and works for the read-only built-in guide too. The response sets Content-Disposition so browsers save it as <guide-name>.style-guide.json.

Operation id: export_style_guide_v1_style_guides__tenant_slug___guide_id__export_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
200Successful response for export style guide.application/json StyleGuideExportDocument
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/ladder​

Get Style Guide Ladder

Return the guide's maturity ladder, or ladder: null when it has none (GVM-1.1).

Readable by any tenant member. For the built-in Apiome Recommended guide the response also carries the default Bronze / Silver / Gold ladder as a read-only template.

Operation id: get_style_guide_ladder_v1_style_guides__tenant_slug___guide_id__ladder_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
200Successful response for get style guide ladder.application/json StyleGuideLadderResponse
422Validation Errorapplication/json HTTPValidationError

PUT /v1/style-guides/{tenant_slug}/{guide_id}/ladder​

Put Style Guide Ladder

Create or replace the guide's maturity ladder (GVM-1.1, #5854). Tenant admin only.

The body is the complete ladder, levels lowest first. Refused with 422 and a detail.code / detail.pointer when a level relaxes a lower one (ladder-level-not-cumulative, naming the level and rule), a rule id is not in the registry (ladder-unknown-rule), an axis is not an axis key (ladder-unknown-axis), or the ladder is otherwise malformed. The built-in guide is read-only (409).

A successful save appends a ladder_changed revision, snapshots a new policy pack (both freeze the ladder, so their fingerprints move) and audits style_guide.ladder_changed. Saving an identical ladder changes nothing. A ladder without the guide's requiredPublishLevel is refused (422 ladder-required-level-removed, GVM-1.3): clear or change the required level first.

Operation id: put_style_guide_ladder_v1_style_guides__tenant_slug___guide_id__ladder_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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 put style guide ladder.

Responses

StatusDescriptionBody
200Successful response for put style guide ladder.application/json StyleGuideLadderResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/policy​

Get Style Guide Policy Settings

Return draft policy gate settings for a style guide (CLX-1.3, #4850).

Operation id: get_style_guide_policy_settings_v1_style_guides__tenant_slug___guide_id__policy_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
200Successful response for get style guide policy settings.application/json StyleGuidePolicySettingsOut
422Validation Errorapplication/json HTTPValidationError

PUT /v1/style-guides/{tenant_slug}/{guide_id}/policy​

Put Style Guide Policy Settings

Update draft policy gates and optionally snapshot a policy pack (CLX-1.3, #4850).

Also carries the CTG-3.4 (#4478) breaking-publish guardrail level and the COL-2.3 (#4519) approval policy, both of which the publish flow reads through the same guide-resolution chain.

DCW-3.4 (private-suite#2364) adds the component-library policy: ordered componentApprovalStages (validated strictly — a bad stage is a 422, never silently dropped) and componentDeprecationNoticeDays.

requiredReviewerRole distinguishes omitted from null: omitting it leaves the stored role alone, sending null clears it. requiredPublishLevel (GVM-1.3, #5856) follows the same rule and must name a level of the guide's ladder (422 required-publish-level-unknown otherwise); it is frozen into the next policy pack. Every other field keeps the omit-to-leave-unchanged rule the endpoint has always had.

Operation id: put_style_guide_policy_settings_v1_style_guides__tenant_slug___guide_id__policy_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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 put style guide policy settings.

Responses

StatusDescriptionBody
200Successful response for put style guide policy settings.application/json StyleGuidePolicySettingsOut
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/policy-versions​

List Style Guide Policy Versions

List immutable policy pack versions for a style guide, newest first (CLX-1.3, #4850).

One page of at most limit versions (200 at most); pass the page's nextCursor as cursor while hasMore is true (#7196).

Args: tenant_slug: The tenant in the URL. guide_id: The guide whose policy versions are read. limit: Page size. cursor: Where the page starts (nextCursor of the previous page). auth_data: The authenticated principal.

Returns: The page of policy versions and whether another follows.

Raises: HTTPException: 400 for a malformed cursor; 404 when the guide is unknown.

Operation id: list_style_guide_policy_versions_v1_style_guides__tenant_slug___guide_id__policy_versions_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
limitqueryintegernoPage size. At most 200.
cursorquerystring or nullnoOpaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page.
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.

Responses

StatusDescriptionBody
200Successful response for list style guide policy versions.application/json StyleGuidePolicyVersionListResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/style-guides/{tenant_slug}/{guide_id}/policy-versions​

Publish Style Guide Policy Version

Snapshot the live guide into a new immutable policy pack (CLX-1.3, #4850).

Operation id: publish_style_guide_policy_version_v1_style_guides__tenant_slug___guide_id__policy_versions_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
201Successful response for publish style guide policy version.application/json StyleGuidePolicyVersionOut
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/policy-versions/{policy_version_id}​

Get Style Guide Policy Version

Fetch one policy pack version for a style guide (CLX-1.3, #4850).

Operation id: get_style_guide_policy_version_v1_style_guides__tenant_slug___guide_id__policy_versions__policy_version_id__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
policy_version_idpathstringyesPath parameter identifying the policy version id segment.
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.

Responses

StatusDescriptionBody
200Successful response for get style guide policy version.application/json StyleGuidePolicyVersionOut
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/revisions​

List Style Guide Revisions

The guide's immutable revision history, newest first (GOV-1.6, #4432).

One entry per edit — create, rename, rule-catalog save, custom-rule save, policy-gate change — with the change kind, the actor, and the fingerprints a lint result pins to. Saves that changed nothing are not entries: the history is real changes only.

Reading self-heals a guide with no history yet (created before GOV-1.6, or seeded by the V159 migration): its current state is captured as revision 1 rather than showing an empty list for a guide that demonstrably exists. Readable by any tenant member — compliance review is not an admin-only activity.

One page of at most limit revisions (500 at most; a larger limit is now a 422 rather than silently clamped). Pass the page's nextCursor as cursor while hasMore is true (#7196).

Args: tenant_slug: The tenant in the URL. guide_id: The guide whose history is read. limit: Page size. cursor: Where the page starts (nextCursor of the previous page). auth_data: The authenticated principal.

Returns: The page of revisions and whether another follows.

Raises: HTTPException: 400 for a malformed cursor; 404 when the guide is unknown.

Operation id: list_style_guide_revisions_v1_style_guides__tenant_slug___guide_id__revisions_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
limitqueryintegernoPage size. At most 500.
cursorquerystring or nullnoOpaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page.
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.

Responses

StatusDescriptionBody
200Successful response for list style guide revisions.application/json StyleGuideRevisionListResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/revisions/{revision_id}​

Get Style Guide Revision

One immutable revision with the rules and policy gates it froze (GOV-1.6, #4432).

This is what makes a past lint result defendable: a report carries guideRevisionId, and this endpoint returns exactly the ruleset that produced it — including custom rule definitions — no matter how the live guide has changed since.

Operation id: get_style_guide_revision_v1_style_guides__tenant_slug___guide_id__revisions__revision_id__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
revision_idpathstringyesRevision UUID (versions.id).
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.

Responses

StatusDescriptionBody
200Successful response for get style guide revision.application/json StyleGuideRevisionDetailOut
422Validation Errorapplication/json HTTPValidationError

GET /v1/style-guides/{tenant_slug}/{guide_id}/rules​

Get Style Guide Rules

The guide's built-in rule catalog view (GOV-2.2, #4434).

Every GOV-1.2 registry rule with its category, default severity and rationale, merged with this guide's style_guide_rules state (enabled + severity override). Readable by any tenant member — the rule catalog tab renders read-only for non-admins.

Operation id: get_style_guide_rules_v1_style_guides__tenant_slug___guide_id__rules_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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.

Responses

StatusDescriptionBody
200Successful response for get style guide rules.application/json StyleGuideRulesResponse
422Validation Errorapplication/json HTTPValidationError

PUT /v1/style-guides/{tenant_slug}/{guide_id}/rules​

Put Style Guide Rules

Replace the guide's built-in rule rows (GOV-2.2, #4434) — the catalog tab's save.

The body is the guide's complete desired built-in rule state (at most one entry per registered rule id; unknown ids are rejected). Custom-rule rows are untouched. The next lint run under the guide picks the new rows up via GOV-1.4's content-addressed compile.

Operation id: put_style_guide_rules_v1_style_guides__tenant_slug___guide_id__rules_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
guide_idpathstringyesStyle guide identifier.
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 put style guide rules.

Responses

StatusDescriptionBody
200Successful response for put style guide rules.application/json StyleGuideRulesResponse
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

StyleGuideCreateRequest​

Create a custom style guide, optionally copying an existing guide's rules (GOV-2.1).

source_guide_id implements both duplicate flows: duplicating a custom guide and "start from Recommended" (duplicating the read-only builtin guide as an editable copy).

PropertyTypeRequiredDescription
namestringyesGuide display name (unique per tenant).
descriptionstring or nullnoOptional free-text description.
sourceGuideIdstring or nullnoGuide (same tenant) whose rule rows are copied into the new guide.
externalLintProfilestring or nullnoCLX-2.2 profile: baseline | tenant_guide | strict (default baseline).

StyleGuideCustomRulesPreviewRequest​

Dry-run custom-rule evaluation against a project revision (GOV-2.3, #4435).

PropertyTypeRequiredDescription
yamlstringyesDraft custom-rules YAML to evaluate (not persisted).
projectIdstringyesThe project owning the revision to lint against.
versionRecordIdstringyesThe revision (versions.id) to lint against.

StyleGuideCustomRulesPreviewResponse​

Live violations from evaluating draft custom rules (GOV-2.3, #4435).

PropertyTypeRequiredDescription
projectIdstringyesProject ID.
versionRecordIdstringyesVersion Record ID.
versionIdstringyesVersion ID.
countintegeryesNumber of violations returned.
findingsarray of LintFindingOutyesCustom-rule violations, sorted deterministically.
ruleErrorsmap of stringnoRule id -> sandbox abort reason for rules that could not be evaluated.

StyleGuideCustomRulesPutRequest​

Replace a guide's custom-rule rows from YAML (GOV-2.3, #4435).

PropertyTypeRequiredDescription
yamlstringyesThe style-guide YAML document (rules.<id>: {description, severity, given, then}).

StyleGuideCustomRulesResponse​

A guide's custom-rules YAML document (GOV-2.3, #4435).

PropertyTypeRequiredDescription
guideIdstringyesThe guide's id.
guideNamestringyesThe guide's display name.
sourcestringyesbuiltin (read-only, seeded) | custom (tenant-authored).
yamlstringyesThe Spectral-compatible custom-rules YAML document.
ruleCountintegeryesNumber of custom rules in the document (0 for rules: {}).

StyleGuideExportDocument​

A portable style-guide rule configuration (#1747) — the export and import format.

Carries the guide's name, description and external lint profile, its built-in rule overrides and its custom rules. Policy gates, assignments and revision history are not included: they are tenant-specific rather than rule configuration.

PropertyTypeRequiredDescription
formatstringyesAlways apiome.style-guide.
formatVersionintegeryesDocument version (currently 1).
exportedAtstringyesISO-8601 time the document was written.
guideStyleGuideExportGuideOutyesGuide.
builtinRulesarray of StyleGuideExportBuiltinRuleOutyesBuilt-in rule overrides, sorted by ruleId (absent rules are disabled).
customRulesarray of StyleGuideExportCustomRuleOutyesCustom rules in stored order.

StyleGuideImportRequest​

Create a style guide from an export document (#1747): the JSON, or a URL to fetch it.

Exactly one of content (a pasted document or an uploaded file's text) and url must be supplied.

PropertyTypeRequiredDescription
contentstring or nullnoThe export document's JSON text (paste or uploaded file).
urlstring or nullnohttp/https URL of an export document to fetch (SSRF-guarded).
namestring or nullnoName for the new guide; defaults to the document's guide.name.
sourceLabelstring or nullnoHuman label for the source (e.g. the uploaded filename), echoed back.

StyleGuideImportResponse​

The guide an import created, with what it stored and what it skipped (#1747).

PropertyTypeRequiredDescription
guideStyleGuideOutyesThe newly created custom guide.
sourceLabelstring or nullnoThe source label (the request's, or the fetched URL).
builtinRuleCountintegeryesBuilt-in rule rows stored.
customRuleCountintegeryesCustom rules stored.
skippedarray of StyleGuideImportSkippedRuleOutnoEntries not stored — e.g. built-in rule ids this instance does not register.

StyleGuideLadderModelInput​

A style guide's ordered maturity ladder, lowest level first (GVM-1.1, #5854).

PropertyTypeRequiredDescription
namestringyesLadder display name.
levelsarray of StyleGuideLadderLevelModelyesOrdered levels, lowest first. An empty ladder is refused (ladder-empty).

StyleGuideLadderResponse​

GET|PUT /v1/style-guides/{tenant}/{guideId}/ladder (GVM-1.1, #5854).

PropertyTypeRequiredDescription
guideIdstringyesGuide ID.
ladderStyleGuideLadderModelOutput or nullnoThe guide's ladder, or null when it has none. A guide without a ladder has no levels to meet — it is never reported as meeting every level.
contentFingerprintstring or nullnoSHA-256 of the canonical ladder; null when there is no ladder.
updatedAtstring or nullnoUpdated At.
readOnlybooleannoTrue for the built-in guide, whose ladder cannot be set.
templateStyleGuideLadderModelOutput or nullnoThe default Bronze / Silver / Gold ladder, returned for the built-in Apiome Recommended guide only. A read-only template: it is not applied to any tenant.

StyleGuideListResponse​

The tenant's style guides for the Control Panel list view (GOV-2.1, #4433).

PropertyTypeRequiredDescription
guidesarray of StyleGuideOutyesOne page of the tenant's guides, builtin first then by name.
countintegeryesNumber of guides in this page (== len(guides)).
hasMorebooleannoWhether another page exists.
nextCursorstring or nullnoPass as cursor to read the next page; null on the last page.

StyleGuideOut​

One tenant style guide with its list-view rollups (GOV-2.1, #4433).

source == 'builtin' marks the seeded read-only "Apiome Recommended" guide: it can be duplicated and assigned but never edited or deleted. is_default is the tenant-default badge; tenant_assigned reports an explicit tenant-wide assignment row (which resolves ahead of the default flag in the GOV-1.4 chain — the API keeps the two in sync).

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
namestringyesHuman-readable name.
descriptionstring or nullnoFree-text description.
sourcestringyesbuiltin (read-only, seeded) | custom (tenant-authored).
isDefaultbooleanyesTrue for the tenant's default guide (the list view's default badge).
ruleCountintegeryesTotal style_guide_rules rows on the guide (enabled and disabled).
enabledRuleCountintegeryesRules currently enabled — the list view's 'rules on' column.
tenantAssignedbooleanyesTrue when an explicit tenant-wide assignment row points at this guide.
projectAssignmentsarray of StyleGuideProjectAssignmentOutnoProjects explicitly assigned to this guide, sorted by project name.
externalLintProfilestringnoCLX-2.2 OpenAPI external validation pack profile: baseline | tenant_guide | strict.
createdAtstring (date-time) or nullnoCreated At.
updatedAtstring (date-time) or nullnoUpdated At.

StyleGuidePolicySettingsOut​

Draft policy gate settings on a live style guide (CLX-1.3, #4850).

PropertyTypeRequiredDescription
guideIdstringyesGuide ID.
axisGatesobjectnoPer-axis min grade/score floors, e.g. {quality: {minGrade: B}}.
requiredCoveragearray of stringnoRequired Coverage.
ciOutcomesStyleGuideCiOutcomesOutnoCi Outcomes.
breakingPublishPolicyenum "off", "warn", "block"noGuardrail applied when a publish is breaking without a semver major bump (CTG-3.4): off, warn (default), or block.
requiredApprovalsintegernoReview approvals a draft must carry before it can be published (COL-2.3); 0 (default) disables the approval gate.
requiredReviewerRolestring or nullnoRole slug at least one of those approvals must come from (COL-2.3); null means any approver counts.
componentApprovalStagesarray of ComponentApprovalStageModelnoOrdered approval stages a component-library revision must pass before it can be published (DCW-3.4); empty (default) means no component approval gate.
componentDeprecationNoticeDaysintegernoMinimum days between scheduling a component revision deprecation and its sunset (DCW-3.4).
compatibilityModeenum "BACKWARD", "FORWARD", "FULL", "NONE"noCompatibility mode classified diffs, compatibility checks, the CI diff gate and the publish guardrail grade by when a request names none (XPC-4.5): BACKWARD (default), FORWARD, FULL or NONE.
compatibilityTransitivebooleannoWhen true, a change is checked against every earlier revision, not only the base (BACKWARD_TRANSITIVE and friends; XPC-4.5).
protobufBreakingCategoryenum "WIRE", "WIRE_JSON", "PACKAGE", "FILE"nobuf breaking category Protobuf changes are graded at (XPC-4.5): WIRE, WIRE_JSON (default), PACKAGE or FILE.
requiredPublishLevelstring or nullnoKey of the maturity level a draft must reach before it publishes (GVM-1.3); a level of the guide's own ladder. null (default) means no level gate.

StyleGuidePolicySettingsPutRequest​

Replace draft policy gate settings on a custom style guide (CLX-1.3, #4850).

PropertyTypeRequiredDescription
axisGatesobject or nullnoAxis Gates.
requiredCoveragearray of string or nullnoRequired Coverage.
ciOutcomesStyleGuideCiOutcomesOut or nullnoCi Outcomes.
breakingPublishPolicyenum "off", "warn", "block" or nullnoBreaking-publish guardrail level (CTG-3.4); omit to leave unchanged.
requiredApprovalsinteger or nullnoApprovals required before publish (COL-2.3); 0 disables the gate, omit to leave unchanged.
requiredReviewerRolestring or nullnoRole slug at least one approval must come from (COL-2.3); send null to clear it, omit to leave unchanged.
componentApprovalStagesarray of ComponentApprovalStageModel or nullnoOrdered component-library approval stages (DCW-3.4), at most 5; send [] to turn the gate off, omit to leave unchanged.
componentDeprecationNoticeDaysinteger or nullnoMinimum deprecation notice in days (DCW-3.4); omit to leave unchanged.
compatibilityModeenum "BACKWARD", "FORWARD", "FULL", "NONE" or nullnoCompatibility mode (XPC-4.5); omit to leave unchanged.
compatibilityTransitiveboolean or nullnoCheck every earlier revision, not only the base (XPC-4.5); omit to leave unchanged.
protobufBreakingCategoryenum "WIRE", "WIRE_JSON", "PACKAGE", "FILE" or nullnobuf breaking category for Protobuf changes (XPC-4.5); omit to leave unchanged.
requiredPublishLevelstring or nullnoMaturity level key a draft must reach before it publishes (GVM-1.3); must be a level of the guide's ladder. Send null to clear it, omit to leave unchanged.
snapshotbooleannoWhen true (default), also append an immutable policy pack version.

StyleGuidePolicyVersionListResponse​

List of policy pack versions for a style guide (CLX-1.3, #4850).

PropertyTypeRequiredDescription
versionsarray of StyleGuidePolicyVersionOutnoVersions.
countintegernoNumber of versions in this page.
hasMorebooleannoWhether another page exists.
nextCursorstring or nullnoPass as cursor to read the next page; null on the last page.

StyleGuidePolicyVersionOut​

One immutable style-guide policy pack version (CLX-1.3, #4850).

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
guideIdstringyesGuide ID.
versionNumberintegeryesVersion Number.
contentFingerprintstringyesContent Fingerprint.
axisGatesobjectnoAxis Gates.
requiredCoveragearray of stringnoRequired Coverage.
ciOutcomesStyleGuideCiOutcomesOutnoCi Outcomes.
ladderStyleGuideLadderModelOutput or nullnoThe maturity ladder frozen into this pack (GVM-1.1); null when none.
requiredPublishLevelstring or nullnoThe level key the publish gate requires, frozen into this pack (GVM-1.3); null when no level gate is armed.
actorUserIdstring or nullnoActor User ID.
actorLabelstring or nullnoActor Label.
createdAtstring or nullnoCreated At.

StyleGuideRevisionDetailOut​

A style-guide revision including its frozen rules and policy gates (GOV-1.6, #4432).

PropertyTypeRequiredDescription
idstringyesRevision id — what a lint result pins to.
guideIdstringyesThe guide this revision belongs to.
revisionNumberintegeryesMonotonic revision number within the guide (starts at 1).
changeKindstringyesWhat produced the revision: created | edited | rules_changed | custom_rules_changed | policy_changed | imported | ladder_changed.
namestringyesGuide name at the time of this revision.
descriptionstring or nullnoGuide description at the time of this revision.
externalLintProfilestring or nullnoExternal validation profile at the time of this revision (CLX-2.2).
ruleCountintegernoNumber of rule rows frozen into this revision.
enabledRuleCountintegernoHow many of those rules were enabled.
customRuleCountintegernoHow many of those rules carried a custom definition (GOV-1.3).
contentFingerprintstringyesSHA-256 of the frozen rule rows — identical to the fingerprint the linter stamps on the compiled guide, which is how lint results resolve their revision.
snapshotFingerprintstringyesSHA-256 of the whole snapshot (identity + rules + policy gates). Equal fingerprints mean an edit changed nothing, and no revision is appended.
actorUserIdstring or nullnoUser who made the change; null for system captures or deleted users.
actorLabelstring or nullnoHuman-readable actor label recorded at the time of the change.
createdAtstring or nullnoWhen the revision was recorded (rows are write-once).
rulesarray of objectnoThe guide's rule rows as they were, sorted by rule id: ruleId-equivalent rule_id, enabled, severity, and custom_def for custom rules.
policyobjectnoDraft policy gates at the time of this revision: axisGates, requiredCoverage, ciOutcomes (CLX-1.3).
ladderStyleGuideLadderModelOutput or nullnoThe maturity ladder at the time of this revision (GVM-1.1); null when the guide had none.

StyleGuideRevisionListResponse​

A style guide's immutable revision history, newest first (GOV-1.6, #4432).

PropertyTypeRequiredDescription
guideIdstringyesGuide ID.
guideNamestringyesGuide Name.
revisionsarray of StyleGuideRevisionOutnoRevisions.
countintegernoNumber of revisions in this page.
hasMorebooleannoWhether another page exists.
nextCursorstring or nullnoPass as cursor to read the next page; null on the last page.

StyleGuideRulesPutRequest​

Replace a guide's built-in rule rows (GOV-2.2, #4434).

The request is the guide's complete desired built-in rule state: rows for registry rules omitted here are deleted (leaving those rules disabled at their defaults). Custom-rule rows (custom_def present) are untouched — they are managed by the custom-rules tab.

PropertyTypeRequiredDescription
rulesarray of StyleGuideRuleOverrideInyesThe guide's built-in rule rows; at most one entry per rule id.

StyleGuideRulesResponse​

A guide's full built-in rule catalog view (GOV-2.2, #4434), sorted by rule id.

Merges the GOV-1.2 registry with the guide's style_guide_rules overrides so the rule catalog tab renders and saves from one payload. Custom rules (GOV-1.3 rows carrying a custom_def) are not part of this view.

PropertyTypeRequiredDescription
guideIdstringyesThe guide's id.
guideNamestringyesThe guide's display name.
sourcestringyesbuiltin (read-only, seeded) | custom (tenant-authored).
rulesarray of StyleGuideRuleOutyesEvery registered built-in rule with this guide's state, sorted by ruleId.
countintegeryesNumber of registry rules (== len(rules)).
enabledCountintegeryesRules this guide currently enables.
docsPagestringyesRepository-relative path of the rule reference page docsAnchor points into.

StyleGuideUpdateRequest​

Rename / re-describe a custom style guide (GOV-2.1). Builtin guides are read-only.

PropertyTypeRequiredDescription
namestring or nullnoNew display name, when renaming.
descriptionstring or nullnoNew description; empty string clears it.
externalLintProfilestring or nullnoCLX-2.2 profile: baseline | tenant_guide | strict.