From 9df1c781eb34e2512a49414d016ab00e496f8d51 Mon Sep 17 00:00:00 2001 From: Sophie Tauchert Date: Fri, 6 Oct 2023 13:41:42 +0200 Subject: [PATCH] Fix generated OpenAPI spec Changes: - update the smallrye openapi generator plugin to latest to correctly handle Stream responses - add annotations to RealmRepresentation.clientProfiles and .clientPolicies --- core/pom.xml | 4 ++++ .../org/keycloak/representations/idm/RealmRepresentation.java | 3 +++ pom.xml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/pom.xml b/core/pom.xml index 7e4ef767d4..2a08402350 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -59,6 +59,10 @@ jboss-logging provided + + org.eclipse.microprofile.openapi + microprofile-openapi-api + junit junit diff --git a/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java index b35f949c7d..d7e77d6dfc 100755 --- a/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java @@ -20,6 +20,7 @@ package org.keycloak.representations.idm; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonNode; +import org.eclipse.microprofile.openapi.annotations.media.Schema; import org.jboss.logging.Logger; import org.keycloak.common.util.MultivaluedHashMap; import org.keycloak.util.JsonSerialization; @@ -154,9 +155,11 @@ public class RealmRepresentation { // Client Policies/Profiles @JsonProperty("clientProfiles") + @Schema(implementation = ClientProfilesRepresentation.class) protected JsonNode clientProfiles; @JsonProperty("clientPolicies") + @Schema(implementation = ClientPoliciesRepresentation.class) protected JsonNode clientPolicies; protected List users; diff --git a/pom.xml b/pom.xml index 1d3bd725a5..ede0da1ae2 100644 --- a/pom.xml +++ b/pom.xml @@ -187,7 +187,7 @@ 0.40.3 1.1 3.4.1 - 3.1.2 + 3.6.2 6.3.0