aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/GroupWsSupport.java2
-rw-r--r--server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/SearchAction.java2
-rw-r--r--server/sonar-webserver-webapi/src/test/java/org/sonar/server/usergroups/ws/SearchActionTest.java12
-rw-r--r--sonar-ws/src/main/protobuf/ws-user_groups.proto2
4 files changed, 9 insertions, 9 deletions
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/GroupWsSupport.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/GroupWsSupport.java
index 64437873f3d..6e395ae9b61 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/GroupWsSupport.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/GroupWsSupport.java
@@ -147,7 +147,7 @@ public class GroupWsSupport {
static UserGroups.Group.Builder toProtobuf(OrganizationDto organization, GroupDto group, int membersCount, boolean isDefault) {
UserGroups.Group.Builder wsGroup = UserGroups.Group.newBuilder()
- .setUuid(group.getUuid())
+ .setId(group.getUuid())
.setOrganization(organization.getKey())
.setName(group.getName())
.setMembersCount(membersCount)
diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/SearchAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/SearchAction.java
index 2d9455fc5e0..74f60f0d113 100644
--- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/SearchAction.java
+++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/usergroups/ws/SearchAction.java
@@ -141,7 +141,7 @@ public class SearchAction implements UserGroupsWsAction {
private static Group toWsGroup(GroupDto group, Integer memberCount, Set<String> fields, boolean isDefault) {
Group.Builder groupBuilder = Group.newBuilder()
- .setUuid(group.getUuid())
+ .setId(group.getUuid())
.setDefault(isDefault);
if (fields.contains(FIELD_NAME)) {
groupBuilder.setName(group.getName());
diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/usergroups/ws/SearchActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/usergroups/ws/SearchActionTest.java
index 504125cdefc..0819f659dd8 100644
--- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/usergroups/ws/SearchActionTest.java
+++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/usergroups/ws/SearchActionTest.java
@@ -165,15 +165,15 @@ public class SearchActionTest {
insertDefaultGroup(db.getDefaultOrganization(), "sonar-users", 0);
loginAsDefaultOrgAdmin();
- assertThat(call(ws.newRequest()).getGroupsList()).extracting(Group::hasUuid, Group::hasName, Group::hasDescription, Group::hasMembersCount)
+ assertThat(call(ws.newRequest()).getGroupsList()).extracting(Group::hasId, Group::hasName, Group::hasDescription, Group::hasMembersCount)
.containsOnly(tuple(true, true, true, true));
- assertThat(call(ws.newRequest().setParam(FIELDS, "")).getGroupsList()).extracting(Group::hasUuid, Group::hasName, Group::hasDescription, Group::hasMembersCount)
+ assertThat(call(ws.newRequest().setParam(FIELDS, "")).getGroupsList()).extracting(Group::hasId, Group::hasName, Group::hasDescription, Group::hasMembersCount)
.containsOnly(tuple(true, true, true, true));
- assertThat(call(ws.newRequest().setParam(FIELDS, "name")).getGroupsList()).extracting(Group::hasUuid, Group::hasName, Group::hasDescription, Group::hasMembersCount)
+ assertThat(call(ws.newRequest().setParam(FIELDS, "name")).getGroupsList()).extracting(Group::hasId, Group::hasName, Group::hasDescription, Group::hasMembersCount)
.containsOnly(tuple(true, true, false, false));
- assertThat(call(ws.newRequest().setParam(FIELDS, "description")).getGroupsList()).extracting(Group::hasUuid, Group::hasName, Group::hasDescription, Group::hasMembersCount)
+ assertThat(call(ws.newRequest().setParam(FIELDS, "description")).getGroupsList()).extracting(Group::hasId, Group::hasName, Group::hasDescription, Group::hasMembersCount)
.containsOnly(tuple(true, false, true, false));
- assertThat(call(ws.newRequest().setParam(FIELDS, "membersCount")).getGroupsList()).extracting(Group::hasUuid, Group::hasName, Group::hasDescription, Group::hasMembersCount)
+ assertThat(call(ws.newRequest().setParam(FIELDS, "membersCount")).getGroupsList()).extracting(Group::hasId, Group::hasName, Group::hasDescription, Group::hasMembersCount)
.containsOnly(tuple(true, false, false, true));
}
@@ -188,7 +188,7 @@ public class SearchActionTest {
SearchWsResponse response = call(ws.newRequest().setParam("organization", org.getKey()));
- assertThat(response.getGroupsList()).extracting(Group::getUuid, Group::getName).containsOnly(tuple(group.getUuid(), "users"));
+ assertThat(response.getGroupsList()).extracting(Group::getId, Group::getName).containsOnly(tuple(group.getUuid(), "users"));
}
@Test
diff --git a/sonar-ws/src/main/protobuf/ws-user_groups.proto b/sonar-ws/src/main/protobuf/ws-user_groups.proto
index d4e70780514..787f23845c8 100644
--- a/sonar-ws/src/main/protobuf/ws-user_groups.proto
+++ b/sonar-ws/src/main/protobuf/ws-user_groups.proto
@@ -43,7 +43,7 @@ message SearchWsResponse {
}
message Group {
- optional string uuid = 1;
+ optional string id = 1;
optional string organization = 2;
optional string name = 3;
optional string description = 4;