You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/09/15 15:56:57 UTC
[camel] 08/22: CAMEL-15478: api-component should generate @ApiParam
with more fine grained details so we know which parameter is for which api
method.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch api
in repository https://gitbox.apache.org/repos/asf/camel.git
commit f0f09862becd9a71259cf99f2f07d2c9db40df73
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Sep 14 10:23:10 2020 +0200
CAMEL-15478: api-component should generate @ApiParam with more fine grained details so we know which parameter is for which api method.
---
.../java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java | 2 --
.../src/main/java/org/apache/camel/maven/AbstractGeneratorMojo.java | 3 ++-
.../apache/camel/maven/ApiJavaSourceComponentGeneratorMojoTest.java | 3 ---
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
index 1010c9d..c61ed53 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractApiMethodGeneratorMojo.java
@@ -98,10 +98,8 @@ public abstract class AbstractApiMethodGeneratorMojo extends AbstractApiMethodBa
method = StringHelper.after(method, " ");
}
if (method != null) {
- System.out.println("parameters " + method);
parameters.put(method, model.getParameters());
}
- System.out.println(method + " -> " + model.getMethodDescription());
parser.getDescriptions().put(method, model.getMethodDescription());
}
parser.setSignatures(signatures);
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractGeneratorMojo.java b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractGeneratorMojo.java
index 9d44f67..47e7cc9 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/AbstractGeneratorMojo.java
@@ -128,9 +128,10 @@ public abstract class AbstractGeneratorMojo extends AbstractMojo {
URL[] urls = project.getTestClasspathElements().stream()
.map(File::new)
.map(ThrowingHelper.wrapAsFunction(e -> e.toURI().toURL()))
- .peek(url -> System.out.println("Adding project path " + url))
+ .peek(url -> log.debug("Adding project path " + url))
.toArray(URL[]::new);
+ // if there are no urls then its because we are testing ourselves, then add the urls for source so java source parser can find them
if (urls.length == 0) {
urls = new URL[] { new URL("file:src/main/java/"), new URL("file:src/test/java/") };
}
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/ApiJavaSourceComponentGeneratorMojoTest.java b/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/ApiJavaSourceComponentGeneratorMojoTest.java
index fd9bad2..22275a8 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/ApiJavaSourceComponentGeneratorMojoTest.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/ApiJavaSourceComponentGeneratorMojoTest.java
@@ -17,11 +17,8 @@
package org.apache.camel.maven;
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
import org.apache.camel.component.test.TestProxy;
-import org.apache.velocity.VelocityContext;
import org.junit.jupiter.api.Test;
/**