Repository: quarkusio/quarkus
Issue: OpenAPI OASFilter not working in dev mode

When using a OASFilter this works when normally running, but when ran in dev mode it throws a ClassNotFoundException.

I've made a sample based on the using-openapi-swaggerui quickstart: https://github.com/Edubits/quarkus-quickstarts/tree/openapi-filter

Exception when running `mvn clean compile quarkus:dev`:
```
09:42:11,874 ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.ExceptionInInitializerError
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/java.lang.Class.newInstance(Class.java:584)
	at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:118)
	at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:108)
	at io.quarkus.dev.DevModeMain.main(DevModeMain.java:66)
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl1.<clinit>(Unknown Source)
	... 8 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.acme.openapi.OpenApiFilter
	at io.smallrye.openapi.runtime.OpenApiProcessor.getFilter(OpenApiProcessor.java:110)
	at io.quarkus.smallrye.openapi.runtime.SmallRyeOpenApiTemplate.filter(SmallRyeOpenApiTemplate.java:67)
	at io.quarkus.smallrye.openapi.runtime.SmallRyeOpenApiTemplate.access$100(SmallRyeOpenApiTemplate.java:37)
	at io.quarkus.smallrye.openapi.runtime.SmallRyeOpenApiTemplate$1.created(SmallRyeOpenApiTemplate.java:52)
	at io.quarkus.arc.runtime.ArcDeploymentTemplate.initBeanContainer(ArcDeploymentTemplate.java:108)
	at io.quarkus.deployment.steps.ArcAnnotationProcessor$build5.deploy(Unknown Source)
	... 9 more
Caused by: java.lang.ClassNotFoundException: org.acme.openapi.OpenApiFilter
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at io.smallrye.openapi.runtime.OpenApiProcessor.getFilter(OpenApiProcessor.java:107)
	... 14 more
```

Changed files:
extensions/smallrye-openapi/runtime/src/main/java/io/quarkus/smallrye/openapi/runtime/SmallRyeOpenApiTemplate.java

diff --git a/extensions/smallrye-openapi/runtime/src/main/java/io/quarkus/smallrye/openapi/runtime/SmallRyeOpenApiTemplate.java b/extensions/smallrye-openapi/runtime/src/main/java/io/quarkus/smallrye/openapi/runtime/SmallRyeOpenApiTemplate.java
index beb9ebfae5a..eee3e0065ec 100644
--- a/extensions/smallrye-openapi/runtime/src/main/java/io/quarkus/smallrye/openapi/runtime/SmallRyeOpenApiTemplate.java
+++ b/extensions/smallrye-openapi/runtime/src/main/java/io/quarkus/smallrye/openapi/runtime/SmallRyeOpenApiTemplate.java
@@ -43,7 +43,8 @@ public void created(BeanContainer container) {
                 Config config = ConfigProvider.getConfig();
                 OpenApiConfig openApiConfig = new OpenApiConfigImpl(config);
 
-                OpenAPI readerModel = OpenApiProcessor.modelFromReader(openApiConfig, Quarkus.class.getClassLoader());
+                OpenAPI readerModel = OpenApiProcessor.modelFromReader(openApiConfig,
+                        Thread.currentThread().getContextClassLoader());
 
                 OpenApiDocument document = createDocument(openApiConfig);
                 document.modelFromAnnotations(annotationModel);
@@ -64,6 +65,7 @@ private OpenApiDocument createDocument(OpenApiConfig openApiConfig) {
     }
 
     private OASFilter filter(OpenApiConfig openApiConfig) {
-        return OpenApiProcessor.getFilter(openApiConfig, Quarkus.class.getClassLoader());
+        return OpenApiProcessor.getFilter(openApiConfig,
+                Thread.currentThread().getContextClassLoader());
     }
 }