forked from loafle/openapi-generator-original
[java][vertx] moved HttpStatusException (vertx internal) to HttpException (public) (#11550)
* Update apiImpl.mustache Vertx has moved HttpStatusException (vertx internal) to HttpException (public) https://github.com/vert-x3/wiki/wiki/4.1.0-Deprecations-and-breaking-changes#iovertxextwebhandlerimplhttpstatusexception * Update java vertx server verx version Co-authored-by: Sean Brown <sbrown@axon.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<junit.version>4.13.1</junit.version>
|
||||
<vertx.version>3.4.1</vertx.version>
|
||||
<vertx.version>4.2.4</vertx.version>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
<vertx-swagger-router.version>{{vertxSwaggerRouterVersion}}</vertx-swagger-router.version>
|
||||
<maven-shade-plugin.version>2.3</maven-shade-plugin.version>
|
||||
|
||||
@@ -7,7 +7,7 @@ import {{invokerPackage}}.ApiResponse;
|
||||
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.handler.impl.HttpStatusException;
|
||||
import io.vertx.ext.web.handler.HttpException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -18,7 +18,7 @@ public class {{classname}}Impl implements {{classname}} {
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
public Future<ApiResponse<{{{returnType}}}>> {{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
{{/operation}}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.openapitools.vertxweb.server.ApiResponse;
|
||||
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.handler.impl.HttpStatusException;
|
||||
import io.vertx.ext.web.handler.HttpException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -17,35 +17,35 @@ import java.util.Map;
|
||||
|
||||
public class PetApiImpl implements PetApi {
|
||||
public Future<ApiResponse<Pet>> addPet(Pet pet) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Void>> deletePet(Long petId, String apiKey) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<List<Pet>>> findPetsByStatus(List<String> status) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<List<Pet>>> findPetsByTags(List<String> tags) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Pet>> getPetById(Long petId) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Pet>> updatePet(Pet pet) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Void>> updatePetWithForm(Long petId, JsonObject formBody) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<ModelApiResponse>> uploadFile(Long petId, FileUpload _file) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
public Future<ApiResponse<ModelApiResponse>> uploadFile(Long petId, FileUpload file) {
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.openapitools.vertxweb.server.ApiResponse;
|
||||
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.handler.impl.HttpStatusException;
|
||||
import io.vertx.ext.web.handler.HttpException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -15,19 +15,19 @@ import java.util.Map;
|
||||
|
||||
public class StoreApiImpl implements StoreApi {
|
||||
public Future<ApiResponse<Void>> deleteOrder(String orderId) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Map<String, Integer>>> getInventory() {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Order>> getOrderById(Long orderId) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Order>> placeOrder(Order order) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package org.openapitools.vertxweb.server.api;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.vertxweb.server.model.User;
|
||||
|
||||
import org.openapitools.vertxweb.server.ApiResponse;
|
||||
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.ext.web.handler.impl.HttpStatusException;
|
||||
import io.vertx.ext.web.handler.HttpException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -16,35 +15,35 @@ import java.util.Map;
|
||||
|
||||
public class UserApiImpl implements UserApi {
|
||||
public Future<ApiResponse<Void>> createUser(User user) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Void>> createUsersWithArrayInput(List<User> user) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Void>> createUsersWithListInput(List<User> user) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Void>> deleteUser(String username) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<User>> getUserByName(String username) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<String>> loginUser(String username, String password) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Void>> logoutUser() {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
public Future<ApiResponse<Void>> updateUser(String username, User user) {
|
||||
return Future.failedFuture(new HttpStatusException(501));
|
||||
return Future.failedFuture(new HttpException(501));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user