openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG][JAVA] Uses spring pageable without any config indicating to do so

Open downloadpizza opened this issue 2 years ago • 0 comments

Bug Report Checklist

  • [x] Have you provided a full/minimal spec to reproduce the issue?
  • [x] Have you validated the input using an OpenAPI validator (example)?
  • [x] Have you searched for related issues/PRs?
  • [x] What's the actual output vs expected output?
Description

Using any schema called Pageable will instead use springs pageable (in a spring project)

openapi-generator version

6.0.1

OpenAPI declaration file content or url

https://github.com/downloadpizza/spring-openapi-pageable-poc

Generation Details

refer to pom.xml in my project

Steps to reproduce
  1. Clone my project
  2. Run maven compile
  3. Look in generated PagedObject class and check which Pageable is used.
Related issues/PRs

https://github.com/OpenAPITools/openapi-generator/issues/8360

Suggest a fix

redo the entire Pageable and springfox thing. https://github.com/OpenAPITools/openapi-generator/issues/8192#issuecomment-918076633 as this user has said (which I agree with) it is a dumb thing for a mature library. Its a random very intrusive change that benefits very few people.

downloadpizza avatar Aug 01 '22 15:08 downloadpizza

Bump, this is not a big issue but it is documented nowhere and randomly breaks stuff, not very funny.

downloadpizza avatar Sep 09 '22 12:09 downloadpizza