Repository navigation
docs: describe the General API operations and parameters - #31537
Closed
nickvigilante wants to merge 1 commit into
Closed
nickvigilante wants to merge 1 commit into
nickvigilante wants to merge 1 commit into
Conversation
The REST API reference renders these routes from swagger.json, and they had no description. This adds one to each General route and improves the parameter descriptions. Part of DOCS-1439. Assisted-by: AI
Collaborator
Author
|
Combined into #31562, where this PR's changes are the commit Generated by Coder Agents on behalf of @nickvigilante. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describes 11
GeneralAPI routes and improves therequestbody ofPOST /api/v2/csp/reportsand theuserpath parameter of the token config route, so the REST API reference page for each route has more than a title.The reference renders from
swagger.json, and these routes had no description.Merge notes
This PR doesn't touch #31473's exemption lists.
If #31473 merges first,
TestEndpointsDocumentednames each route on this PR to remove from those lists.Verification
A JSON diff of
swagger.jsonagainstorigin/mainchanges onlydescriptionvalues: 13 in total, all on routes in this PR or their parameters, and no other value differs.doc-check self-check
Ran the
doc-checkskill in author self-check mode on the branch diff, one persona at a time: Fact Checker, Continuity Editor, Copy Editor, then Skeptic on what survived. The other personas (Cartographer, Newcomer, Reader Advocate, Architect) didn't run.64 KiB(the rule skips the API reference), and sentences over 25 words (targets, not ceilings).Claims checked against the code
GET /api/v2/,GET /api/v2/buildinfo,GET /api/v2/updatecheckcoderd/coderd.go:1471,:1477,:1507(registered outside any auth middleware),coderd/coderdtest/swaggerparser.go:365-367(assertSecurityDefinedexempts them)POST /api/v2/csp/reportscoderd/coderd.go:1473(no auth middleware)POST /api/v2/csp/reportscoderd/csp.go:18,:41,:65GET /api/v2/deployment/configcoderd/deployment.go:23,coderd/rbac/roles.go:495(Auditor), Owner has all permissions except a list that excludes neither resource (coderd/rbac/roles.go:422)GET /api/v2/deployment/configvalueswithout secrets andoptions, whose entries describe each settingcoderd/deployment.go:28,:38GET /api/v2/deployment/stats400while stats are still processingcoderd/deployment.go:53,:61,coderd/rbac/roles.go:494GET /api/v2/deployment/sshcoderd/coderd.go:1486-1487(apiKeyMiddleware),coderd/deployment.go:94(noAuthorizecall)GET /api/v2/deployment/user-secrets/capabilitiesfile_path_delivery_enabledreflects the deployment's user secret file path settingcoderd/usersecrets.go:131-135,:53GET /api/v2/experimentscoderd/experiments.go:37,coderd/experiments/evaluator.go:61-84GET /api/v2/experiments/availablesafecoderd/experiments.go:50-52GET /api/v2/updatecheckcoderd/updatecheck.go:33-46GET /api/v2/users/{user}/keys/tokens/tokenconfigcoderd/apikey.go:575-583GET /api/v2/users/{user}/keys/tokens/tokenconfiguseraccepts an ID, username, ormecoderd/coderd.go:1758(ExtractUserParam)Writing rules applied
api.Authorizecalls, middleware, andcoderd/rbac/roles.go.Annotation bugs noticed, not changed here
POST /api/v2/csp/reportslists@Security CoderSessionToken, but the route has no auth middleware.GET /api/v2/experiments/availabledocuments an array ofcodersdk.Experiment, but the handler returns acodersdk.AvailableExperimentsobject with asafearray.Part of DOCS-1439.
Generated by Coder Agents on behalf of @nickvigilante.