swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
17.05k stars 6.03k forks source link

[Java] Duplicate methods for generated by versions 3.0.11 and 3.0.16 #10034

Open gwsch opened 4 years ago

gwsch commented 4 years ago

The attached Json file is generated using the WP API SwaggerUI plugin on an empty Wordpress installation. Any use of the cli for java code, e.g. java -jar swagger-codegen-cli-3.0.11.jar generate -i ../../wordpressv2/schema.json -l java -o ../../wordpressv2 --model-package ch.performancebuildings.wp.v2.model --api-package ch.performancebuildings.wp.v2.api --invoker-package ch.performancebuildings.wp.v2.invoker --group-id ch.performancebuildings.wp.v2 --artifact-version 3.22.0 creates an EndpointApi.java class with duplicate methods. Same with e.g. version 2.4.8 produces a correkt syntax.

gwsch commented 4 years ago

schema.zip