springfox-data-rest : Pageable not supported
Module: springfox-data-rest Version: 2.6.1
Pageable parameters, correctly handled by Spring Data REST, are ignored in the GET form, even if documented like this :
@ApiImplicitParams({ //FIXME
@ApiImplicitParam(name = "page", dataType = "integer", paramType = "query",
value = "Results page you want to retrieve (0..N)"),
@ApiImplicitParam(name = "size", dataType = "integer", paramType = "query",
value = "Number of records per page."),
@ApiImplicitParam(name = "sort", allowMultiple = true, dataType = "string", paramType = "query",
value = "Sorting criteria in the format: property(,asc|desc). "
+ "Default sort order is ascending. "
+ "Multiple sort criteria are supported.")
})
Page<Person> findByAddressCity(@Param("city") String city, Pageable p);
The solution you can use is to create PageableParameterPlugin extends springfox.documentation.spi.service.ParameterPlugin in which you'll have to override the apply method in which you define how to document the Pageable object. JHipster provides a very clean implementation you can find here
Love to see this default, include in springfox-data-rest?
@saturnism would you be able to help out with a PR?
Closing this as a duplicate for #755