Skip to content

Commit

Permalink
include count, skip and limit only in /search endpoints. #522
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-sullivan committed Jan 27, 2020
1 parent 8ba42fc commit 8844ec7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.opencb.commons.datastore.core.Query;

import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.PositiveOrZero;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
Expand Down Expand Up @@ -332,9 +333,9 @@ public Response groupBy(@DefaultValue("")
+ " Exact text matches will be returned",
required = false, dataType = "java.util.List", paramType = "query")
})
public Response getAll(@QueryParam("limit") @DefaultValue("10")
public Response getAll(@QueryParam("limit") @DefaultValue("10") @PositiveOrZero
@ApiParam(value = "Max number of results to be returned. Cannot exceed 5,000.") Integer limit,
@QueryParam("skip") @DefaultValue("0")
@QueryParam("skip") @DefaultValue("0") @PositiveOrZero
@ApiParam(value = "Number of results to be skipped.") Integer skip) {
try {
parseExtraQueryParams(limit, skip);
Expand Down

0 comments on commit 8844ec7

Please sign in to comment.