Skip to content

Conversation

@robson90
Copy link
Contributor

Replacement PR for: #39834

Adds support for OpenAPI and OpenAPI-UI(Swagger) on the management interface.

Paths are:
<KEYCLOAK_MANAGEMENT_INTERFACE>/openapi
<KEYCLOAK_MANAGEMENT_INTERFACE>/openapi-ui

@mabartos
Copy link
Contributor

mabartos commented Aug 14, 2025

@robson90 Nice work! Just a few things:

Fix the HelpCommandDistTest

Execute:

KEYCLOAK_REPLACE_EXPECTED=true mvn clean install -f quarkus/tests/integration/pom.xml -Dtest=HelpCommandDistTest

Build error logs

I see there are some error logs coming from the OpenAPI. It'd be good to try to resolve it as it could show us gaps in our OpenAPI spec, but it's out of scope of this PR. I'm ok to have it like that for now.

EDIT: I see there are also present during the build/reaugmentation phase. We should ignore it.
You can add the quarkus.log.category."io.smallrye.openapi.runtime.scanner.dataobject".level=off to the application.properties in quarkus/runtime. Would be good to create a new issue for resolving these soft errors and reference the issue URL in the application.properties.

[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.admin.v2.ClientRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.admin.v2.ClientRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.util.Map<java.lang.String, java.lang.Object>>
[WARNING] [io.quarkus.deployment.steps.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
        - org.keycloak.TokenCategory (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.AccessToken > org.keycloak.TokenCategory)
        - org.keycloak.partialimport.PartialImportResults (source: SmallRyeOpenApiProcessor > null > org.keycloak.partialimport.PartialImportResults)
        - org.keycloak.representations.AccessToken (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.AccessToken)
        - org.keycloak.representations.IDToken (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.IDToken)
        - org.keycloak.representations.adapters.action.GlobalRequestResult (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.adapters.action.GlobalRequestResult)
        - org.keycloak.representations.idm.AdminEventRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.AdminEventRepresentation)
        - org.keycloak.representations.idm.ClientInitialAccessCreatePresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.ClientInitialAccessCreatePresentation)
        - org.keycloak.representations.idm.ClientRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.ClientRepresentation)
        - org.keycloak.representations.idm.ClientScopeRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.ClientScopeRepresentation)
        - org.keycloak.representations.idm.CredentialRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.CredentialRepresentation)
        - org.keycloak.representations.idm.ErrorRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.ErrorRepresentation)
        - org.keycloak.representations.idm.EventRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.EventRepresentation)
        - org.keycloak.representations.idm.FederatedIdentityRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.FederatedIdentityRepresentation)
        - org.keycloak.representations.idm.GroupRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.GroupRepresentation)
        - org.keycloak.representations.idm.IdentityProviderRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.IdentityProviderRepresentation)
        - org.keycloak.representations.idm.ManagementPermissionReference (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.ManagementPermissionReference)
        - org.keycloak.representations.idm.MappingsRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.MappingsRepresentation)
        - org.keycloak.representations.idm.MemberRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.MemberRepresentation)
        - org.keycloak.representations.idm.OrganizationRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.OrganizationRepresentation)
        - org.keycloak.representations.idm.RealmEventsConfigRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.RealmEventsConfigRepresentation)
        - org.keycloak.representations.idm.RealmRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.RealmRepresentation)
        - org.keycloak.representations.idm.RoleRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.RoleRepresentation)
        - org.keycloak.representations.idm.UserProfileMetadata (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.UserProfileMetadata)
        - org.keycloak.representations.idm.UserRepresentation (sources: SmallRyeOpenApiProcessor > null > org.keycloak.admin.ui.rest.model.BruteUser, SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.UserRepresentation)
        - org.keycloak.representations.idm.UserSessionRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.UserSessionRepresentation)
        - org.keycloak.representations.idm.authorization.AbstractPolicyRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.authorization.AbstractPolicyRepresentation)
        - org.keycloak.representations.idm.authorization.PolicyEvaluationResponse (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.authorization.PolicyEvaluationResponse)
        - org.keycloak.representations.idm.authorization.PolicyProviderRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.authorization.PolicyProviderRepresentation)
        - org.keycloak.representations.idm.authorization.PolicyRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.authorization.PolicyRepresentation)
        - org.keycloak.representations.idm.authorization.ResourceRepresentation (source: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.authorization.ResourceRepresentation)
        - org.keycloak.representations.idm.authorization.ScopeRepresentation (sources: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.authorization.ResourceRepresentation > java.util.Set > org.keycloak.representations.idm.authorization.ScopeRepresentation, SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.authorization.ScopeRepresentation)
        - org.keycloak.representations.userprofile.config.UPConfig (sources: SmallRyeOpenApiProcessor > null > org.keycloak.representations.idm.RealmRepresentation > org.keycloak.representations.userprofile.config.UPConfig, SmallRyeOpenApiProcessor > null > org.keycloak.representations.userprofile.config.UPConfig)
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.IdentityProviderRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.IdentityProviderMapperRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.GroupRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.GroupRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.UserRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.lang.String>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ComponentTypeRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ComponentRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ClientRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.UserSessionRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ProtocolMapperRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ProtocolMapperRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ClientScopeRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.UserSessionRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ClientScopeRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.authorization.ScopeRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ProtocolMapperRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ProtocolMapperRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.util.Map<java.lang.String, java.lang.String>>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RoleRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ProtocolMapperRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ProtocolMapperRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ComponentTypeRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.ClientInitialAccessPresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.util.Map<java.lang.String, java.lang.String>>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.RequiredActionProviderRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.util.Map<java.lang.String, java.lang.Object>>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.util.Map<java.lang.String, java.lang.Object>>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<org.keycloak.representations.idm.AuthenticationFlowRepresentation>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.util.Map<java.lang.String, java.lang.Object>>
[ERROR] [io.smallrye.openapi.runtime.scanner.dataobject] SROAP31016: Unanticipated mismatch between type arguments and type variables declared on class
Class: io.smallrye.openapi.runtime.scanner.StreamStandin<E, S>
Type: java.util.stream.Stream<java.util.Map<java.lang.String, java.lang.Object>>

OpenApi download

When I access localhost:9000/openapi, it starts to download a file openapi with the spec. I expected to return only the text in the response body with the OpenAPI. Or did I miss something? I thought it's more like request-based without any other downloads.

@robson90
Copy link
Contributor Author

OpenApi download

When I access localhost:9000/openapi, it starts to download a file openapi with the spec. I expected to return only the text in the response body with the OpenAPI. Or did I miss something? I thought it's more like request-based without any other downloads.

I think the way it is now, is the "expected". When opening localhost:9000/openapi-ui, the swagger-ui does an API call to get the openapi.yml. If you like, I can take a look, if we can provide two url´s, one for download, one for text.

@mabartos
Copy link
Contributor

mabartos commented Aug 14, 2025

I think the way it is now, is the "expected". When opening localhost:9000/openapi-ui, the swagger-ui does an API call to get the openapi.yml. If you like, I can take a look, if we can provide two url´s, one for download, one for text.

It should actually call the endpoint with Content-Type: application/json, so the response contains OpenAPI spec in JSON format. Based on the findings:

Screenshot From 2025-08-14 11-49-23 Screenshot From 2025-08-14 11-49-34

Execute localhost:9000/openapi

The download starts and the downloaded file contains OpenAPI spec in YAML.

Execute localhost:9000/openapi.yaml

No download - response body contains the OpenAPI spec in YAML.

EDIT: yep, it starts downloading YAML as well.

Execute localhost:9000/openapi.json

No download - response body contains the OpenAPI spec in JSON.


I'd rather go a way that we return OpenAPI in YAML by default (as seen when executing localhost:9000/openapi.yaml) to prevent any downloads without a file suffix.

@robson90 @vmuzikar @shawkins WDYT?

@vmuzikar vmuzikar self-requested a review August 14, 2025 10:09
@vmuzikar vmuzikar added team/admin-api-wg Admin API v2 Working Group and removed team/cloud-native labels Aug 14, 2025
@vmuzikar
Copy link
Contributor

I'd rather go a way that we return OpenAPI in YAML by default (as seen when executing localhost:9000/openapi.yaml) to prevent any downloads without a file suffix.

@mabartos You mean that localhost:9000/openapi would just return the spec in YAML format without triggering the browser download? And localhost:9000/openapi.yaml then triggering the warning? If yes, then +1 for that. Though, I don't think it matters that much, those endpoints won't be typically accessed via browser.

@mabartos
Copy link
Contributor

@mabartos You mean that localhost:9000/openapi would just return the spec in YAML format without triggering the browser download? And localhost:9000/openapi.yaml then triggering the warning? If yes, then +1 for that. Though, I don't think it matters that much, those endpoints won't be typically accessed via browser.

Some kind of that.. localhost:9000/openapi would return YAML (as the default), localhost:9000/openapi.yaml would return YAML (already working) as well and localhost:9000/openapi.json would return JSON (already working).

But yeah, we don't need to worry about it right now as it can be done in some follow-up tasks.

@robson90
Copy link
Contributor Author

@mabartos and @vmuzikar fyi:

Reading through here, it seems like I can already force the format: https://download.eclipse.org/microprofile/microprofile-open-api-2.0-RC3/microprofile-openapi-spec.html#_content_format

YAML

$ curl -H "Accept: application/yaml" http://localhost:9000/openapi
---
openapi: 3.1.0
tags:
- name: Clients (v2)
  x-smallrye-profile-admin: ""
components:
  schemas:
    Auth:
.........    

JSON

$ curl -H "Accept: application/json" http://localhost:9000/openapi
{
  "openapi" : "3.1.0",
  "tags" : [ {
    "name" : "Clients (v2)",
    "x-smallrye-profile-admin" : ""
  } ],
  "components" : {
    "schemas" : {
      "Auth" : {
.........    

Im happy to takle a more refined solution in a follow up task.

@robson90 robson90 force-pushed the feature/admin-api-v2-openapi branch from eccf1bd to 685aef8 Compare August 15, 2025 13:48
Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerWellKnownProviderTest#testMetaDataEndpointIsCorrectlySetup

Keycloak CI - Base IT (6)

java.lang.AssertionError: expected:<[RSA-OAEP, RSA-OAEP-256]> but was:<[RSA-OAEP-256, RSA-OAEP]>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

Copy link
Contributor

@mabartos mabartos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robson90 Nice work! In general, LGTM. Just added a few small comments to improve it a little bit more. Primarily, the diff between /openapi-ui and /openapi/ui.

@robson90 robson90 force-pushed the feature/admin-api-v2-openapi branch 2 times, most recently from 0a393d3 to fdea9b2 Compare August 18, 2025 09:03
Copy link
Contributor

@mabartos mabartos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robson90 Nice work, LGTM.

@vmuzikar Do you wanna look at it as well?

Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerWellKnownProviderTest#testMetaDataEndpointIsCorrectlySetup

Keycloak CI - Base IT (6)

java.lang.AssertionError: expected:<[RSA-OAEP, RSA-OAEP-256]> but was:<[RSA-OAEP-256, RSA-OAEP]>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

@robson90 robson90 force-pushed the feature/admin-api-v2-openapi branch from fdea9b2 to fefb631 Compare August 18, 2025 12:11
Copy link
Contributor

@mabartos mabartos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerWellKnownProviderTest#testMetaDataEndpointIsCorrectlySetup

Keycloak CI - Base IT (6)

java.lang.AssertionError: expected:<[RSA-OAEP, RSA-OAEP-256]> but was:<[RSA-OAEP-256, RSA-OAEP]>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...
java.lang.AssertionError: expected:<[RSA-OAEP, RSA-OAEP-256]> but was:<[RSA-OAEP-256, RSA-OAEP]>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:120)
	at org.junit.Assert.assertEquals(Assert.java:146)
...

Report flaky test

Copy link
Contributor

@vmuzikar vmuzikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robson90 Thank you, LGTM!

@vmuzikar vmuzikar merged commit 5b68ca1 into keycloak:feature/admin-api-v2 Aug 18, 2025
67 of 74 checks passed
mabartos pushed a commit that referenced this pull request Sep 5, 2025
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 13, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 13, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 14, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 23, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 24, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 30, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 31, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Oct 31, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
vmuzikar pushed a commit to vmuzikar/keycloak that referenced this pull request Nov 3, 2025
Signed-off-by: Robin Meese <[email protected]>
Signed-off-by: Václav Muzikář <[email protected]>

# Conflicts:
#	quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/PropertyMappers.java
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityCheckHelpAll.approved.txt
#	quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testUpdateCompatibilityMetadataHelpAll.approved.txt
@robson90 robson90 deleted the feature/admin-api-v2-openapi branch December 30, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flaky-test team/admin-api-wg Admin API v2 Working Group

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants