Skip to content

Added support for Pageable resolved parameter #2063

@avillev

Description

@avillev

io.springfox:springfox-swagger2:2.6.1
org.springframework.boot:spring-boot:1.5.6.RELEASE

Hello,

i am having an issue with the 'org.springframework.data.domain.Pageable' object in my rest API. It used to work correctly and the 'page'and 'size' parameters were generated in both the json and the swagger-ui interface.

Then, I added the '@PageableDefault(size = 20, sort = "id")' annotation in front of the pageable parameter:

public ResponseEntity<Map<Long, MyDTO>> find(final @PageableDefault(size = 20, sort = "id") Pageable pageable

Then, i get this error in my swagger-ui:

Errors
Hide
Resolver error at paths./merchants.get.parameters.0.schema.$ref
Could not resolve reference because of: Could not resolve pointer: /definitions/Pageable does not exist in document

Basically, it seems that Springfox uses now the pageable as a body and did not generate the according definition. It works well without the @PageableDefault.

Any insight to this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions