From 48e1679e974c9af8924b9171ab7fea2ba7b730b3 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Thu, 20 Nov 2014 14:15:16 +0100 Subject: [PATCH] clean analysis_report web services documentation and declare internal use --- .../server/computation/ws/ActiveAnalysisReportsAction.java | 3 +-- .../computation/ws/AnalysisReportHistorySearchAction.java | 4 ++-- .../org/sonar/server/computation/ws/example-list.json | 0 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 server/sonar-server/src/main/resources/org/sonar/server/computation/ws/example-list.json diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActiveAnalysisReportsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActiveAnalysisReportsAction.java index 4c1e7f038bb..71186dc5927 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActiveAnalysisReportsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActiveAnalysisReportsAction.java @@ -20,7 +20,6 @@ package org.sonar.server.computation.ws; -import com.google.common.io.Resources; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.RequestHandler; import org.sonar.api.server.ws.Response; @@ -72,7 +71,7 @@ public class ActiveAnalysisReportsAction implements RequestHandler { .createAction("active") .setDescription("List all the active analysis reports") .setSince("5.0") - .setResponseExample(Resources.getResource(getClass(), "example-list.json")) + .setInternal(true) .setHandler(this); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/AnalysisReportHistorySearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/AnalysisReportHistorySearchAction.java index be4cef61c1c..7417e396a3c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/AnalysisReportHistorySearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/AnalysisReportHistorySearchAction.java @@ -79,7 +79,7 @@ public class AnalysisReportHistorySearchAction implements RequestHandler { JsonWriter json = response.newJsonWriter().beginObject(); searchOptions.writeStatistics(json, results); - writeReports(results, json, searchOptions); + writeReports(results, json); json.endObject().close(); } @@ -87,7 +87,7 @@ public class AnalysisReportHistorySearchAction implements RequestHandler { UserSession.get().checkGlobalPermission(GlobalPermissions.SYSTEM_ADMIN); } - private void writeReports(Result result, JsonWriter json, SearchOptions options) { + private void writeReports(Result result, JsonWriter json) { json.name("reports").beginArray(); for (Activity reportActivity : result.getHits()) { json.beginObject(); diff --git a/server/sonar-server/src/main/resources/org/sonar/server/computation/ws/example-list.json b/server/sonar-server/src/main/resources/org/sonar/server/computation/ws/example-list.json deleted file mode 100644 index e69de29bb2d..00000000000 -- 2.39.5