]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11154 Update sonar-ws and fix ITs
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 21 Oct 2019 17:39:03 +0000 (12:39 -0500)
committerSonarTech <sonartech@sonarsource.com>
Wed, 30 Oct 2019 19:21:08 +0000 (20:21 +0100)
12 files changed:
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/ActivateRulesRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddProjectRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/BackupRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangeParentRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangelogRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeactivateRulesRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeleteRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/ExportRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/InheritanceRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveProjectRequest.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofiles/SetDefaultRequest.java

index f130fe750bd38d433515271f0eaada0b95d051db..4b1b61e4efdfb9cbaacfcd34c9961edac9c507bf 100644 (file)
@@ -36,16 +36,20 @@ public class ActivateRulesRequest {
   private String asc;
   private String availableSince;
   private String compareToProfile;
+  private List<String> cwe;
   private List<String> inheritance;
   private String isTemplate;
   private List<String> languages;
   private String organization;
+  private List<String> owaspTop10;
   private String q;
   private String qprofile;
   private List<String> repositories;
   private String ruleKey;
   private String s;
+  private List<String> sansTop25;
   private List<String> severities;
+  private List<String> sonarsourceSecurity;
   private List<String> statuses;
   private List<String> tags;
   private String targetKey;
@@ -134,6 +138,18 @@ public class ActivateRulesRequest {
     return compareToProfile;
   }
 
+  /**
+   * Example value: "12,125,unknown"
+   */
+  public ActivateRulesRequest setCwe(List<String> cwe) {
+    this.cwe = cwe;
+    return this;
+  }
+
+  public List<String> getCwe() {
+    return cwe;
+  }
+
   /**
    * Example value: "INHERITED,OVERRIDES"
    * Possible values:
@@ -195,6 +211,30 @@ public class ActivateRulesRequest {
     return organization;
   }
 
+  /**
+   * Possible values:
+   * <ul>
+   *   <li>"a1"</li>
+   *   <li>"a2"</li>
+   *   <li>"a3"</li>
+   *   <li>"a4"</li>
+   *   <li>"a5"</li>
+   *   <li>"a6"</li>
+   *   <li>"a7"</li>
+   *   <li>"a8"</li>
+   *   <li>"a9"</li>
+   *   <li>"a10"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setOwaspTop10(List<String> owaspTop10) {
+    this.owaspTop10 = owaspTop10;
+    return this;
+  }
+
+  public List<String> getOwaspTop10() {
+    return owaspTop10;
+  }
+
   /**
    * Example value: "xpath"
    */
@@ -262,6 +302,23 @@ public class ActivateRulesRequest {
     return s;
   }
 
+  /**
+   * Possible values:
+   * <ul>
+   *   <li>"insecure-interaction"</li>
+   *   <li>"risky-resource"</li>
+   *   <li>"porous-defenses"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setSansTop25(List<String> sansTop25) {
+    this.sansTop25 = sansTop25;
+    return this;
+  }
+
+  public List<String> getSansTop25() {
+    return sansTop25;
+  }
+
   /**
    * Example value: "CRITICAL,BLOCKER"
    * Possible values:
@@ -282,6 +339,41 @@ public class ActivateRulesRequest {
     return severities;
   }
 
+  /**
+   * Example value: "sql-injection,command-injection,others"
+   * Possible values:
+   * <ul>
+   *   <li>"sql-injection"</li>
+   *   <li>"command-injection"</li>
+   *   <li>"path-traversal-injection"</li>
+   *   <li>"ldap-injection"</li>
+   *   <li>"xpath-injection"</li>
+   *   <li>"rce"</li>
+   *   <li>"dos"</li>
+   *   <li>"ssrf"</li>
+   *   <li>"csrf"</li>
+   *   <li>"xss"</li>
+   *   <li>"log-injection"</li>
+   *   <li>"http-response-splitting"</li>
+   *   <li>"open-redirect"</li>
+   *   <li>"xxe"</li>
+   *   <li>"object-injection"</li>
+   *   <li>"weak-cryptography"</li>
+   *   <li>"auth"</li>
+   *   <li>"insecure-conf"</li>
+   *   <li>"file-manipulation"</li>
+   *   <li>"others"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setSonarsourceSecurity(List<String> sonarsourceSecurity) {
+    this.sonarsourceSecurity = sonarsourceSecurity;
+    return this;
+  }
+
+  public List<String> getSonarsourceSecurity() {
+    return sonarsourceSecurity;
+  }
+
   /**
    * Example value: "READY"
    * Possible values:
@@ -364,6 +456,7 @@ public class ActivateRulesRequest {
    *   <li>"CODE_SMELL"</li>
    *   <li>"BUG"</li>
    *   <li>"VULNERABILITY"</li>
+   *   <li>"SECURITY_HOTSPOT"</li>
    * </ul>
    */
   public ActivateRulesRequest setTypes(List<String> types) {
index c6a9814a6c56fb3ca1c7dbc39c3db13b2bfe74fc..c252c56d3301d57d38cd8b124cb9e213eb69542c 100644 (file)
@@ -31,28 +31,13 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class AddProjectRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String project;
-  private String projectUuid;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public AddProjectRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public AddProjectRequest setLanguage(String language) {
     this.language = language;
@@ -77,6 +62,7 @@ public class AddProjectRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "my_project"
    */
   public AddProjectRequest setProject(String project) {
@@ -89,20 +75,7 @@ public class AddProjectRequest {
   }
 
   /**
-   * Example value: "AU-TpxcA-iU5OvuD2FL5"
-   * @deprecated since 6.5
-   */
-  @Deprecated
-  public AddProjectRequest setProjectUuid(String projectUuid) {
-    this.projectUuid = projectUuid;
-    return this;
-  }
-
-  public String getProjectUuid() {
-    return projectUuid;
-  }
-
-  /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public AddProjectRequest setQualityProfile(String qualityProfile) {
index 569bdbcf3a97b91bd755d1ee2659b60dca3e84db..14ca89ce8225d330f66b3467d1c421857a7858e2 100644 (file)
@@ -31,26 +31,12 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class BackupRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public BackupRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public BackupRequest setLanguage(String language) {
     this.language = language;
@@ -75,6 +61,7 @@ public class BackupRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public BackupRequest setQualityProfile(String qualityProfile) {
index 547e10c991406119c165d8f5fa9b5789a5b3281d..304e009389b549092493def9f621fd880d2e1c9d 100644 (file)
@@ -31,28 +31,13 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class ChangeParentRequest {
 
-  private String key;
   private String language;
   private String organization;
-  private String parentKey;
   private String parentQualityProfile;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public ChangeParentRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public ChangeParentRequest setLanguage(String language) {
     this.language = language;
@@ -76,20 +61,6 @@ public class ChangeParentRequest {
     return organization;
   }
 
-  /**
-   * Example value: "AU-TpxcA-iU5OvuD2FLz"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public ChangeParentRequest setParentKey(String parentKey) {
-    this.parentKey = parentKey;
-    return this;
-  }
-
-  public String getParentKey() {
-    return parentKey;
-  }
-
   /**
    * Example value: "Sonar way"
    */
@@ -103,6 +74,7 @@ public class ChangeParentRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public ChangeParentRequest setQualityProfile(String qualityProfile) {
index 99b49ad21e6f4e43f8294ff44ce226b76efc4d1c..52ef9db4be2468742aa6326751c78b72b992c246 100644 (file)
@@ -31,7 +31,6 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class ChangelogRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String p;
@@ -41,20 +40,7 @@ public class ChangelogRequest {
   private String to;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public ChangelogRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public ChangelogRequest setLanguage(String language) {
     this.language = language;
@@ -103,6 +89,7 @@ public class ChangelogRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public ChangelogRequest setQualityProfile(String qualityProfile) {
index a41b79a75b30e4fecb82c918391064bc56953b43..7bdb0c5f2e8d2937bf1a6f385e3ad558b63aa3fb 100644 (file)
@@ -36,16 +36,20 @@ public class DeactivateRulesRequest {
   private String asc;
   private String availableSince;
   private String compareToProfile;
+  private List<String> cwe;
   private List<String> inheritance;
   private String isTemplate;
   private List<String> languages;
   private String organization;
+  private List<String> owaspTop10;
   private String q;
   private String qprofile;
   private List<String> repositories;
   private String ruleKey;
   private String s;
+  private List<String> sansTop25;
   private List<String> severities;
+  private List<String> sonarsourceSecurity;
   private List<String> statuses;
   private List<String> tags;
   private String targetKey;
@@ -133,6 +137,18 @@ public class DeactivateRulesRequest {
     return compareToProfile;
   }
 
+  /**
+   * Example value: "12,125,unknown"
+   */
+  public DeactivateRulesRequest setCwe(List<String> cwe) {
+    this.cwe = cwe;
+    return this;
+  }
+
+  public List<String> getCwe() {
+    return cwe;
+  }
+
   /**
    * Example value: "INHERITED,OVERRIDES"
    * Possible values:
@@ -194,6 +210,30 @@ public class DeactivateRulesRequest {
     return organization;
   }
 
+  /**
+   * Possible values:
+   * <ul>
+   *   <li>"a1"</li>
+   *   <li>"a2"</li>
+   *   <li>"a3"</li>
+   *   <li>"a4"</li>
+   *   <li>"a5"</li>
+   *   <li>"a6"</li>
+   *   <li>"a7"</li>
+   *   <li>"a8"</li>
+   *   <li>"a9"</li>
+   *   <li>"a10"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setOwaspTop10(List<String> owaspTop10) {
+    this.owaspTop10 = owaspTop10;
+    return this;
+  }
+
+  public List<String> getOwaspTop10() {
+    return owaspTop10;
+  }
+
   /**
    * Example value: "xpath"
    */
@@ -261,6 +301,23 @@ public class DeactivateRulesRequest {
     return s;
   }
 
+  /**
+   * Possible values:
+   * <ul>
+   *   <li>"insecure-interaction"</li>
+   *   <li>"risky-resource"</li>
+   *   <li>"porous-defenses"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setSansTop25(List<String> sansTop25) {
+    this.sansTop25 = sansTop25;
+    return this;
+  }
+
+  public List<String> getSansTop25() {
+    return sansTop25;
+  }
+
   /**
    * Example value: "CRITICAL,BLOCKER"
    * Possible values:
@@ -281,6 +338,41 @@ public class DeactivateRulesRequest {
     return severities;
   }
 
+  /**
+   * Example value: "sql-injection,command-injection,others"
+   * Possible values:
+   * <ul>
+   *   <li>"sql-injection"</li>
+   *   <li>"command-injection"</li>
+   *   <li>"path-traversal-injection"</li>
+   *   <li>"ldap-injection"</li>
+   *   <li>"xpath-injection"</li>
+   *   <li>"rce"</li>
+   *   <li>"dos"</li>
+   *   <li>"ssrf"</li>
+   *   <li>"csrf"</li>
+   *   <li>"xss"</li>
+   *   <li>"log-injection"</li>
+   *   <li>"http-response-splitting"</li>
+   *   <li>"open-redirect"</li>
+   *   <li>"xxe"</li>
+   *   <li>"object-injection"</li>
+   *   <li>"weak-cryptography"</li>
+   *   <li>"auth"</li>
+   *   <li>"insecure-conf"</li>
+   *   <li>"file-manipulation"</li>
+   *   <li>"others"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setSonarsourceSecurity(List<String> sonarsourceSecurity) {
+    this.sonarsourceSecurity = sonarsourceSecurity;
+    return this;
+  }
+
+  public List<String> getSonarsourceSecurity() {
+    return sonarsourceSecurity;
+  }
+
   /**
    * Example value: "READY"
    * Possible values:
@@ -344,6 +436,7 @@ public class DeactivateRulesRequest {
    *   <li>"CODE_SMELL"</li>
    *   <li>"BUG"</li>
    *   <li>"VULNERABILITY"</li>
+   *   <li>"SECURITY_HOTSPOT"</li>
    * </ul>
    */
   public DeactivateRulesRequest setTypes(List<String> types) {
index c91d5d917e8290d15e5680827d2fa98605230755..02d369c348207ae328b9f8e93507fa5076fe6eca 100644 (file)
@@ -31,26 +31,12 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class DeleteRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public DeleteRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public DeleteRequest setLanguage(String language) {
     this.language = language;
@@ -75,6 +61,7 @@ public class DeleteRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public DeleteRequest setQualityProfile(String qualityProfile) {
index 7a75cfd75241a310b0ace7a332bfb54a732839f3..1e43092a2a3e4ae60717ea9aafc652ba209dab9d 100644 (file)
@@ -31,26 +31,12 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class ExportRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public ExportRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    * Example value: ""
    */
   public ExportRequest setLanguage(String language) {
index a6518c43b6838370e7fce4849a30154ed2fcd4c9..993c9c024ae990f1966bdb400a0ccbd7972c8915 100644 (file)
@@ -31,26 +31,12 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class InheritanceRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public InheritanceRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public InheritanceRequest setLanguage(String language) {
     this.language = language;
@@ -75,6 +61,7 @@ public class InheritanceRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public InheritanceRequest setQualityProfile(String qualityProfile) {
index ff5a984e67c8fc4108c69d237e77a6ad4c1273bc..0a3f1cce7222751d1d0b7151d3dc3a5b7e292e62 100644 (file)
@@ -22,17 +22,17 @@ package org.sonarqube.ws.client.qualityprofiles;
 import java.util.stream.Collectors;
 import javax.annotation.Generated;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.client.BaseService;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.WsConnector;
+import org.sonarqube.ws.Qualityprofiles;
 import org.sonarqube.ws.Qualityprofiles.CopyWsResponse;
 import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
-import org.sonarqube.ws.Qualityprofiles.InheritanceWsResponse;
-import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
 import org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse;
 import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
 import org.sonarqube.ws.Qualityprofiles.ShowResponse;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
 
 /**
  * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles">Further information about this web service online</a>
@@ -60,7 +60,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("rule", request.getRule())
         .setParam("severity", request.getSeverity())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -78,16 +78,20 @@ public class QualityprofilesService extends BaseService {
         .setParam("asc", request.getAsc())
         .setParam("available_since", request.getAvailableSince())
         .setParam("compareToProfile", request.getCompareToProfile())
+        .setParam("cwe", request.getCwe() == null ? null : request.getCwe().stream().collect(Collectors.joining(",")))
         .setParam("inheritance", request.getInheritance() == null ? null : request.getInheritance().stream().collect(Collectors.joining(",")))
         .setParam("is_template", request.getIsTemplate())
         .setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
         .setParam("organization", request.getOrganization())
+        .setParam("owaspTop10", request.getOwaspTop10() == null ? null : request.getOwaspTop10().stream().collect(Collectors.joining(",")))
         .setParam("q", request.getQ())
         .setParam("qprofile", request.getQprofile())
         .setParam("repositories", request.getRepositories() == null ? null : request.getRepositories().stream().collect(Collectors.joining(",")))
         .setParam("rule_key", request.getRuleKey())
         .setParam("s", request.getS())
+        .setParam("sansTop25", request.getSansTop25() == null ? null : request.getSansTop25().stream().collect(Collectors.joining(",")))
         .setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("sonarsourceSecurity", request.getSonarsourceSecurity() == null ? null : request.getSonarsourceSecurity().stream().collect(Collectors.joining(",")))
         .setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
         .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
         .setParam("targetKey", request.getTargetKey())
@@ -95,7 +99,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("template_key", request.getTemplateKey())
         .setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(",")))
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -113,7 +117,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -126,14 +130,12 @@ public class QualityprofilesService extends BaseService {
   public void addProject(AddProjectRequest request) {
     call(
       new PostRequest(path("add_project"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("project", request.getProject())
-        .setParam("projectUuid", request.getProjectUuid())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -151,7 +153,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -164,12 +166,11 @@ public class QualityprofilesService extends BaseService {
   public String backup(BackupRequest request) {
     return call(
       new GetRequest(path("backup"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -182,14 +183,12 @@ public class QualityprofilesService extends BaseService {
   public void changeParent(ChangeParentRequest request) {
     call(
       new PostRequest(path("change_parent"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
-        .setParam("parentKey", request.getParentKey())
         .setParam("parentQualityProfile", request.getParentQualityProfile())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -202,7 +201,6 @@ public class QualityprofilesService extends BaseService {
   public String changelog(ChangelogRequest request) {
     return call(
       new GetRequest(path("changelog"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("p", request.getP())
@@ -211,7 +209,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("since", request.getSince())
         .setParam("to", request.getTo())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -227,7 +225,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("leftKey", request.getLeftKey())
         .setParam("rightKey", request.getRightKey())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -274,7 +272,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("key", request.getKey())
         .setParam("rule", request.getRule())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -292,23 +290,27 @@ public class QualityprofilesService extends BaseService {
         .setParam("asc", request.getAsc())
         .setParam("available_since", request.getAvailableSince())
         .setParam("compareToProfile", request.getCompareToProfile())
+        .setParam("cwe", request.getCwe() == null ? null : request.getCwe().stream().collect(Collectors.joining(",")))
         .setParam("inheritance", request.getInheritance() == null ? null : request.getInheritance().stream().collect(Collectors.joining(",")))
         .setParam("is_template", request.getIsTemplate())
         .setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
         .setParam("organization", request.getOrganization())
+        .setParam("owaspTop10", request.getOwaspTop10() == null ? null : request.getOwaspTop10().stream().collect(Collectors.joining(",")))
         .setParam("q", request.getQ())
         .setParam("qprofile", request.getQprofile())
         .setParam("repositories", request.getRepositories() == null ? null : request.getRepositories().stream().collect(Collectors.joining(",")))
         .setParam("rule_key", request.getRuleKey())
         .setParam("s", request.getS())
+        .setParam("sansTop25", request.getSansTop25() == null ? null : request.getSansTop25().stream().collect(Collectors.joining(",")))
         .setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("sonarsourceSecurity", request.getSonarsourceSecurity() == null ? null : request.getSonarsourceSecurity().stream().collect(Collectors.joining(",")))
         .setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
         .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
         .setParam("targetKey", request.getTargetKey())
         .setParam("template_key", request.getTemplateKey())
         .setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(",")))
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -321,12 +323,11 @@ public class QualityprofilesService extends BaseService {
   public void delete(DeleteRequest request) {
     call(
       new PostRequest(path("delete"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -339,12 +340,11 @@ public class QualityprofilesService extends BaseService {
   public String export(ExportRequest request) {
     return call(
       new GetRequest(path("export"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -358,7 +358,7 @@ public class QualityprofilesService extends BaseService {
     return call(
       new GetRequest(path("exporters"))
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -372,7 +372,7 @@ public class QualityprofilesService extends BaseService {
     return call(
       new GetRequest(path("importers"))
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -382,14 +382,13 @@ public class QualityprofilesService extends BaseService {
    * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/inheritance">Further information about this action online (including a response example)</a>
    * @since 5.2
    */
-  public InheritanceWsResponse inheritance(InheritanceRequest request) {
+  public Qualityprofiles.InheritanceWsResponse inheritance(InheritanceRequest request) {
     return call(
       new GetRequest(path("inheritance"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile()),
-      InheritanceWsResponse.parser());
+      Qualityprofiles.InheritanceWsResponse.parser());
   }
 
   /**
@@ -408,7 +407,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("q", request.getQ())
         .setParam("selected", request.getSelected())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -426,7 +425,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -439,14 +438,12 @@ public class QualityprofilesService extends BaseService {
   public void removeProject(RemoveProjectRequest request) {
     call(
       new PostRequest(path("remove_project"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("project", request.getProject())
-        .setParam("projectUuid", request.getProjectUuid())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -464,7 +461,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -480,7 +477,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("key", request.getKey())
         .setParam("name", request.getName())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -496,23 +493,7 @@ public class QualityprofilesService extends BaseService {
         .setParam("backup", request.getBackup())
         .setParam("organization", request.getOrganization())
         .setMediaType(MediaTypes.JSON)
-      ).content();
-  }
-
-  /**
-   *
-   * This is part of the internal API.
-   * This is a POST request.
-   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/restore_built_in">Further information about this action online (including a response example)</a>
-   * @since 4.4
-   * @deprecated since 6.4
-   */
-  @Deprecated
-  public void restoreBuiltIn() {
-    call(
-      new PostRequest(path("restore_built_in"))
-        .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -583,12 +564,11 @@ public class QualityprofilesService extends BaseService {
   public void setDefault(SetDefaultRequest request) {
     call(
       new PostRequest(path("set_default"))
-        .setParam("key", request.getKey())
         .setParam("language", request.getLanguage())
         .setParam("organization", request.getOrganization())
         .setParam("qualityProfile", request.getQualityProfile())
         .setMediaType(MediaTypes.JSON)
-      ).content();
+    ).content();
   }
 
   /**
@@ -597,6 +577,7 @@ public class QualityprofilesService extends BaseService {
    * This is a GET request.
    * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/show">Further information about this action online (including a response example)</a>
    * @since 6.5
+   * @return
    */
   public ShowResponse show(ShowRequest request) {
     return call(
index 9569845c35c48e1f8af23464499755ac96fb0634..13f3c8ed2f8d23077a8ac978680ef5c1b26873a0 100644 (file)
@@ -31,28 +31,13 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class RemoveProjectRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String project;
-  private String projectUuid;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public RemoveProjectRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public RemoveProjectRequest setLanguage(String language) {
     this.language = language;
@@ -77,6 +62,7 @@ public class RemoveProjectRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "my_project"
    */
   public RemoveProjectRequest setProject(String project) {
@@ -89,20 +75,7 @@ public class RemoveProjectRequest {
   }
 
   /**
-   * Example value: "AU-TpxcB-iU5OvuD2FL6"
-   * @deprecated since 6.5
-   */
-  @Deprecated
-  public RemoveProjectRequest setProjectUuid(String projectUuid) {
-    this.projectUuid = projectUuid;
-    return this;
-  }
-
-  public String getProjectUuid() {
-    return projectUuid;
-  }
-
-  /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public RemoveProjectRequest setQualityProfile(String qualityProfile) {
index ca0e66fbb0c341cf897079266f5015661b32aa8d..c7749cf03233bc81a40aa873f3e51506f60102c1 100644 (file)
@@ -31,26 +31,12 @@ import javax.annotation.Generated;
 @Generated("sonar-ws-generator")
 public class SetDefaultRequest {
 
-  private String key;
   private String language;
   private String organization;
   private String qualityProfile;
 
   /**
-   * Example value: "AU-Tpxb--iU5OvuD2FLy"
-   * @deprecated since 6.6
-   */
-  @Deprecated
-  public SetDefaultRequest setKey(String key) {
-    this.key = key;
-    return this;
-  }
-
-  public String getKey() {
-    return key;
-  }
-
-  /**
+   * This is a mandatory parameter.
    */
   public SetDefaultRequest setLanguage(String language) {
     this.language = language;
@@ -75,6 +61,7 @@ public class SetDefaultRequest {
   }
 
   /**
+   * This is a mandatory parameter.
    * Example value: "Sonar way"
    */
   public SetDefaultRequest setQualityProfile(String qualityProfile) {