Repository navigation
docs: describe the Files API operations and parameters - #31550
Closed
nickvigilante wants to merge 2 commits into
Closed
nickvigilante wants to merge 2 commits into
nickvigilante wants to merge 2 commits into
Conversation
The REST API reference renders these routes from swagger.json, and they had no description. Part of DOCS-1439. Assisted-by: AI
The description said the file returns its original Content-Type, but Coder stores zip uploads as tar, so it now names the stored type, and it states which case returns 400. 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 PR adds a description for
GET /api/v2/files/{fileID}and improves itsfileIDparameter.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,
TestEndpointsDocumentednames each route on this PR to remove from those lists.Verification
A JSON diff of
coderd/apidoc/swagger.jsonagainstorigin/mainchanges onlydescriptionvalues on the routes in this PR.Claims checked against the code
format=zipconverts a tar file to zip; non-tar returns 400; other format returns 400; no format returns the stored bytes with the storedContent-TypefileIDmust be a UUIDContent-Typeisapplication/x-tarbecause zip uploads are converted to tardoc-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: Found one wrong claim: the description said the file returns its original
Content-Type, butPOST /api/v2/filesconverts zip uploads to tar and storesapplication/x-tar(coderd/files.go:90-114,143).Fixed in a follow-up commit.
Continuity Editor: No findings.
Copy Editor: Found one ambiguous clause: "which returns
400" could refer to the zip archive or the download.Reworded in the same follow-up commit.
Skeptic: kept 2 and rejected 1.
One finding that organization template roles are missing from the read permission sentence, rejected because the sentence doesn't claim to be exhaustive and file reads also follow template access.
No blocking findings remain.
Writing rules applied
coderd/rbac/roles.goand the handler ordbauthzcheck.user,limit,offset) use the shared wording only where the handler matches it.CI flakes unrelated to this change
test-go-pg-17failedTestChatTurnStopsAtStepLimit/Defaultincoderd/x/chatd, a package this PR doesn't touch: https://github.com/coder/coder/actions/runs/40935606036/job/123665384299test-go-pg (ubuntu-latest)failedTestServerTailnet_ReverseProxy_TCPDialFailureincoderd, a tailnet timing test that hit a 502 after about five seconds. This PR changes only annotation comments: https://github.com/coder/coder/actions/runs/40935606036/job/123665384180Part of DOCS-1439.
Generated by Coder Agents on behalf of @nickvigilante.