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.44k stars 6.48k forks source link

interfaceOnly and generateModelDocumentation configs are not working as expected #2252

Open celice opened 5 years ago

celice commented 5 years ago

I'm using a openapi-generator-maven-plugin with jaxrs-cxf generator and the following configuration:

org.openapitools openapi-generator-maven-plugin 3.3.4 generate ${project.basedir}/src/main/resources/openapi.yaml jaxrs-cxf false false false false src/gen/java/main true

I do expect from configuration not to generate implementation classes as well as not to have annotation documentation in my models and apis, however they're still in place. I've found other people having the same issue. Is it a bug which hasn't been fixed or should I do smth different?

karismann commented 5 years ago

the interfaceOnly option doesn't exist in jaxrs-cxf server generator (https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/jaxrs-cxf.md) i think you should use jaxrs-spec generator as it seem to fit what you want (no implementation classes generated)

KaiStapel commented 5 years ago

I have the same problem with <generateApiDocumentation>false<generateApiDocumentation>. The API annotations are still there with the spring generator.