Skip to content

Commit

Permalink
Ignore unknown json properties from newer Keycloak versions
Browse files Browse the repository at this point in the history
keycloak-config-cli should work with future versions of Keycloak server

fixes #1265
  • Loading branch information
bohmber committed Jan 30, 2025
1 parent 18ac338 commit 7e95262
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ public boolean isClosed() {
return keycloak == null || keycloak.isClosed();
}

/*
Similar to
https://github.com/keycloak/keycloak-client/blob/0ca751f23022c9295f2e7dc9fa72725e4380f4ed/admin-client/src/main/java/org/keycloak/admin/client/JacksonProvider.java
but without objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL).
JsonInclude.Include.NON_NULL will cause errors with some unit tests
in ImportClientsIT.
*/
public static class JacksonProvider extends ResteasyJackson2Provider {

public ObjectMapper locateMapper(Class<?> type, MediaType mediaType) {
Expand Down

0 comments on commit 7e95262

Please sign in to comment.