Skip to content

IBX-12003: Fix user OpenApi doc#231

Draft
adriendupuis wants to merge 11 commits into
enh-openapifrom
fix-user-openapi-doc
Draft

IBX-12003: Fix user OpenApi doc#231
adriendupuis wants to merge 11 commits into
enh-openapifrom
fix-user-openapi-doc

Conversation

@adriendupuis

@adriendupuis adriendupuis commented Jun 29, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12003

Related PRs:

Description:

The issue ticket IBX-12003 talk about /user/users but I discovered that /user/groups has the same issue, and the two are related.

There was inconsistency in the roleId expected values.

Before:

  • $baseUri/user/users?roleId=2 returns a "406 Not Acceptable" with "No route matched '2'".
  • $baseUri/user/users?roleId=/api/ibexa/v2/user/roles/2 returns a 404 on clean install, but if you assign role directly to a user, it would return 200 with this user. As this return only Users directly assigned, Group Users must be request as well…
  • $baseUri/user/groups?roleId=/api/ibexa/v2/user/roles/2 returns a 404 with "Could not find 'Persistence User Role' with identifier 'ID: 0, Status: 0'"
  • $baseUri/user/groups?roleId=2 returns a 200 with the Administrators group

After:

I modified so roleId=2 and roleId=/api/ibexa/v2/user/roles/2 are both accepted on the two resources.
No backward compatibility break.
The same value can now be passed when using the two resources together to get all users having a role.

For QA:

Documentation:

@adriendupuis
adriendupuis marked this pull request as draft June 29, 2026 15:16
public function loadUserGroups(Request $request): RestValue
{
$restUserGroups = [];
if ($request->query->has('id') && is_int($id = $request->query->get('id'))) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This couldn't work as $request->query->get('id')is always a string with an integer in it, not an integer.

@adriendupuis adriendupuis changed the title Fix user openapi doc IBX-12003: Fix user OpenApi doc Jul 1, 2026
@adriendupuis
adriendupuis force-pushed the fix-user-openapi-doc branch from 1837339 to 567a220 Compare July 9, 2026 08:53
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

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.

4 participants