aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-generator
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-ws-generator')
-rwxr-xr-xsonar-ws-generator/run.sh1
-rw-r--r--sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java7
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-ws-generator/run.sh b/sonar-ws-generator/run.sh
index 4513503eec6..e79b51a3d34 100755
--- a/sonar-ws-generator/run.sh
+++ b/sonar-ws-generator/run.sh
@@ -7,3 +7,4 @@ set -euo pipefail
mvn clean package -Prun-ws-generator
java -Dorchestrator.configUrl=file://$* -jar target/sonar-ws-generator-*-SNAPSHOT-jar-with-dependencies.jar
+cp -R target/generated-sources/results/org/sonarqube/ws/client/* ../sonar-ws-generated/src/main/java/org/sonarqube/ws/client
diff --git a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java
index 1d062a2f9aa..aebeabf2323 100644
--- a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java
+++ b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/CodeFormatter.java
@@ -30,7 +30,6 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.io.Writer;
-import java.util.Arrays;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
@@ -39,12 +38,11 @@ import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.Arrays.asList;
public class CodeFormatter {
- private static final Set<String> PATH_EXCLUSIONS = new HashSet<>(Arrays.asList(
- "api/components", "api/issues", "api/measures", "api/organizations", "api/permissions", "api/projects",
- "api/project_analyses", "api/qualityprofiles", "api/rules", "api/settings", "api/users", "api/user_groups"));
+ private static final Set<String> PATH_EXCLUSIONS = new HashSet<>(asList("api/orchestrator"));
public static void format(String json) {
JsonObject jsonElement = new Gson().fromJson(json, JsonObject.class);
@@ -57,6 +55,7 @@ public class CodeFormatter {
String webServicePath = webService.get("path").getAsString();
if (PATH_EXCLUSIONS.contains(webServicePath)) {
+ System.out.println("Excluding WS " + webServicePath + " from code generation");
continue;
}