Repository navigation
docs: describe the Organizations API operations and parameters - #31524
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. 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.
This describes the seven Organizations routes that had no
@Descriptionand improves the thin or wrong parameter text on them, so the REST API reference renders more than a title.The reference comes from
swagger.json, whichmake genbuilds from these annotations.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.The
idsandstatusparameters ofGET /api/v2/organizations/{organization}/provisionerjobsare unchanged, because #30124 and #30122 own them.Existing text I corrected on routes in this list:
organizationonPATCHandDELETE /api/v2/organizations/{organization}said "ID or name". It also acceptsdefault, so it now uses the shared wording.organizationonGET /api/v2/organizations/{organization}and the provisioner job routes said "Organization ID", buthttpmw.ExtractOrganizationParamalso accepts a name anddefault.Verification
A JSON diff of
swagger.jsonagainstmainshows 16 changes, all adding or editingdescriptionvalues on these routes and their parameters, and nothing else.The one remaining thin parameter is the
jobpath ID, which accepts only a UUID.doc-checkran in author self-check mode on the branch diff.The Fact Checker checked every added claim against the code, the Continuity Editor compared the text with
docs/admin/users/organizations.mdand the glossary, and the Copy Editor read each added line against the style guide.They returned no blocking findings, so this PR needed no follow-up commit.
The Skeptic had nothing to verify.
Claims checked against the code
GET /api/v2/organizationscoderd/database/dbauthz/dbauthz.go:4759(fetchWithPostFilter)POST /api/v2/organizationsenterprise/coderd/coderd.go:451(RequireFeatureMW(FeatureMultipleOrganizations))POST /api/v2/organizationscoderd/database/dbauthz/dbauthz.go:6745(insertonResourceOrganization),coderd/rbac/roles.go:414(Owner),coderd/rbac/roles.go:587(Organization Admin has only organization-scoped permissions)POST /api/v2/organizationsdisplay_namedefaults toname,defaultis reservedenterprise/coderd/organizations.go:291,:326,:360PATCHandDELETE /api/v2/organizations/{organization}enterprise/coderd/coderd.go:459to:462PATCH /api/v2/organizations/{organization}coderd/database/dbauthz/dbauthz.go:8408,coderd/rbac/roles.go:587PATCH /api/v2/organizations/{organization}defaultis reservedenterprise/coderd/organizations.go:60,:118to:130DELETE /api/v2/organizations/{organization}coderd/database/dbauthz/dbauthz.go:8434(deleteQ),coderd/rbac/roles.go:587DELETE /api/v2/organizations/{organization}enterprise/coderd/organizations.go:194DELETE /api/v2/organizations/{organization}Everyone, or more than one member remaincoderd/database/migrations/000318_update_protect_deleting_orgs_to_filter_deleted_users.up.sql:81to:89coderd/provisionerjobs.go:105,coderd/rbac/roles.go:587,:693GET .../provisionerjobscoderd/database/queries/provisionerjobs.sql:261(ORDER BY pj.created_at DESC)GET .../provisionerjobslimitdefaults to50,0returns all jobscoderd/provisionerjobs.go:112,:131(Valid: limit > 0){organization}path parametersdefaultcoderd/httpmw/organizationparam.go:54to:96Writing rules applied
dbauthzorAuthorizecalls andcoderd/rbac/roles.go.RequireFeatureMW.organizationpath parameters, copied exactly.Part of DOCS-1439.
Generated by Coder Agents on behalf of @nickvigilante.