From 47c5a7ba5770f547bd9dc848d93785fba29964a9 Mon Sep 17 00:00:00 2001 From: Aurelien Poscia Date: Tue, 16 Jan 2024 10:27:05 +0100 Subject: [PATCH] SONAR-21114 Remove the version tag from api/v2 --- .../src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx | 2 +- .../src/main/js/apps/web-api-v2/components/ApiSidebar.tsx | 1 - .../src/main/java/org/sonar/server/user/UserUpdater.java | 6 ++---- .../java/org/sonar/server/v2/config/CommonWebConfig.java | 1 - 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) {

{docInfo.title} - {docInfo.version}

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 scmAccounts, @Nullable String login, @Nullable String email, - @Nullable UserDto existingUser, + private boolean validateScmAccounts(DbSession dbSession, List scmAccounts, @Nullable String login, @Nullable String email, @Nullable UserDto existingUser, List 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. -- 2.39.5