WARNING
Depends on #1646 (and the PRs below it), still open. Until they merge, this diff also shows their changes; this pull request's own changes.
Summary
Seven endpoints still had no summary in the API docs: one in Guilds, two in Organizations, three in Users and one in Me. Each was a single docblock away, so this fills them in one go, after #1666 did the headlines.
Changes
-
Summaries. Docblocks on the controller methods, which Scramble turns into the summaries of the spec and the docs:
Endpoint Says GET /guilds24 a page, most members first, ?q=over handle, name and description; a 404 while guilds aren't open to the accountPOST /organizations/{handle}/followfollowing again changes nothing; a 404 for an organization without a page DELETE /organizations/{handle}/followunfollowing one you don't follow changes nothing; a 404 for an organization without a page POST /users/{handle}/follownotified once, unless they mute the follower; a 403 for yourself or across a block DELETE /users/{handle}/followunfollowing someone you don't follow changes nothing DELETE /users/{handle}/muteanswers with the user and is_muting: false, like the mute does withtrueGET /starredlast starred first, 20 a page, without the commits the user can no longer see -
Spec.
resources/api/openapi.jsonis generated again; only these seven summaries change. A dataset test checks each of them.
No code changes: what the API answers stays the same.
Validation
| Check | Result |
|---|---|
pest --parallel --coverage --exactly=100.0 (full suite) | 6667 passed, 100.0% |
pest --type-coverage --min=100 | 100.0% |
pint --test, rector --dry-run, phpstan | clean |
scramble:export | same spec as committed |
Visual evidence
Playwright (Chromium) against a local dev server, each page opened on an endpoint of this PR. Before is #1646, after is this branch.
| Before, 1440 light | After, 1440 light | After, 1440 dark |
|---|---|---|
| Before, 390 light | After, 390 light |
|---|---|
Device verification
Emulation only (390×844, DPR 2, touch): no hardware or simulator. No interaction changes.
Independent review
A fresh read-only reviewer, given the guidelines, the diff, the validation results and the captures, checked each summary against the requests, actions and queries behind it. On base 3c4a4838 (#1646), head 6834e85b: CODE: PASS, VISUAL: PASS. Applied in e530ed51:
- unfollowing an organization without a page is a 404 too;
- following notifies only the first time, and not someone who mutes the follower;
- a refused follow is a 403;
- starred commits the user can no longer see are left out.
Limitations
- As in #1646, Scramble reads
denyAsNotFound()as a 403: the error list ofGET /guildsand of following an organization shows a 403 where the API answers 404. The summaries say 404. - Commits and Remotes still have endpoints without a summary; they come next, each in its own PR.
Activity
7This pull request is a draft
Merging is unavailable until it is marked ready for review.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share