]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7968 Remove indicativeSize field in /api/settings/list_definitions WS 1169/head
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 24 Aug 2016 10:08:38 +0000 (12:08 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 24 Aug 2016 10:09:41 +0000 (12:09 +0200)
server/sonar-server/src/main/java/org/sonar/server/settings/ws/ListDefinitionsAction.java
server/sonar-server/src/main/resources/org/sonar/server/settings/ws/list_definitions-example.json
server/sonar-server/src/test/java/org/sonar/server/settings/ws/ListDefinitionsActionTest.java
sonar-ws/src/main/protobuf/ws-settings.proto

index 107046420eddd7e1383f5c03999873541f00e0ca..3baef74a38052d945a64c66ae962f56826d70d86 100644 (file)
@@ -142,7 +142,6 @@ public class ListDefinitionsAction implements SettingsWsAction {
       .setName(fieldDefinition.name())
       .setDescription(fieldDefinition.description())
       .setType(Settings.Type.valueOf(fieldDefinition.type().name()))
-      .setIndicativeSize(fieldDefinition.indicativeSize())
       .addAllOptions(fieldDefinition.options())
       .build();
   }
index 041b22da2e83d9b0ebe501432243077f58f144b0..e69a3aeffaa441794457f181ba6868c93a2db525 100644 (file)
@@ -52,7 +52,6 @@
           "name": "Text",
           "description": "Text field description",
           "type": "TEXT",
-          "indicativeSize": 10,
           "options": []
         },
         {
@@ -60,7 +59,6 @@
           "name": "List",
           "description": "List field description",
           "type": "SINGLE_SELECT_LIST",
-          "indicativeSize": 20,
           "options": [
             "value1",
             "value2"
index b26687cbb2ad8d7c5510aeb0ca308fabe899226b..47ebd860da5fe7a39253f0e5de644d4f6cc2797a 100644 (file)
@@ -172,7 +172,7 @@ public class ListDefinitionsActionTest {
       .builder("foo")
       .type(PropertyType.PROPERTY_SET)
       .fields(
-        PropertyFieldDefinition.build("boolean").name("Boolean").description("boolean desc").type(PropertyType.BOOLEAN).indicativeSize(15).build(),
+        PropertyFieldDefinition.build("boolean").name("Boolean").description("boolean desc").type(PropertyType.BOOLEAN).build(),
         PropertyFieldDefinition.build("list").name("List").description("list desc").type(PropertyType.SINGLE_SELECT_LIST).options("one", "two").build())
       .build());
 
@@ -188,15 +188,12 @@ public class ListDefinitionsActionTest {
     assertThat(definition.getFields(0).getDescription()).isEqualTo("boolean desc");
     assertThat(definition.getFields(0).getType()).isEqualTo(BOOLEAN);
     assertThat(definition.getFields(0).getOptionsCount()).isZero();
-    assertThat(definition.getFields(0).getIndicativeSize()).isEqualTo(15);
 
     assertThat(definition.getFields(1).getKey()).isEqualTo("list");
     assertThat(definition.getFields(1).getName()).isEqualTo("List");
     assertThat(definition.getFields(1).getDescription()).isEqualTo("list desc");
     assertThat(definition.getFields(1).getType()).isEqualTo(SINGLE_SELECT_LIST);
     assertThat(definition.getFields(1).getOptionsList()).containsExactly("one", "two");
-    // 20 is the default value
-    assertThat(definition.getFields(1).getIndicativeSize()).isEqualTo(20);
   }
 
   @Test
@@ -363,7 +360,6 @@ public class ListDefinitionsActionTest {
             .name("Text")
             .description("Text field description")
             .type(PropertyType.TEXT)
-            .indicativeSize(10)
             .build(),
           PropertyFieldDefinition.build("list")
             .name("List")
index 76da8a6910c4e1fa9a9cd80b56e65e149833e673..c4f09b10fe1e0c247af5817df1a19da25b722b3f 100644 (file)
@@ -47,8 +47,7 @@ message Field {
   optional string name = 2;
   optional string description = 3;
   optional Type type = 4;
-  optional int32 indicativeSize = 5;
-  repeated string options = 6;
+  repeated string options = 5;
 }
 
 enum Type {