I am using Spring 2.3 and imported swagged using
    implementation('io.springfox:springfox-swagger2:2.8.0')
    implementation('io.springfox:springfox-swagger-ui:2.8.0')
I want to accept pagination params from the UI, and the model is
@Immutable
@JsonSerialize(as = ImmPaginationParameters.class)
@JsonDeserialize(as = ImmPaginationParameters.class)
public interface PaginationParameters {
    Integer getLimit();
    Integer getOffset();
}
In the controller I have declared the method as
    @GetMapping("/preview")
    @NonNull
    ResponseEntity<List<SomeDto>> getPreviewResults(@PathVariable final String projectId,
                                                    @ModelAttribute final PaginationParameters params) {
However, the same does not get reflected in the Swagger UI.
I tried converting it into a post mapping and add @Valid too in front of PaginationParameters but the same thing. Checked the API docs, again no sign of pagination params. I checked the post What is @ModelAttribute in Spring MVC? and this way of defining modelAttribute looks sufficient. Not sure I have to declare something different in the PaginationParams class.


 
     
    