From 61d1ea91b5b1351f6550482b8b15f7d5b713e7b6 Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Mon, 5 Jun 2023 17:26:33 +0200 Subject: [PATCH] [SONAR-19484] Update quality gates endpoints examples with the removal of the ID field --- .../org/sonar/server/qualitygate/ws/GetByProjectActionIT.java | 1 - .../it/java/org/sonar/server/qualitygate/ws/ListActionIT.java | 2 +- .../org/sonar/server/qualitygate/ws/get_by_project-example.json | 1 - .../resources/org/sonar/server/qualitygate/ws/list-example.json | 2 -- .../resources/org/sonar/server/qualitygate/ws/show-example.json | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java index 97821202624..df891b060df 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/GetByProjectActionIT.java @@ -80,7 +80,6 @@ public class GetByProjectActionIT { .getInput(); assertJson(result) - .ignoreFields("id") .isSimilarTo(getClass().getResource("get_by_project-example.json")); } diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java index ebee86f26c0..a09f872cf8a 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/ListActionIT.java @@ -214,7 +214,7 @@ public class ListActionIT { String response = ws.newRequest().execute().getInput(); - assertJson(response).ignoreFields("id", "default") + assertJson(response).ignoreFields("default") .isSimilarTo(getClass().getResource("list-example.json")); } diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/get_by_project-example.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/get_by_project-example.json index b9d13f854ab..c67219f2c65 100644 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/get_by_project-example.json +++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/get_by_project-example.json @@ -1,6 +1,5 @@ { "qualityGate": { - "id": "AU-Tpxb--iU5OvuD2FLy", "name": "My team QG", "default": false } diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/list-example.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/list-example.json index b1a72535a1c..683855bfbf8 100644 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/list-example.json +++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/list-example.json @@ -1,7 +1,6 @@ { "qualitygates": [ { - "id": "AU-Tpxb--iU5OvuD2FLy", "name": "Sonar way", "isDefault": true, "isBuiltIn": true, @@ -16,7 +15,6 @@ } }, { - "id": "AU-Tpxb--iU5OvuD2FLz", "name": "Sonar way - Without Coverage", "isDefault": false, "isBuiltIn": false, diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/show-example.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/show-example.json index 99858d38935..d27e328bf94 100644 --- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/show-example.json +++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/qualitygate/ws/show-example.json @@ -1,5 +1,4 @@ { - "id": 5, "name": "My Quality Gate", "conditions": [ { -- 2.39.5