Fix generated OpenAPI spec

Changes:
- update the smallrye openapi generator plugin to latest to correctly handle
  Stream<T> responses
- add annotations to RealmRepresentation.clientProfiles and .clientPolicies
This commit is contained in:
Sophie Tauchert 2023-10-06 13:41:42 +02:00 committed by Marek Posolda
parent aa165e5b60
commit 9df1c781eb
3 changed files with 8 additions and 1 deletions

View file

@ -59,6 +59,10 @@
<artifactId>jboss-logging</artifactId> <artifactId>jboss-logging</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>

View file

@ -20,6 +20,7 @@ package org.keycloak.representations.idm;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.keycloak.common.util.MultivaluedHashMap; import org.keycloak.common.util.MultivaluedHashMap;
import org.keycloak.util.JsonSerialization; import org.keycloak.util.JsonSerialization;
@ -154,9 +155,11 @@ public class RealmRepresentation {
// Client Policies/Profiles // Client Policies/Profiles
@JsonProperty("clientProfiles") @JsonProperty("clientProfiles")
@Schema(implementation = ClientProfilesRepresentation.class)
protected JsonNode clientProfiles; protected JsonNode clientProfiles;
@JsonProperty("clientPolicies") @JsonProperty("clientPolicies")
@Schema(implementation = ClientPoliciesRepresentation.class)
protected JsonNode clientPolicies; protected JsonNode clientPolicies;
protected List<UserRepresentation> users; protected List<UserRepresentation> users;

View file

@ -187,7 +187,7 @@
<docker.maven.plugin.version>0.40.3</docker.maven.plugin.version> <docker.maven.plugin.version>0.40.3</docker.maven.plugin.version>
<verifier.plugin.version>1.1</verifier.plugin.version> <verifier.plugin.version>1.1</verifier.plugin.version>
<shade.plugin.version>3.4.1</shade.plugin.version> <shade.plugin.version>3.4.1</shade.plugin.version>
<smallrye.openapi.generator.plugin.version>3.1.2</smallrye.openapi.generator.plugin.version> <smallrye.openapi.generator.plugin.version>3.6.2</smallrye.openapi.generator.plugin.version>
<openapi.generator.plugin.version>6.3.0</openapi.generator.plugin.version> <openapi.generator.plugin.version>6.3.0</openapi.generator.plugin.version>
<!-- Surefire Settings --> <!-- Surefire Settings -->