This is an automated email from the ASF dual-hosted git repository.

ppalaga pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit a93570b8f9951827149f80e221f7e02e514b43ce
Author: Amos Feng <zh.f...@gmail.com>
AuthorDate: Wed Apr 20 15:14:34 2022 +0800

    Fix #3737 to register reflection methods of OpenAPI Schema (#3738)
---
 .../openapi/java/deployment/OpenApiJavaProcessor.java     |  2 +-
 .../quarkus/component/openapijava/it/model/Fruit.java     | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git 
a/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaProcessor.java
 
b/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaProcessor.java
index af8d8a3496..ebb6ec5fc3 100644
--- 
a/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaProcessor.java
+++ 
b/extensions/openapi-java/deployment/src/main/java/org/apache/camel/quarkus/component/openapi/java/deployment/OpenApiJavaProcessor.java
@@ -48,6 +48,6 @@ class OpenApiJavaProcessor {
 
         IndexView index = combinedIndex.getIndex();
         
index.getAllKnownSubclasses(SCHEMA).stream().map(ClassInfo::toString).forEach(
-                name -> reflectiveClasses.produce(new 
ReflectiveClassBuildItem(false, false, name)));
+                name -> reflectiveClasses.produce(new 
ReflectiveClassBuildItem(true, false, name)));
     }
 }
diff --git 
a/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/model/Fruit.java
 
b/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/model/Fruit.java
index 52117e7fb8..61ff13ebe3 100644
--- 
a/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/model/Fruit.java
+++ 
b/integration-tests/openapi-java/src/main/java/org/apache/camel/quarkus/component/openapijava/it/model/Fruit.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.quarkus.component.openapijava.it.model;
 
+import java.util.List;
+
 import io.quarkus.runtime.annotations.RegisterForReflection;
 
 @RegisterForReflection
@@ -24,10 +26,23 @@ public class Fruit {
     public String name;
     public String description;
     public Integer num;
+    private List<Element> elements;
 
     public Fruit(String name, String description, Integer num) {
         this.name = name;
         this.description = description;
         this.num = num;
     }
+
+    public List<Element> getElements() {
+        return elements;
+    }
+
+    public void setElements(List<Element> elements) {
+        this.elements = elements;
+    }
+}
+
+@RegisterForReflection
+class Element {
 }

Reply via email to