8000 Fix KcAdmV2ClientCLITest#testListClientsWithFieldsProjection by respecting explode attribute value by michalvavrik · Pull Request #50176 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Fix KcAdmV2ClientCLITest#testListClientsWithFieldsProjection by respecting explode attribute value - #50176

Merged
vmuzikar merged 1 commit into
keycloak:mainfrom
michalvavrik:fix/issues/50175
Jun 20, 2026
Merged

vmuzikar merged 1 commit into
keycloak:mainfrom
michalvavrik:fix/issues/50175

Conversation

@michalvavrik
Copy link
Copy Markdown
Member

Closes: keycloak#50175 Signed-off-by: Michal Vavřík <michal.vavrik@aol.com>
Copilot AI review requested due to automatic review settings June 19, 2026 20:58
@michalvavrik
michalvavrik requested review from a team as code owners June 19, 2026 20:58
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

This PR fixes Keycloak Admin CLI v2 query-parameter serialization to respect the OpenAPI explode attribute, ensuring array query params can be encoded as comma-separated values when explode: false (addressing the failing KcAdmV2ClientCLITest#testListClientsWithFieldsProjection mentioned in #50175).

Changes:

  • Add explode support to CLI option descriptors and default it to true when unspecified in OpenAPI.
  • Update query string building to encode array query params either as repeated keys (explode=true) or as comma-separated values (explode=false).
  • Extend the descriptor builder test fixture and assertions to cover explode extraction/defaulting.

Reviewed changes

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

Show a summary per file
File Description
integration/client-cli/admin-cli/src/test/resources/test-openapi.json Marks fields query param as explode: false in the OpenAPI test fixture.
integration/client-cli/admin-cli/src/test/java/org/keycloak/client/admin/cli/commands/v2/KcAdmV2DescriptorBuilderTest.java Adds assertions verifying explode is extracted (and defaulted) correctly.
integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/v2/KcAdmV2RequestExecutor.java Implements explode-aware array query param encoding (repeated vs comma-separated).
integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/v2/KcAdmV2DescriptorBuilder.java Extracts explode from OpenAPI query parameters into the command descriptor.
integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/v2/KcAdmV2CommandDescriptor.java Adds explode field + getter/setter to OptionDescriptor with a default of true.

@michalvavrik
Copy link
Copy Markdown
Member Author

Base2TestSuite.testExpiredAssertion unrelated (passes on the second try), "Store IT (mssql)" mvn wrapper fails to fetch binaries - also unrelated.

@vmuzikar
vmuzikar enabled auto-merge (squash) June 20, 2026 07:44
@vmuzikar
vmuzikar merged commit c0fad4b into keycloak:main Jun 20, 2026
141 of 144 checks passed
@michalvavrik
michalvavrik deleted the fix/issues/50175 branch June 20, 2026 08:53
sashyo pushed a commit to tide-foundation/keycloak-IGA that referenced this pull request Jul 20, 2026
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.

KcAdmV2ClientCLITest#testListClientsWithFieldsProjection is failing as query param cannot be exploded anymore

3 participants

0