8000 enhance: add yaml support to v2 by shawkins · Pull Request #55061 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

enhance: add yaml support to v2 - #55061

Open
shawkins wants to merge 1 commit into
keycloak:mainfrom
shawkins:iss43294
Open

shawkins wants to merge 1 commit into
keycloak:mainfrom
shawkins:iss43294

Conversation

@shawkins
Copy link
Copy Markdown
Contributor

closes: #43294

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.

🟡 Changes recommended

Content negotiation can select explicitly excluded JSON, and YAML patch handling silently accepts extra documents instead of rejecting them before updating the client.

2 open issues
What changed in this PR

Adds header-driven YAML support to the experimental Admin API v2 client endpoints, addressing #43294 while retaining JSON support.

Changes:

  • Adds YAML request and response types, serialization, and merge-patch parsing.
  • Updates response media-type selection and the OpenAPI specification.
  • Adds YAML integration tests and release notes.
File Description
rest/​admin-v2/​tests/​src/​test/​java/​org/​keycloak/​tests/​admin/​client/​v2/​ClientApiV2YamlTest.java Tests YAML reads, writes, patches, and invalid requests.
rest/​admin-v2/​services/​src/​main/​java/​org/​keycloak/​services/​PatchType.java Adds the YAML merge-patch type.
rest/​admin-v2/​services/​src/​main/​java/​org/​keycloak/​rest/​admin/​api/​YamlMapperResolver.java Configures YAML serialization, including streamed results.
rest/​admin-v2/​services/​src/​main/​java/​org/​keycloak/​rest/​admin/​api/​client/​DefaultClientsApi.java Enables YAML for client listing and creation.
rest/​admin-v2/​services/​src/​main/​java/​org/​keycloak/​rest/​admin/​api/​client/​DefaultClientApi.java Enables YAML for individual clients and parses YAML patches.
rest/​admin-v2/​api/​src/​main/​java/​org/​keycloak/​admin/​api/​PatchTypeNames.java Defines YAML media-type constants.
rest/​admin-v2/​api/​src/​main/​java/​org/​keycloak/​admin/​api/​client/​ClientsApi.java Advertises YAML on collection operations.
rest/​admin-v2/​api/​src/​main/​java/​org/​keycloak/​admin/​api/​client/​ClientApi.java Advertises YAML on individual-client operations.
quarkus/​runtime/​src/​main/​java/​org/​keycloak/​quarkus/​runtime/​integration/​resteasy/​SetResponseContentTypeHandler.java Selects response types using the Accept header.
js/​libs/​keycloak-admin-client/​openapi.json Documents YAML request and response formats.
docs/​documentation/​release_notes/​topics/​27_0_0.adoc Explains YAML support and required headers.

Review effort: Balanced

closes: keycloak#43294

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
@shawkins
shawkins marked this pull request as ready for review November 12, 2026 18:43
@shawkins
shawkins requested review from a team as code owners November 12, 2026 18:43
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:43
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.

🔵 Needs a closer look

Global content-negotiation changes affect OIDC JSON/JWT and workflow YAML responses, requiring runtime validation of explicit response types and absent, wildcard, or weighted Accept headers beyond the new v2 YAML tests.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

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

Labels

team/admin-api-wg Admin API v2 Working Group team/cloud-native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YAML support for Client v2

2 participants

0