This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch openapi2 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6564e8a2751c36fd95fd10a657b91ca164215cd7 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Mar 26 09:50:40 2024 +0100 CAMEL-20557: Rest DSL to use openapi spec directly --- .../java/org/apache/camel/spi/RestApiConsumerFactory.java | 12 ++++++------ .../org/apache/camel/spi/RestOpenApiConsumerFactory.java | 10 +++++----- .../apache/camel/support/RestConsumerContextPathMatcher.java | 3 ++- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java b/core/camel-api/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java index 82e5b9e735e..3738b260d6b 100644 --- a/core/camel-api/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java +++ b/core/camel-api/src/main/java/org/apache/camel/spi/RestApiConsumerFactory.java @@ -35,13 +35,13 @@ public interface RestApiConsumerFactory { * Creates a new REST API <a href="http://camel.apache.org/event-driven-consumer.html">Event Driven Consumer</a>, * which provides API listing of the REST services * - * @param camelContext the camel context - * @param processor the processor - * @param contextPath the context-path + * @param camelContext the camel context + * @param processor the processor + * @param contextPath the context-path * @param configuration REST configuration - * @param parameters additional parameters - * @return a newly created REST API consumer - * @throws Exception can be thrown + * @param parameters additional parameters + * @return a newly created REST API consumer + * @throws Exception can be thrown */ Consumer createApiConsumer( CamelContext camelContext, Processor processor, String contextPath, diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/RestOpenApiConsumerFactory.java b/core/camel-api/src/main/java/org/apache/camel/spi/RestOpenApiConsumerFactory.java index 99a2ff513fa..79167c9d0fc 100644 --- a/core/camel-api/src/main/java/org/apache/camel/spi/RestOpenApiConsumerFactory.java +++ b/core/camel-api/src/main/java/org/apache/camel/spi/RestOpenApiConsumerFactory.java @@ -16,15 +16,15 @@ */ package org.apache.camel.spi; +import java.util.Map; + import org.apache.camel.CamelContext; import org.apache.camel.Consumer; import org.apache.camel.Processor; -import java.util.Map; - /** - * Allows SPI to plugin a {@link RestOpenApiConsumerFactory} that creates the Camel {@link Consumer} responsible for handling - * incoming HTTP requests from clients that request to access REST services which has been created using the + * Allows SPI to plugin a {@link RestOpenApiConsumerFactory} that creates the Camel {@link Consumer} responsible for + * handling incoming HTTP requests from clients that request to access REST services which has been created using the * <a href="http://camel.apache.org/rest-dsl">rest-dsl</a> for an entire open-api specification. * * @see RestApiConsumerFactory @@ -39,7 +39,7 @@ public interface RestOpenApiConsumerFactory { * * @param camelContext the camel context * @param processor the processor - * @param contextPath the context-path + * @param contextPath the context-path * @param configuration REST configuration * @param parameters additional parameters * @return a newly created REST consumer diff --git a/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java b/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java index 652e13beb8b..a5d32037997 100644 --- a/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java +++ b/core/camel-support/src/main/java/org/apache/camel/support/RestConsumerContextPathMatcher.java @@ -122,7 +122,8 @@ public final class RestConsumerContextPathMatcher { * @param consumerPaths the list of consumer context path details * @return the best matched consumer, or <tt>null</tt> if none could be determined. */ - public static <T> ConsumerPath<T> matchBestPath(String requestMethod, String requestPath, List<ConsumerPath<T>> consumerPaths) { + public static < + T> ConsumerPath<T> matchBestPath(String requestMethod, String requestPath, List<ConsumerPath<T>> consumerPaths) { ConsumerPath<T> answer = null; List<ConsumerPath<T>> candidates = new ArrayList<>();