From f89a69964f798e4d20c14d67f5e829349dea67e7 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 0df8c728f3a25..d01db1f3455b2 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; @@ -156,9 +157,10 @@ void contributeClassesToIndex(BuildProducer a } @BuildStep - void registerNativeImageResources(BuildProducer serviceProvider) throws IOException { + void registerNativeImageResources(BuildProducer serviceProvider) { // To map from smallrye and mp config to quarkus serviceProvider.produce(ServiceProviderBuildItem.allProvidersFromClassPath(OpenApiConfigMapping.class.getName())); + serviceProvider.produce(ServiceProviderBuildItem.allProvidersFromClassPath(OASFactoryResolver.class.getName())); } @BuildStep