Repository navigation
Fix KcAdmV2ClientCLITest#testListClientsWithFieldsProjection by respecting explode attribute value - #50176
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
explodesupport to CLI option descriptors and default it totruewhen 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
explodeextraction/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. |
Member
Author
|
|
vmuzikar
approved these changes
Jun 20, 2026
vmuzikar
enabled auto-merge (squash)
June 20, 2026 07:44
sashyo
pushed a commit
to tide-foundation/keycloak-IGA
that referenced
this pull request
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KcAdmV2ClientCLITest#testListClientsWithFieldsProjectionis failing as query param cannot be exploded anymore #50175