jamesnetherton commented on code in PR #6769: URL: https://github.com/apache/camel-quarkus/pull/6769#discussion_r1837612357
########## extensions/rest-openapi/deployment/src/main/java/org/apache/camel/quarkus/component/rest/openapi/deployment/CamelQuarkusSwaggerCodegenProvider.java: ########## @@ -78,6 +80,24 @@ public boolean trigger(CodeGenContext context) throws CodeGenException { } } + Optional<String> locations = config.getOptionalValue("quarkus.camel.openapi.codegen.locations", String.class); + if (locations.isPresent()) { + for (String location : locations.get().split(",")) { + try { + URI uri; + if (location.indexOf("://") == -1) { + uri = Thread.currentThread().getContextClassLoader().getResource(location).toURI(); + } else { + uri = new URI(location); + } + Path path = Path.of(uri); + specFiles.add(path.toAbsolutePath().toString()); + } catch (Exception e) { + LOG.warn("Can not find location " + location + " failing with " + e); Review Comment: ```suggestion LOG.warnf(e, "Can not find location %s", location); ``` ########## extensions/rest-openapi/runtime/src/main/java/org/apache/camel/quarkus/rest/openapi/runtime/RestOpenApiBuildTimeConfig.java: ########## @@ -94,5 +95,13 @@ public static class CodeGenConfig { */ @ConfigItem public Map<String, String> additionalProperties; + + /** + * A comma list of the spec locations. Review Comment: ```suggestion * A comma separated list of OpenAPI spec locations. ``` ########## extensions/rest-openapi/deployment/src/main/java/org/apache/camel/quarkus/component/rest/openapi/deployment/CamelQuarkusSwaggerCodegenProvider.java: ########## @@ -86,6 +106,7 @@ public boolean trigger(CodeGenContext context) throws CodeGenException { Boolean.class); for (String specFile : specFiles) { + LOG.info("generate models for " + specFile); Review Comment: ```suggestion LOG.infof("Generating models for %s", specFile); ``` -- 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