Add openapi-smallrye extension to keycloak 13

I have successfully deployed a set of authenticators to keycloak 12 (wildfly 21) which uses smallrye-graphql-client. Now I upgraded to keycloak 13 and my spi no longer works because the used wildfly 23 is a streamed down version which doesn’t include the microprofile extension.

I think two ways that I could solve the issue:

  1. Adding the microprofile openapi-smallrye extension to wildfly.
  2. Adding all missing module files to my dependencies.

But I don’t know how to do any of those alternatives (more details below).

Extra information

Currently I get the following error

22:34:00,400 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-1) Uncaught server error: java.lang.NoClassDefFoundError: org.eclipse.microprofile.config.ConfigProvider
	at io.smallrye.graphql.client.typesafe.impl.HeaderBuilder.<clinit>(HeaderBuilder.java:116)
	at io.smallrye.graphql.client.typesafe.impl.GraphQlClientProxy.invoke(GraphQlClientProxy.java:51)
	at io.smallrye.graphql.client.typesafe.impl.GraphQlClientBuilderImpl.lambda$build$0(GraphQlClientBuilderImpl.java:59)
	at io.smallrye.graphql.client.typesafe.impl.GraphQlClientBuilderImpl$$Lambda$1633/0x0000000000000000.invoke(Unknown Source)
	at com.sun.proxy.$Proxy109.createOrUpdateProfileWithVerifiedPersonalInformation(Unknown Source)
	at fi.hel.my-plugin.utils.ProfiiliGraphQLClient.sendSuomiFiData(ProfiiliGraphQLClient.java:39)
	at fi.hel.my-plugin.utils.SessionNoteTransferService.transferSuomiFiNotes(SessionNoteTransferService.java:27)

My build.gradle has

dependencies {
    dependenciesToInclude "io.smallrye:smallrye-graphql-client:1.0.20"

    implementation "org.apache.geronimo.config:geronimo-config-impl:1.2.2"
    compileOnly 'org.projectlombok:lombok:1.18.16'
    annotationProcessor 'org.projectlombok:lombok:1.18.16'

    providedCompile "javax.enterprise:cdi-api:2.0"
    providedCompile "org.keycloak:keycloak-server-spi:${keycloakVersion}"
    providedCompile "org.keycloak:keycloak-server-spi-private:${keycloakVersion}"
    providedCompile("org.keycloak:keycloak-services:${keycloakVersion}") {
        exclude group: 'org.slf4j', module: 'slf4j-api'
        exclude group: 'org.slf4j', module: 'slf4j-log4j12'
    }
    providedCompile "org.keycloak:keycloak-model-api:1.8.1.Final"
    providedCompile "org.eclipse.microprofile.graphql:microprofile-graphql-api:1.0.3"
    configurations.compile.extendsFrom(configurations.dependenciesToInclude)

    providedCompile("org.keycloak:keycloak-saml-core-public:${keycloakVersion}") {
        exclude group: 'org.slf4j', module: 'slf4j-api'
    }
    providedCompile "org.slf4j:slf4j-api:1.7.30"
}

When I tried to add the modules to my project I got the following error

22:25:47,062 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "my-plugins-0.10.0.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"my-plugins-0.10.0.ear\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException
    Caused by: javax.enterprise.event.ObserverException
    Caused by: java.lang.NoClassDefFoundError: Failed to link org/jboss/resteasy/microprofile/config/ServletConfigSource (Module \"org.jboss.resteasy.resteasy-jaxrs\" version 3.15.1.Final from local module loader @38bc2d60 (finder: local module finder @1cd3c9cd (roots: /Users/xxx/keycloak/standalone/keycloak-13.0.0/modules,/Users/xxx/keycloak/standalone/keycloak-13.0.0/modules/system/layers/keycloak,/Users/xxx/keycloak/standalone/keycloak-13.0.0/modules/system/layers/base))): org.eclipse.microprofile.config.spi.ConfigSource"}}

I had modified the dependenciesToInclude in the following way:

    dependenciesToInclude "io.smallrye:smallrye-graphql-client:1.0.20",
            "io.smallrye.config:smallrye-config:2.3.0",
            "org.jboss.resteasy:resteasy-client:4.6.0.Final",
            "org.wildfly:wildfly-microprofile-config-smallrye:23.0.2.Final",
            "org.wildfly:wildfly-microprofile-openapi-smallrye:23.0.2.Final",
            "io.smallrye:smallrye-open-api-jaxrs:2.1.4",
            "org.owasp.encoder:encoder:1.2.3"

I also found out that if the extension would have been shipped but deactivated, I could use it with the command

[standalone@localhost:9990 /]  /extension=org.wildfly.extension.microprofile.openapi-smallrye:add()
{"outcome" => "success"}

But the microprofile jars are not in the modules folder.