diff options
author | Pierre <pierre.guillot@sonarsource.com> | 2020-10-20 16:09:31 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-11-04 20:05:48 +0000 |
commit | a8840ebd5252f9d87a322f246b66d58c3db5667c (patch) | |
tree | 60f1c02ea73079056942813eb35677ba4d3e45e6 /sonar-ws | |
parent | cce98134e5b88b3597f29758e6ee6d54fba32bd2 (diff) | |
download | sonarqube-a8840ebd5252f9d87a322f246b66d58c3db5667c.tar.gz sonarqube-a8840ebd5252f9d87a322f246b66d58c3db5667c.zip |
SONAR-13978 validate gitlab alm settings
Diffstat (limited to 'sonar-ws')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java | 11 | ||||
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/ValidateRequest.java | 43 |
2 files changed, 54 insertions, 0 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java index 3f7bc52032c..b12d6197b56 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java @@ -163,6 +163,17 @@ public class AlmSettingsService extends BaseService { } /** + * This is a GET request. + * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/validate">Further information about this action online (including a response example)</a> + * @since 8.6 + */ + public void validate(ValidateRequest request) { + call( + new GetRequest(path("validate")) + .setParam("key", request.getKey())); + } + + /** * * This is a GET request. * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/list_definitions">Further information about this action online (including a response example)</a> diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/ValidateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/ValidateRequest.java new file mode 100644 index 00000000000..6433199b200 --- /dev/null +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/ValidateRequest.java @@ -0,0 +1,43 @@ +/* + * SonarQube + * Copyright (C) 2009-2020 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonarqube.ws.client.almsettings; + +import javax.annotation.Generated; + +/** + * This is part of the internal API. + * This is a POST request. + * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/validate">Further information about this action online (including a response example)</a> + * @since 8.6 + */ +@Generated("sonar-ws-generator") +public class ValidateRequest { + + private String key; + + public String getKey() { + return key; + } + + public ValidateRequest setKey(String key) { + this.key = key; + return this; + } +} |