From: Teryk Bellahsene Date: Mon, 8 Jun 2015 12:29:37 +0000 (+0200) Subject: SONAR-6570 WS metrics/search conform to guidelines naming X-Git-Tag: 5.2-RC1~1578 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3fd8ffc2fd5a4993daf8336d23dfcb487f383e93;p=sonarqube.git SONAR-6570 WS metrics/search conform to guidelines naming --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/metric/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/metric/ws/SearchAction.java index d5301ac7422..0dcbc08a1fa 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/metric/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/metric/ws/SearchAction.java @@ -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 index 3a7a4ddd8d7..00000000000 --- a/server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-list.json +++ /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 index 00000000000..3a7a4ddd8d7 --- /dev/null +++ b/server/sonar-server/src/main/resources/org/sonar/server/metric/ws/example-search.json @@ -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 +}