From 4726b0404d6e7b101f5d808c9ee3707ad1e03494 Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Thu, 30 Mar 2023 09:07:52 +0200 Subject: [PATCH] SONAR-18933 Deprecate the id field in the response of quality gates copy and rename endpoints --- .../main/java/org/sonar/server/qualitygate/ws/CopyAction.java | 1 + .../main/java/org/sonar/server/qualitygate/ws/RenameAction.java | 1 + 2 files changed, 2 insertions(+) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/CopyAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/CopyAction.java index 462470949b9..9a9a6792162 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/CopyAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/CopyAction.java @@ -58,6 +58,7 @@ public class CopyAction implements QualityGatesWsAction { "Either 'sourceName' or 'id' must be provided. Requires the 'Administer Quality Gates' permission.") .setPost(true) .setChangelog( + new Change("10.0", "Field 'id' in the response is deprecated"), new Change("10.0", "Parameter 'id' is removed. Use 'sourceName' instead."), new Change("8.4", "Parameter 'id' is deprecated. Format changes from integer to string. Use 'sourceName' instead."), new Change("8.4", "Parameter 'sourceName' added")) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/RenameAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/RenameAction.java index a51e18a8e08..4eb8b0efa97 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/RenameAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/RenameAction.java @@ -52,6 +52,7 @@ public class RenameAction implements QualityGatesWsAction { "Either 'id' or 'currentName' must be specified. Requires the 'Administer Quality Gates' permission.") .setSince("4.3") .setChangelog( + new Change("10.0", "Field 'id' in the response is deprecated"), new Change("10.0", "Parameter 'id' is removed. Use 'currentName' instead."), new Change("8.4", "Parameter 'currentName' added"), new Change("8.4", "Parameter 'id' is deprecated. Format changes from integer to string. Use 'currentName' instead.")) -- 2.39.5