Skip to content

Commit

Permalink
OLMIS-6408: Information about pageable validator added to the documen…
Browse files Browse the repository at this point in the history
…tation
  • Loading branch information
saleksandra committed Jul 22, 2019
1 parent 1fa77f6 commit 5ed5007
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions STYLE-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ as empty.
* Resource's which only ever return a single identified item are _not_ paginated.
* For Java Service's the query parameters should be defined by a [Pageable](http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/Pageable.html)
and the response should be a [Page](http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/domain/Page.html).
* Before executing any endpoint, parameters are validated. Currently checked parameters are `page` and `size`.
Validator is called by interceptor which is registered with `InterceptorRegistry` by using `CustomWebMvcConfigurerAdapter`.
The endpoint return bad request error with an error message when `page` parameter is defined and `size` parameter is not
specified or `size` parameter is not greater than zero.

Example Request (note that page is zero-based):
```
Expand Down

0 comments on commit 5ed5007

Please sign in to comment.