Skip to content

Add briefRepresentation parameter for organization group-by-path endpoint - #51264

Open
kota65535 wants to merge 2 commits into
keycloak:mainfrom
kota65535:worktree/molten-granite
Open

Add briefRepresentation parameter for organization group-by-path endpoint#51264
kota65535 wants to merge 2 commits into
keycloak:mainfrom
kota65535:worktree/molten-granite

Conversation

@kota65535

Copy link
Copy Markdown
Contributor

Close: #51263

Copilot AI review requested due to automatic review settings July 29, 2026 09:52
@kota65535
kota65535 requested a review from a team as a code owner July 29, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Returns full group details from the organization group-by-path endpoint, aligning it with the realm equivalent.

Changes:

  • Includes attributes and role mappings in the response.

…oint

Signed-off-by: Tomohiko Ozawa <kota65535@gmail.com>
Copilot AI review requested due to automatic review settings July 29, 2026 23:15
@kota65535
kota65535 force-pushed the worktree/molten-granite branch from 56209ce to d986c03 Compare July 29, 2026 23:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

services/src/main/java/org/keycloak/organization/admin/resource/OrganizationGroupsResource.java:240

  • The default still selects the brief representation, so requests without the new query parameter—including the existing two-argument admin-client method—continue to omit attributes and role mappings. This contradicts the PR/issue requirement that group-by-path return a full representation by default; make the default false (and update the parameter description).
                                              @Parameter(description = "Whether to return a brief representation (default: true)") @QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation,

services/src/main/java/org/keycloak/organization/admin/resource/OrganizationGroupsResource.java:250

  • The new full/brief behavior is not covered by the existing organization group-by-path tests, which assert only name/path and would pass even when the default remains brief. Add coverage that verifies an omitted briefRepresentation returns attributes and role mappings, while briefRepresentation=true omits them.
        GroupRepresentation rep = briefRepresentation ?
                ModelToRepresentation.groupToBriefRepresentation(found) :
                ModelToRepresentation.toRepresentation(found, true);

@kota65535 kota65535 changed the title Return a full representation from the organization group-by-path endpoint Add briefRepresentation parameter for organization group-by-path endpoint Jul 29, 2026
@keycloak-github-bot

Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.webauthn.passwordless.WebAuthnPwdLessPropertyTest#timeout

Keycloak CI - WebAuthn IT

org.openqa.selenium.WebDriverException: 
unknown error: unhandled inspector error: {"code":-32000,"message":"Node with given id does not belong to the document"}
  (Session info: chrome=150.0.7871.128)
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.17.0-1020-azure', java.version: '25.0.3'
...

Report flaky test

@keycloak-github-bot keycloak-github-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Organization group-by-path endpoint returns a brief representation instead of a full representation

2 participants