djcoleman commented on code in PR #4125:
URL: https://github.com/apache/camel-quarkus/pull/4125#discussion_r982376557


##########
integration-tests/rest-openapi/src/main/java/org/apache/camel/quarkus/component/rest/openapi/it/RestOpenapiResource.java:
##########
@@ -27,15 +30,54 @@
 import org.apache.camel.ProducerTemplate;
 
 @Path("/rest-openapi")
+@ApplicationScoped
 public class RestOpenapiResource {
     @Inject
     ProducerTemplate producerTemplate;
 
-    @Path("/fruits/list")
+    @Path("/fruits/list/json")
     @Produces(MediaType.APPLICATION_JSON)
     @GET
     public Response invokeListFruitsOperation(@QueryParam("port") int port) {
-        String response = 
producerTemplate.requestBodyAndHeader("direct:start", null, "test-port", port, 
String.class);
+        return invokeListFruitsOperation("start-web-json", port);
+    }
+
+    @Path("/fruits/list/yaml")
+    @Produces(MediaType.APPLICATION_JSON)
+    @GET
+    public Response invokeListFruitsOperationYaml(@QueryParam("port") int 
port) {
+        return invokeListFruitsOperation("start-web-yaml", port);
+    }
+
+    @Path("/fruits/list/file")
+    @Produces(MediaType.APPLICATION_JSON)
+    @GET
+    public Response invokeListFruitsOperationFile(@QueryParam("port") int 
port) {
+        Response response = invokeListFruitsOperation("start-file", port);
+        File openApiFile = new File("output", "openapi.json");

Review Comment:
   I moved that logic to the test, which also simplified the route for that 
test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to