Skip to content

[REQ] Support x-spring-paginated in the java restclient library #22951

@YLombardi

Description

@YLombardi

Is your feature request related to a problem? Please describe.

This is more a question than a request, but it could lead to one.
The resttemplate library for Java generator uses Spring but doesn't support the "x-spring-paginated" extension. So, we can't use the same openapi file for both the Controller on the server side and the Api on client side.

Describe the solution you'd like

Should we add support to the "x-spring-paginated" extension in this library to generate the pageNumber, pageSize and sort parameters in the Api ?

Describe alternatives you've considered

Another solution is to have both these 3 parameters in my openapi file and the x-spring-paginated in the openapi file.
Maybe this is the recommanded solution.
With older version of the openapi-generator-maven-plugin, it caused issue where both the Pageable parameter and these 3 parameters where present in the Controller. But now it seems fixed.

Additional context

Is these the recommandation ?

Image

With the version 7.1.0 of the generator, it didn't work fine :

Image

With the current 7.19.0, it seems to work fine :

Image

Expected generated code on client side :

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions