-
-
Notifications
You must be signed in to change notification settings - Fork 548
Description
If you create an api-documentation with springdoc-openapi for a spring-data-rest application, that exposes the Pageable-Object as api-parameter, like this:
@RequestMapping(value = "/search",
method = RequestMethod.GET)
public Page<ResultEntry> searchAll(@RequestParam(value = "q", required = false) String query,
@PageableDefault(page = 0, size = 10) Pageable pageable) {
return searchService.findByAuthorId(query, pageable);
}
then there is a problem, because the spring-data library converts the Pagable attributes into url-parameter (like documented here: https://github.com/spring-projects/spring-data-rest/blob/master/src/main/asciidoc/paging-and-sorting.adoc) but in the Swagger UI there is only the Pageable object as parameter with the Java-Attributes (pageNumber, pageSize, sorted,...) names and not the Url-Parameter (page,size,offset, sort) names as separate parameter fields.
Therefore there is no possibilty to make a valid Test-Request with the swagger-ui. Could you please add support for the pageable object in the springdoc-openapi?
In Springfox, there is a workaround for this problem: springfox/springfox#2623