From 86e4f062a887c2426ec289ff551baa1a4d994180 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 8 Mar 2022 17:19:51 +0200 Subject: [PATCH] Fix openapi service loader issue in native mode Fixes: #24132 --- .../smallrye/openapi/deployment/SmallRyeOpenApiProcessor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/SmallRyeOpenApiProcessor.java b/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/SmallRyeOpenApiProcessor.java index 0df8c728f3a259..808ef9a79e28bd 100644 --- a/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/SmallRyeOpenApiProcessor.java +++ b/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/SmallRyeOpenApiProcessor.java @@ -31,6 +31,7 @@ import org.eclipse.microprofile.openapi.annotations.responses.APIResponses; import org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement; import org.eclipse.microprofile.openapi.models.OpenAPI; +import org.eclipse.microprofile.openapi.spi.OASFactoryResolver; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.AnnotationTarget; import org.jboss.jandex.AnnotationValue; @@ -159,6 +160,7 @@ void contributeClassesToIndex(BuildProducer a void registerNativeImageResources(BuildProducer serviceProvider) throws IOException { // To map from smallrye and mp config to quarkus serviceProvider.produce(ServiceProviderBuildItem.allProvidersFromClassPath(OpenApiConfigMapping.class.getName())); + serviceProvider.produce(ServiceProviderBuildItem.allProvidersFromClassPath(OASFactoryResolver.class.getName())); } @BuildStep