Skip to main content

Style guides

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

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

List Style Guides

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

Operation id: list_style_guides_v1_style_guides__tenant_slug__get

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.

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

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}/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.

requiredReviewerRole distinguishes omitted from null: omitting it leaves the stored role alone, sending null clears it. 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 (CLX-1.3, #4850).

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.
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.

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.
limitqueryintegernoMaximum number of rows to return.
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: {}).

StyleGuideListResponse​

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

PropertyTypeRequiredDescription
guidesarray of StyleGuideOutyesEvery guide of the tenant, builtin first then by name.
countintegeryesNumber of guides (== len(guides)).

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.

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.
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 count.

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.
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.
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).

StyleGuideRevisionListResponse​

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

PropertyTypeRequiredDescription
guideIdstringyesGuide ID.
guideNamestringyesGuide Name.
revisionsarray of StyleGuideRevisionOutnoRevisions.
countintegernoNumber of count.

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.