Skip to content

docs: describe the TemplateBuilder API operations and parameters - #31548

Closed
nickvigilante wants to merge 1 commit into
mainfrom
vigilante/api-descriptions-templatebuilder
Closed

nickvigilante wants to merge 1 commit into
mainfrom
vigilante/api-descriptions-templatebuilder

Conversation

@nickvigilante

@nickvigilante nickvigilante commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds descriptions for the 5 TemplateBuilder routes and improves 4 of their parameters.
The REST API reference renders these routes from swagger.json, and they had no description.

Merge notes

This PR doesn't touch the exemption lists from #31473.
If #31473 merges first, TestEndpointsDocumented names each route on this PR to remove from those lists.

Verification

summary: need=5 problems=0 thin_params_left=0
ok  	github.com/coder/coder/v2/coderd/coderdtest	0.899s
ok  	github.com/coder/coder/v2/enterprise/coderd/coderdenttest	0.667s

A JSON diff of coderd/apidoc/swagger.json against origin/main changes only description values on the routes in this PR.

Claims checked against the code
Route Claim Evidence
all /api/v2/templatebuilder routes Return 404 when the template builder is turned off with --disable-template-builder coderd/coderd.go:1686, codersdk/deployment.go:4985-4992
GET /api/v2/templatebuilder/bases Requires permission to read templates in any organization, which the Owner, Auditor, Template Admin, Organization Admin, and Organization Template Admin roles have; otherwise 404 coderd/templatebuilder_handler.go:53-56, coderd/rbac/roles.go:422,487,512,601,679
GET /api/v2/templatebuilder/modules Same read permission; base filters by the base's operating system and omits modules the base includes; unknown base returns 400 coderd/templatebuilder_handler.go:154-196
POST /api/v2/templatebuilder/compose Requires permission to create templates in any organization, which the Owner, Template Admin, Organization Admin, and Organization Template Admin roles have; otherwise 404; returns a tar and creates nothing; base_template_id required coderd/templatebuilder_handler.go:221-269, coderd/rbac/roles.go:422,512,601,679
POST /api/v2/templatebuilder/compose/template Requires permission to create templates in the organization; otherwise 404; base_template_id, organization_id, and name required coderd/templatebuilder_handler.go:346-376, codersdk/templatebuilder.go:148-153
POST /api/v2/templatebuilder/compose/template Waits up to 2 minutes for the import job and returns 504 on timeout coderd/templatebuilder_handler.go:274-276, 561-570
POST /api/v2/templatebuilder/sessions Requires permission to create templates in any organization; reports a telemetry session event; session_id and event_type (wizard_entry or compose_completion) required coderd/templatebuilder_handler.go:782-802, codersdk/templatebuilder.go:170-188
doc-check self-check

Ran in author self-check mode on the branch diff, annotation text only: Fact Checker, Continuity Editor, Copy Editor, and then the Skeptic.
The other personas didn't run because no Markdown page was written by hand, and docs/reference/api/ is generated.
Fact Checker: No findings.
Permission checks, the 2 minute import timeout, the 404 when the builder is turned off, and the required fields match coderd/templatebuilder_handler.go and coderd/coderd.go:1686.
Continuity Editor: No findings.
Copy Editor: No findings.
Skeptic: kept 0 and rejected 2.
One finding that Organization Auditor is missing from the read permission sentences, rejected because the sentences don't claim to be exhaustive and it is not a wrong claim.
One nbsp finding for "2 minutes", rejected because Coder.UnitSpacing skips generated API pages.
No blocking findings remain.

Writing rules applied
  • One to three present-tense, active-voice sentences, addressed to "you", with the first sentence starting with a verb.
  • Permission sentences name the built-in roles by display name, each traced to coderd/rbac/roles.go and the handler or dbauthz check.
  • Premium license, experiment, and authentication sentences appear only where the code gates the route.
  • Streams say that the route upgrades to a WebSocket and what each message carries.
  • Full API paths and exact field names, parameter names, and values are in backticks.
  • Parameter text states what the value selects, its accepted forms, and its default and limits from the code.
  • Shared parameters (user, limit, offset) use the shared wording only where the handler matches it.
  • No em dashes, en dashes, spaced double hyphens, semicolons in prose, or raw angle brackets and braces outside backticks.

Part of DOCS-1439.

Generated by Coder Agents on behalf of @nickvigilante.

The REST API reference renders these routes from swagger.json, and they had no description.

Part of DOCS-1439.

Assisted-by: AI
@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

DOCS-1439

@nickvigilante

Copy link
Copy Markdown
Collaborator Author

Combined into #31562, where this PR's changes are the commit docs: describe the TemplateBuilder API operations and parameters. The claims table above still covers that commit.

Generated by Coder Agents on behalf of @nickvigilante.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant