OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.42k stars 6.48k forks source link

[REQ] removing size, page and sort parameter if using x-spring-paginated option #8315

Open MathiasHi opened 3 years ago

MathiasHi commented 3 years ago

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

I use the feature from the #5022 Pull Request. When I use the same API generation file for some other programming language as Typescript, which doesn't have a pageable type I have to add the size, page, and sort parameter. This parameter now does also appear in the spring application which I want to automatically remove when I use the option.

Describe the solution you'd like

I want to check if there are defined size, page, and sort parameters in the generation file if the x-spring-paginated option is used. If this is the case I'll remove it in the spring application, so only the pageable type is used.

Additional context

I already have helped on #5022. Please give me feedback so I know that it is ok to fork this project and create a new Pull request with this feature.

amelnikoff commented 3 years ago

Indeed. Another problem is to return Page object instead of list.

tofi86 commented 2 years ago

@MathiasHi would love to see this implemented! 👍

tofi86 commented 1 year ago

@amelnikoff I extracted your feature request to a separate issue #14062 and may try to find a solution for this.

tofi86 commented 1 year ago

@MathiasHi @amelnikoff I submitted a PR for this at https://github.com/OpenAPITools/openapi-generator/pull/14064