Fix issue 12341 (#15234)

* if method return type is void then no return

* build the project

* fix build the project

* fix build the project

* fix return

* fix build the project

* fix build the project

* fix build the project

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
This commit is contained in:
Rodrigo de Almeida - RMA3
2023-04-18 17:56:12 -03:00
committed by GitHub
parent f5b4490bc9
commit 9b2917f3a9
20 changed files with 337 additions and 38 deletions

View File

@@ -95,11 +95,11 @@ public interface PetApi {
value = "/pet/{petId}"
)
@ResponseStatus(HttpStatus.BAD_REQUEST)
default Void deletePet(
default void deletePet(
@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,
@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey
) {
return getDelegate().deletePet(petId, apiKey);
getDelegate().deletePet(petId, apiKey);
}
@@ -293,12 +293,12 @@ public interface PetApi {
consumes = { "application/x-www-form-urlencoded" }
)
@ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
default Void updatePetWithForm(
default void updatePetWithForm(
@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
@ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
@ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
) {
return getDelegate().updatePetWithForm(petId, name, status);
getDelegate().updatePetWithForm(petId, name, status);
}

View File

@@ -60,7 +60,7 @@ public interface PetApiDelegate {
* @return Invalid pet value (status code 400)
* @see PetApi#deletePet
*/
default Void deletePet(Long petId,
default void deletePet(Long petId,
String apiKey) {
throw new IllegalArgumentException("Not implemented");
@@ -195,7 +195,7 @@ public interface PetApiDelegate {
* @return Invalid input (status code 405)
* @see PetApi#updatePetWithForm
*/
default Void updatePetWithForm(Long petId,
default void updatePetWithForm(Long petId,
String name,
String status) {
throw new IllegalArgumentException("Not implemented");

View File

@@ -51,10 +51,10 @@ public interface StoreApi {
value = "/store/order/{orderId}"
)
@ResponseStatus(HttpStatus.BAD_REQUEST)
default Void deleteOrder(
default void deleteOrder(
@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
) {
return getDelegate().deleteOrder(orderId);
getDelegate().deleteOrder(orderId);
}

View File

@@ -32,7 +32,7 @@ public interface StoreApiDelegate {
* or Order not found (status code 404)
* @see StoreApi#deleteOrder
*/
default Void deleteOrder(String orderId) {
default void deleteOrder(String orderId) {
throw new IllegalArgumentException("Not implemented");
}

View File

@@ -54,10 +54,10 @@ public interface UserApi {
consumes = { "application/json" }
)
@ResponseStatus(HttpStatus.OK)
default Void createUser(
default void createUser(
@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User user
) {
return getDelegate().createUser(user);
getDelegate().createUser(user);
}
@@ -86,10 +86,10 @@ public interface UserApi {
consumes = { "application/json" }
)
@ResponseStatus(HttpStatus.OK)
default Void createUsersWithArrayInput(
default void createUsersWithArrayInput(
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> user
) {
return getDelegate().createUsersWithArrayInput(user);
getDelegate().createUsersWithArrayInput(user);
}
@@ -118,10 +118,10 @@ public interface UserApi {
consumes = { "application/json" }
)
@ResponseStatus(HttpStatus.OK)
default Void createUsersWithListInput(
default void createUsersWithListInput(
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> user
) {
return getDelegate().createUsersWithListInput(user);
getDelegate().createUsersWithListInput(user);
}
@@ -151,10 +151,10 @@ public interface UserApi {
value = "/user/{username}"
)
@ResponseStatus(HttpStatus.BAD_REQUEST)
default Void deleteUser(
default void deleteUser(
@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username
) {
return getDelegate().deleteUser(username);
getDelegate().deleteUser(username);
}
@@ -249,10 +249,10 @@ public interface UserApi {
value = "/user/logout"
)
@ResponseStatus(HttpStatus.OK)
default Void logoutUser(
default void logoutUser(
) {
return getDelegate().logoutUser();
getDelegate().logoutUser();
}
@@ -284,11 +284,11 @@ public interface UserApi {
consumes = { "application/json" }
)
@ResponseStatus(HttpStatus.BAD_REQUEST)
default Void updateUser(
default void updateUser(
@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,
@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User user
) {
return getDelegate().updateUser(username, user);
getDelegate().updateUser(username, user);
}
}

View File

@@ -32,7 +32,7 @@ public interface UserApiDelegate {
* @return successful operation (status code 200)
* @see UserApi#createUser
*/
default Void createUser(User user) {
default void createUser(User user) {
throw new IllegalArgumentException("Not implemented");
}
@@ -45,7 +45,7 @@ public interface UserApiDelegate {
* @return successful operation (status code 200)
* @see UserApi#createUsersWithArrayInput
*/
default Void createUsersWithArrayInput(List<User> user) {
default void createUsersWithArrayInput(List<User> user) {
throw new IllegalArgumentException("Not implemented");
}
@@ -58,7 +58,7 @@ public interface UserApiDelegate {
* @return successful operation (status code 200)
* @see UserApi#createUsersWithListInput
*/
default Void createUsersWithListInput(List<User> user) {
default void createUsersWithListInput(List<User> user) {
throw new IllegalArgumentException("Not implemented");
}
@@ -72,7 +72,7 @@ public interface UserApiDelegate {
* or User not found (status code 404)
* @see UserApi#deleteUser
*/
default Void deleteUser(String username) {
default void deleteUser(String username) {
throw new IllegalArgumentException("Not implemented");
}
@@ -129,7 +129,7 @@ public interface UserApiDelegate {
* @return successful operation (status code 200)
* @see UserApi#logoutUser
*/
default Void logoutUser() {
default void logoutUser() {
throw new IllegalArgumentException("Not implemented");
}
@@ -144,7 +144,7 @@ public interface UserApiDelegate {
* or User not found (status code 404)
* @see UserApi#updateUser
*/
default Void updateUser(String username,
default void updateUser(String username,
User user) {
throw new IllegalArgumentException("Not implemented");