Skip to content

Tell an API caller what the user endpoints take - #737

Merged
blaipr merged 1 commit into
mainfrom
feat/api-help-for-users-and-friends
Aug 13, 2026
Merged

Tell an API caller what the user endpoints take#737
blaipr merged 1 commit into
mainfrom
feat/api-help-for-users-and-friends

Conversation

@blaipr

@blaipr blaipr commented Aug 13, 2026

Copy link
Copy Markdown
Member

The gap

Every API family that has a help class answers a missing parameter with the list of parameters it accepts. The user endpoints had none — so the answer was Wrong parameters with an empty detail: a caller was told something was wrong and left to guess which of eleven fields it was.

I recorded this in #693 as a gap rather than a defect. It is a gap that costs every API consumer the same hour, so here it is closed.

The change

A UserHelp class wired the way CategoryHelp, ClientHelp, TagHelp and UserGroupHelp are, listing what create, edit, view, search and delete take and which are required — including the password that create now asks for (#693).

Testing

The test that recorded the empty detail now asserts the answer names the parameterslogin and userGroupId among them.

API integration tests: 226 green. PHPStan and PHPCS clean.

The rest of the family

Five more families still have no help class: auth tokens, notifications, profiles, the event log, custom fields and public links. Same gap, same fix, and worth doing — as its own change rather than bolted onto this one.

Every other family that has a help class answers a missing parameter with the
list of parameters it accepts. The user endpoints had none, so the answer was
'Wrong parameters' and an empty detail: a caller was told something was wrong
and left to guess which of eleven fields it was.

A help class, wired the way the category, client, tag and group ones are, listing
what create, edit, view, search and delete take and which are required —
including the password create now asks for.

The test that recorded the empty detail as the gap it was now asserts the answer
names the parameters.
@blaipr
blaipr merged commit 9aaaa3b into main Aug 13, 2026
8 checks passed
@blaipr
blaipr deleted the feat/api-help-for-users-and-friends branch August 13, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant