]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6570 WS metrics/search conform to guidelines naming
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Mon, 8 Jun 2015 12:29:37 +0000 (14:29 +0200)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Mon, 8 Jun 2015 13:11:40 +0000 (15:11 +0200)
server/sonar-server/src/main/java/org/sonar/server/metric/ws/SearchAction.java
server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-list.json [deleted file]
server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-search.json [new file with mode: 0644]

index d5301ac74223f4c159e9ddedba20cb9289a6ede6..0dcbc08a1fa0f4d076a93e0df83ee8a39ec3e1ee 100644 (file)
@@ -41,7 +41,7 @@ public class SearchAction implements MetricsWsAction {
 
   private static final String ACTION = "search";
 
-  public static final String PARAM_IS_CUSTOM = "is_custom";
+  public static final String PARAM_IS_CUSTOM = "isCustom";
 
   public static final String FIELD_ID = "id";
   public static final String FIELD_KEY = "key";
@@ -65,7 +65,7 @@ public class SearchAction implements MetricsWsAction {
   public void define(WebService.NewController context) {
     WebService.NewAction action = context.createAction(ACTION)
       .setSince("5.2")
-      .setResponseExample(getClass().getResource("example-list.json"))
+      .setResponseExample(getClass().getResource("example-search.json"))
       .addPagingParams(100)
       .addFieldsParam(OPTIONAL_FIELDS)
       .setHandler(this);
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-list.json b/server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-list.json
deleted file mode 100644 (file)
index 3a7a4dd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  "metrics": [
-    {
-      "id": "23",
-      "key": "team_size",
-      "name": "Team size",
-      "description": "Number of people in the team",
-      "domain": "Management",
-      "type": "INT"
-    },
-    {
-      "id": "2",
-      "key": "uncovered_lines",
-      "name": "Uncovered lines",
-      "description": "Uncovered lines",
-      "domain": "Tests",
-      "type": "INT"
-    }
-  ],
-  "total": 2,
-  "p": 1,
-  "ps": 100
-}
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-search.json b/server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-search.json
new file mode 100644 (file)
index 0000000..3a7a4dd
--- /dev/null
@@ -0,0 +1,23 @@
+{
+  "metrics": [
+    {
+      "id": "23",
+      "key": "team_size",
+      "name": "Team size",
+      "description": "Number of people in the team",
+      "domain": "Management",
+      "type": "INT"
+    },
+    {
+      "id": "2",
+      "key": "uncovered_lines",
+      "name": "Uncovered lines",
+      "description": "Uncovered lines",
+      "domain": "Tests",
+      "type": "INT"
+    }
+  ],
+  "total": 2,
+  "p": 1,
+  "ps": 100
+}