diff --git a/webapp/pom.xml b/webapp/pom.xml
index 4ffa07157..fcb836696 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -20,6 +20,7 @@
1.11.0
v20.18.0
8.2.0
+ 2.6.0
@@ -143,7 +144,7 @@
org.springdoc
springdoc-openapi-starter-webmvc-ui
- 2.6.0
+ ${springdoc.version}
diff --git a/webapp/src/main/java/com/box/l10n/mojito/SwaggerConfiguration.java b/webapp/src/main/java/com/box/l10n/mojito/SwaggerConfiguration.java
index 5cea42196..bb6c9bb8b 100644
--- a/webapp/src/main/java/com/box/l10n/mojito/SwaggerConfiguration.java
+++ b/webapp/src/main/java/com/box/l10n/mojito/SwaggerConfiguration.java
@@ -2,18 +2,22 @@
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SwaggerConfiguration {
+ @Value("${build.version}")
+ private String buildVersion;
+
@Bean
public OpenAPI openAPI() {
return new OpenAPI()
.info(
new Info()
.title("Mojito API")
- .version("0.111-SNAPSHOT")
+ .version(buildVersion)
.description("Mojito API Documentation"));
}
}
diff --git a/webapp/src/main/java/com/box/l10n/mojito/rest/asset/VirtualAssetWS.java b/webapp/src/main/java/com/box/l10n/mojito/rest/asset/VirtualAssetWS.java
index 077eec9e5..3a383a0ec 100644
--- a/webapp/src/main/java/com/box/l10n/mojito/rest/asset/VirtualAssetWS.java
+++ b/webapp/src/main/java/com/box/l10n/mojito/rest/asset/VirtualAssetWS.java
@@ -10,8 +10,6 @@
import com.box.l10n.mojito.service.asset.VirutalAssetMissingTextUnitException;
import com.box.l10n.mojito.service.pollableTask.PollableFuture;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.responses.ApiResponse;
-import io.swagger.v3.oas.annotations.responses.ApiResponses;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -47,10 +45,6 @@ public VirtualAsset createOrUpdateVirtualAsset(@RequestBody VirtualAsset virtual
}
@Operation(summary = "Create Text Units for a specific Virtual Asset asynchronously")
- @ApiResponses(
- value = {
- @ApiResponse(responseCode = "200", description = "Successfully created a Pollable Task")
- })
@RequestMapping(
value = "/api/virtualAssets/{assetId}/textUnits",
method = RequestMethod.POST,
@@ -67,10 +61,6 @@ public PollableTask addTextUnits(
}
@Operation(summary = "Update Text Units for a specific Virtual Asset asynchronously")
- @ApiResponses(
- value = {
- @ApiResponse(responseCode = "200", description = "Successfully created a Pollable Task")
- })
@RequestMapping(
value = "/api/virtualAssets/{assetId}/textUnits",
method = RequestMethod.PUT,
@@ -97,10 +87,6 @@ public void deleteTextUnit(
}
@Operation(summary = "Create Text Units for a specific Virtual Asset asynchronously")
- @ApiResponses(
- value = {
- @ApiResponse(responseCode = "200", description = "Successfully created a Pollable Task")
- })
@RequestMapping(
value = "/api/virtualAssets/{assetId}/locale/{localeId}/textUnits",
method = RequestMethod.POST,
diff --git a/webapp/src/main/java/com/box/l10n/mojito/rest/repository/BranchStatisticWS.java b/webapp/src/main/java/com/box/l10n/mojito/rest/repository/BranchStatisticWS.java
index 4c93f803d..4b0fcfd1d 100644
--- a/webapp/src/main/java/com/box/l10n/mojito/rest/repository/BranchStatisticWS.java
+++ b/webapp/src/main/java/com/box/l10n/mojito/rest/repository/BranchStatisticWS.java
@@ -23,8 +23,6 @@
import com.box.l10n.mojito.service.branch.SparseBranchStatisticRepository;
import com.fasterxml.jackson.annotation.JsonView;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.responses.ApiResponse;
-import io.swagger.v3.oas.annotations.responses.ApiResponses;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.stream.Collectors;
@@ -60,12 +58,6 @@ public class BranchStatisticWS {
@Autowired BranchTextUnitStatisticRepository branchTextUnitStatisticRepository;
@Operation(summary = "Get paginated Branch Statistics for a given set of parameters")
- @ApiResponses(
- value = {
- @ApiResponse(
- responseCode = "200",
- description = "Successfully retrieved paginated Branch Statistics")
- })
@JsonView(View.BranchStatistic.class)
@RequestMapping(
value = "/api/branchStatistics",
@@ -136,12 +128,6 @@ public Page getBranchesOfRepository(
}
@Operation(summary = "Get Branch Text Unit Statistics paginated for a specific Branch Statistic")
- @ApiResponses(
- value = {
- @ApiResponse(
- responseCode = "200",
- description = "Successfully retrieved paginated Branch Text Unit Statistics")
- })
@JsonView(View.BranchTextUnitStatistic.class)
@RequestMapping(
value = "/api/branchStatistics/{id}/branchTextUnitStatistics",
diff --git a/webapp/src/main/java/com/box/l10n/mojito/rest/screenshot/ScreenshotWS.java b/webapp/src/main/java/com/box/l10n/mojito/rest/screenshot/ScreenshotWS.java
index 267de95c6..ee9cf9a8d 100644
--- a/webapp/src/main/java/com/box/l10n/mojito/rest/screenshot/ScreenshotWS.java
+++ b/webapp/src/main/java/com/box/l10n/mojito/rest/screenshot/ScreenshotWS.java
@@ -10,8 +10,6 @@
import com.box.l10n.mojito.service.tm.search.SearchType;
import com.fasterxml.jackson.annotation.JsonView;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.responses.ApiResponse;
-import io.swagger.v3.oas.annotations.responses.ApiResponses;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;