[BUG][JAVA][Spring] Config options for Pageable & ApiIgnore
See original GitHub issueBug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What’s the actual output vs expected output?
Description
Trying to generate pure interfaces using next config:
<generateSupportingFiles>false</generateSupportingFiles>
<configOptions>
<openApiNullable>false</openApiNullable>
<java8>false</java8>
<interfaceOnly>true</interfaceOnly>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
</configOptions>
Following lines are added to generated api file:
import org.springframework.data.domain.Pageable;
import springfox.documentation.annotations.ApiIgnore;
and produced compilation error due those classes needed additional dependencies (spring-data-commons&springfox-core)
Didn’t manage to find any option to disable those imports (like openApiNullable
for disabling org.openapitools.jackson.nullable.JsonNullable
)
openapi-generator version
5.0.0
OpenAPI declaration file content or url
Sample project for quick reproducing https://github.com/morphlne/openapi-generator-demo
Steps to reproduce
Clone https://github.com/morphlne/openapi-generator-demo.git
run mvn compile
Related issues/PRs
Both imports added in mustache files in PR: https://github.com/OpenAPITools/openapi-generator/pull/5022
Suggest a fix
Add support for next config options:
<usePageable>false</usePageable>
<useApiIgnore>false</useApiIgnore>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Swagger documentation for Spring Pageable interface
The issue I have is that the pageable parameter is detected with content-type application/json and I don't know how to pass a value...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem with version 5.0.1
@MatCyg As quick solution you can use 5.0.0-beta2 and any earlier version