djcoleman commented on code in PR #4125: URL: https://github.com/apache/camel-quarkus/pull/4125#discussion_r982459327
########## integration-tests/rest-openapi/src/test/java/org/apache/camel/quarkus/component/rest/openapi/it/RestOpenapiTest.java: ########## @@ -16,21 +16,71 @@ */ package org.apache.camel.quarkus.component.rest.openapi.it; +import java.io.File; +import java.io.FileWriter; +import java.nio.file.Files; +import java.nio.file.Paths; + import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; import io.restassured.http.ContentType; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import static org.hamcrest.Matchers.containsInAnyOrder; @QuarkusTest class RestOpenapiTest { + private static final String OUTPUT_DIRECTORY = "target"; + private static final String OPENAPI_FILE = "openapi.json"; + + @BeforeAll + public static void createOpenApiJsonFile() throws Exception { + RestOpenApiBean bean = new RestOpenApiBean(); + String openApiContents = bean.getOpenApiJson(); + Files.createDirectories(Paths.get(OUTPUT_DIRECTORY)); + FileWriter writer = new FileWriter(new File(OUTPUT_DIRECTORY, OPENAPI_FILE)); + writer.write(openApiContents); + writer.close(); Review Comment: Thanks, I went with the simpler option. https://github.com/apache/camel-quarkus/pull/4125/files#diff-6a4752ac1d6dd891002c23c25c783ed383d570bbfe3014fa8b25815871fe9776R44 -- 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