diff options
author | Wojtek Wajerowicz <115081248+wojciech-wajerowicz-sonarsource@users.noreply.github.com> | 2024-04-09 11:35:47 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-04-10 20:02:55 +0000 |
commit | a5b00addd3dd30161f0e7b8a1754ea74a80c5260 (patch) | |
tree | a18aa8609e88de074075685ce5cc5d8fb25d09dc /server | |
parent | 20533b8ce9239b262e6484d98bf9e9d6382f3c6d (diff) | |
download | sonarqube-a5b00addd3dd30161f0e7b8a1754ea74a80c5260.tar.gz sonarqube-a5b00addd3dd30161f0e7b8a1754ea74a80c5260.zip |
SONAR-21819 Make documentation for pagination consistent.
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/model/RestPage.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/model/RestPage.java b/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/model/RestPage.java index 7d8a5e26c10..3e4aeb53e2f 100644 --- a/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/model/RestPage.java +++ b/server/sonar-webserver-webapi-v2/src/main/java/org/sonar/server/v2/api/model/RestPage.java @@ -22,6 +22,8 @@ package org.sonar.server.v2.api.model; import com.google.common.annotations.VisibleForTesting; import io.swagger.v3.oas.annotations.media.Schema; import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.Positive; import javax.validation.constraints.PositiveOrZero; import org.jetbrains.annotations.Nullable; @@ -31,7 +33,8 @@ public record RestPage( @Schema(defaultValue = DEFAULT_PAGE_SIZE, description = "Number of results per page. A value of 0 will only return the pagination information.") Integer pageSize, - @PositiveOrZero + @Positive + @Min(1) @Schema(defaultValue = DEFAULT_PAGE_INDEX, description = "1-based page index") Integer pageIndex ) { |