aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Poscia <aurelien.poscia@sonarsource.com>2024-01-16 10:27:05 +0100
committersonartech <sonartech@sonarsource.com>2024-01-16 20:02:43 +0000
commit47c5a7ba5770f547bd9dc848d93785fba29964a9 (patch)
tree45926a5fbf9dde6e4ec4b2536a44b5073e3e9c58
parent4242fb2533df340a520ad8c86912155ed8a53c20 (diff)
downloadsonarqube-47c5a7ba5770f547bd9dc848d93785fba29964a9.tar.gz
sonarqube-47c5a7ba5770f547bd9dc848d93785fba29964a9.zip
SONAR-21114 Remove the version tag from api/v2
-rw-r--r--server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx1
-rw-r--r--server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java6
-rw-r--r--server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/config/CommonWebConfig.java1
4 files changed, 3 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx
index f0ff8841196..62126f3b35a 100644
--- a/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx
@@ -29,7 +29,7 @@ const handler = new WebApiServiceMock();
const ui = {
search: byRole('searchbox'),
- title: byRole('link', { name: 'Swagger Petstore - OpenAPI 3.0 1.0.17' }),
+ title: byRole('link', { name: 'Swagger Petstore - OpenAPI 3.0' }),
searchClear: byRole('button', { name: 'clear' }),
showInternal: byRole('checkbox', { name: 'api_documentation.show_internal_v2' }),
apiScopePet: byRole('button', { name: 'pet' }),
diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx
index e8ef17258c1..e867ad8db07 100644
--- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx
@@ -95,7 +95,6 @@ export default function ApiSidebar({ apisList, docInfo }: Readonly<Props>) {
<h1 className="sw-mb-2">
<Link to="." className="sw-text-[unset] sw-border-none">
{docInfo.title}
- <Badge className="sw-align-middle sw-ml-2">{docInfo.version}</Badge>
</Link>
</h1>
diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java
index a2faa63fd9f..206e58fd5a4 100644
--- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java
+++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/user/UserUpdater.java
@@ -373,8 +373,7 @@ public class UserUpdater {
return true;
}
- private boolean validateScmAccounts(DbSession dbSession, List<String> scmAccounts, @Nullable String login, @Nullable String email,
- @Nullable UserDto existingUser,
+ private boolean validateScmAccounts(DbSession dbSession, List<String> scmAccounts, @Nullable String login, @Nullable String email, @Nullable UserDto existingUser,
List<String> messages) {
boolean isValid = true;
for (String scmAccount : scmAccounts) {
@@ -391,8 +390,7 @@ public class UserUpdater {
matchingUsersWithoutExistingUser.add(getNameOrLogin(matchingUser) + " (" + matchingUser.getLogin() + ")");
}
if (!matchingUsersWithoutExistingUser.isEmpty()) {
- messages.add(format("The scm account '%s' is already used by user(s) : '%s'", scmAccount,
- Joiner.on(", ").join(matchingUsersWithoutExistingUser)));
+ messages.add(format("The scm account '%s' is already used by user(s) : '%s'", scmAccount, Joiner.on(", ").join(matchingUsersWithoutExistingUser)));
isValid = false;
}
}
diff --git a/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/config/CommonWebConfig.java b/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/config/CommonWebConfig.java
index 4e3ee214822..72204a5d3aa 100644
--- a/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/config/CommonWebConfig.java
+++ b/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/config/CommonWebConfig.java
@@ -63,7 +63,6 @@ public class CommonWebConfig implements WebMvcConfigurer {
return new OpenAPI()
.info(new Info()
.title("SonarQube Web API v2")
- .version("1.0.0 alpha")
.description("""
The SonarQube API v2 is a REST API which enables you to interact with SonarQube programmatically. Endpoint listed here should work as expected.
However, you should not consider the API stable for now as it is still under development. New releases of SonarQube can bring changes to existing endpoint definitions.