Springboot codegen : Compilation error in generated controllers if the skipDefaultInterface tag is set to true
Created by: devdream02
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
Springboot codegen : Compilation error in generated controllers if the skipDefaultInterface tag is set to true
openapi-generator version
3.0.2
OpenAPI declaration file content or url
petstore.yaml
Command line used for generation
spring boot
maven plugin config
<configOptions> <java8>true</java8> <library>spring-boot</library> <dateLibrary>java8</dateLibrary> <sourceFolder>src/main/java</sourceFolder> <useBeanValidation>true</useBeanValidation> <configPackage>com.sample.config</configPackage> <swaggerDocketConfig>true</swaggerDocketConfig> <skipDefaultInterface>true</skipDefaultInterface> </configOptions>
Steps to reproduce
Set skipdefaultInterface flag as true
Error message
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project openapi-spring: Compilation failure: Compilation failure: [ERROR] Downloads/Codebase/openapipoc/src/main/java/com/sample/api/UserApiController.java:[11,8] com.sample.api.UserApiController is not abstract and does not override abstract me thod updateUser(java.lang.String,@javax.validation.Valid com.sample.model.User) in com.sample.api.UserApi [ERROR] /Downloads/Codebase/openapipoc/src/main/java/com/sample/api/UserApiController.java:[20,5] method does not override or implement a method from a supertype [ERROR] /Downloads/Codebase/openapipoc/src/main/java/com/sample/api/PetApiController.java:[11,8] com..sample.api.PetApiController is not abstract and does not override abstract meth od uploadFile(java.lang.Long,java.lang.String,@javax.validation.Valid org.springframework.web.multipart.MultipartFile) in com.sample.api.PetApi [ERROR] /Downloads/Codebase/openapipoc/src/main/java/com/sample/api/PetApiController.java:[20,5] method does not override or implement a method from a supertype [ERROR] /Downloads/Codebase/openapipoc/src/main/java/com/sample/api/StoreApiController.java:[11,8] com.sample.api.StoreApiController is not abstract and does not override abstract method placeOrder(@javax.validation.Valid com.sample.model.Order) in com.sample.api.StoreApi [ERROR] /Downloads/Codebase/openapipoc/src/main/java/com/sample/api/StoreApiController.java:[20,5] method does not override or implement a method from a supertype