forked from loafle/openapi-generator-original
Fix issue 15264 - Replace @Controller with @RestController when using useSpringController (#15266)
* fix issue 15264 * If useResponseEntity true then keep @Controller if not @RestController --------- Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
This commit is contained in:
committed by
GitHub
parent
ede1c9ca3e
commit
2c78ff78ed
@@ -7,7 +7,7 @@ import org.openapitools.model.Pet;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@@ -26,7 +26,7 @@ import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
|
||||
public class PetApiController implements PetApi {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.openapitools.model.Order;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@@ -26,7 +26,7 @@ import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
|
||||
public class StoreApiController implements StoreApi {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openapitools.model.User;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@@ -27,7 +27,7 @@ import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}")
|
||||
public class UserApiController implements UserApi {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user