Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/samples-java-client-jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
- samples/client/petstore/java/webclient-useSingleRequestParameter
- samples/client/petstore/java/vertx
- samples/client/petstore/java/vertx5
- samples/client/petstore/java/vertx5-supportVertxFuture
- samples/client/petstore/java/vertx-no-nullable
- samples/client/petstore/java/vertx-supportVertxFuture
- samples/client/petstore/java/jersey2-java8-localdatetime
Expand Down
12 changes: 12 additions & 0 deletions bin/configs/java-vertx5-supportVertxFuture.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
generatorName: java
outputDir: samples/client/petstore/java/vertx5-supportVertxFuture
library: vertx
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
useVertx5: "true"
useRxJava3: "true"
additionalProperties:
artifactId: petstore-vertx5-supportVertxFuture
hideGenerationTimestamp: "true"
dateLibrary: java8
supportVertxFuture: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface {{classname}} {
{{/isDeprecated}}
default Future<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){
Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> promise = Promise.promise();
{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}promise);
{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}promise::handle);
return promise.future();
}

Expand All @@ -44,7 +44,7 @@ public interface {{classname}} {
{{/isDeprecated}}
default Future<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}, {{/allParams}}ApiClient.AuthInfo authInfo){
Promise<{{{returnType}}}{{^returnType}}Void{{/returnType}}> promise = Promise.promise();
{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}authInfo, promise);
{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}authInfo, promise::handle);
return promise.future();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public interface AnotherFakeApi {

default Future<Client> call123testSpecialTags(@javax.annotation.Nonnull Client client){
Promise<Client> promise = Promise.promise();
call123testSpecialTags(client, promise);
call123testSpecialTags(client, promise::handle);
return promise.future();
}

void call123testSpecialTags(@javax.annotation.Nonnull Client client, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> handler);

default Future<Client> call123testSpecialTags(@javax.annotation.Nonnull Client client, ApiClient.AuthInfo authInfo){
Promise<Client> promise = Promise.promise();
call123testSpecialTags(client, authInfo, promise);
call123testSpecialTags(client, authInfo, promise::handle);
return promise.future();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public interface DefaultApi {

default Future<FooGetDefaultResponse> fooGet(){
Promise<FooGetDefaultResponse> promise = Promise.promise();
fooGet(promise);
fooGet(promise::handle);
return promise.future();
}

void fooGet(ApiClient.AuthInfo authInfo, Handler<AsyncResult<FooGetDefaultResponse>> handler);

default Future<FooGetDefaultResponse> fooGet(ApiClient.AuthInfo authInfo){
Promise<FooGetDefaultResponse> promise = Promise.promise();
fooGet(authInfo, promise);
fooGet(authInfo, promise::handle);
return promise.future();
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public interface FakeClassnameTags123Api {

default Future<Client> testClassname(@javax.annotation.Nonnull Client client){
Promise<Client> promise = Promise.promise();
testClassname(client, promise);
testClassname(client, promise::handle);
return promise.future();
}

void testClassname(@javax.annotation.Nonnull Client client, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Client>> handler);

default Future<Client> testClassname(@javax.annotation.Nonnull Client client, ApiClient.AuthInfo authInfo){
Promise<Client> promise = Promise.promise();
testClassname(client, authInfo, promise);
testClassname(client, authInfo, promise::handle);
return promise.future();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,47 @@ public interface PetApi {

default Future<Void> addPet(@javax.annotation.Nonnull Pet pet){
Promise<Void> promise = Promise.promise();
addPet(pet, promise);
addPet(pet, promise::handle);
return promise.future();
}

void addPet(@javax.annotation.Nonnull Pet pet, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);

default Future<Void> addPet(@javax.annotation.Nonnull Pet pet, ApiClient.AuthInfo authInfo){
Promise<Void> promise = Promise.promise();
addPet(pet, authInfo, promise);
addPet(pet, authInfo, promise::handle);
return promise.future();
}

void deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey, Handler<AsyncResult<Void>> handler);

default Future<Void> deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey){
Promise<Void> promise = Promise.promise();
deletePet(petId, apiKey, promise);
deletePet(petId, apiKey, promise::handle);
return promise.future();
}

void deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);

default Future<Void> deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey, ApiClient.AuthInfo authInfo){
Promise<Void> promise = Promise.promise();
deletePet(petId, apiKey, authInfo, promise);
deletePet(petId, apiKey, authInfo, promise::handle);
return promise.future();
}

void findPetsByStatus(@javax.annotation.Nonnull List<String> status, Handler<AsyncResult<List<Pet>>> handler);

default Future<List<Pet>> findPetsByStatus(@javax.annotation.Nonnull List<String> status){
Promise<List<Pet>> promise = Promise.promise();
findPetsByStatus(status, promise);
findPetsByStatus(status, promise::handle);
return promise.future();
}

void findPetsByStatus(@javax.annotation.Nonnull List<String> status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<List<Pet>>> handler);

default Future<List<Pet>> findPetsByStatus(@javax.annotation.Nonnull List<String> status, ApiClient.AuthInfo authInfo){
Promise<List<Pet>> promise = Promise.promise();
findPetsByStatus(status, authInfo, promise);
findPetsByStatus(status, authInfo, promise::handle);
return promise.future();
}

Expand All @@ -69,7 +69,7 @@ default Future<List<Pet>> findPetsByStatus(@javax.annotation.Nonnull List<String
@Deprecated
default Future<Set<Pet>> findPetsByTags(@javax.annotation.Nonnull Set<String> tags){
Promise<Set<Pet>> promise = Promise.promise();
findPetsByTags(tags, promise);
findPetsByTags(tags, promise::handle);
return promise.future();
}

Expand All @@ -79,87 +79,87 @@ default Future<Set<Pet>> findPetsByTags(@javax.annotation.Nonnull Set<String> ta
@Deprecated
default Future<Set<Pet>> findPetsByTags(@javax.annotation.Nonnull Set<String> tags, ApiClient.AuthInfo authInfo){
Promise<Set<Pet>> promise = Promise.promise();
findPetsByTags(tags, authInfo, promise);
findPetsByTags(tags, authInfo, promise::handle);
return promise.future();
}

void getPetById(@javax.annotation.Nonnull Long petId, Handler<AsyncResult<Pet>> handler);

default Future<Pet> getPetById(@javax.annotation.Nonnull Long petId){
Promise<Pet> promise = Promise.promise();
getPetById(petId, promise);
getPetById(petId, promise::handle);
return promise.future();
}

void getPetById(@javax.annotation.Nonnull Long petId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Pet>> handler);

default Future<Pet> getPetById(@javax.annotation.Nonnull Long petId, ApiClient.AuthInfo authInfo){
Promise<Pet> promise = Promise.promise();
getPetById(petId, authInfo, promise);
getPetById(petId, authInfo, promise::handle);
return promise.future();
}

void updatePet(@javax.annotation.Nonnull Pet pet, Handler<AsyncResult<Void>> handler);

default Future<Void> updatePet(@javax.annotation.Nonnull Pet pet){
Promise<Void> promise = Promise.promise();
updatePet(pet, promise);
updatePet(pet, promise::handle);
return promise.future();
}

void updatePet(@javax.annotation.Nonnull Pet pet, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);

default Future<Void> updatePet(@javax.annotation.Nonnull Pet pet, ApiClient.AuthInfo authInfo){
Promise<Void> promise = Promise.promise();
updatePet(pet, authInfo, promise);
updatePet(pet, authInfo, promise::handle);
return promise.future();
}

void updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status, Handler<AsyncResult<Void>> handler);

default Future<Void> updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status){
Promise<Void> promise = Promise.promise();
updatePetWithForm(petId, name, status, promise);
updatePetWithForm(petId, name, status, promise::handle);
return promise.future();
}

void updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);

default Future<Void> updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status, ApiClient.AuthInfo authInfo){
Promise<Void> promise = Promise.promise();
updatePetWithForm(petId, name, status, authInfo, promise);
updatePetWithForm(petId, name, status, authInfo, promise::handle);
return promise.future();
}

void uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable AsyncFile _file, Handler<AsyncResult<ModelApiResponse>> handler);

default Future<ModelApiResponse> uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable AsyncFile _file){
Promise<ModelApiResponse> promise = Promise.promise();
uploadFile(petId, additionalMetadata, _file, promise);
uploadFile(petId, additionalMetadata, _file, promise::handle);
return promise.future();
}

void uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable AsyncFile _file, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> handler);

default Future<ModelApiResponse> uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable AsyncFile _file, ApiClient.AuthInfo authInfo){
Promise<ModelApiResponse> promise = Promise.promise();
uploadFile(petId, additionalMetadata, _file, authInfo, promise);
uploadFile(petId, additionalMetadata, _file, authInfo, promise::handle);
return promise.future();
}

void uploadFileWithRequiredFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull AsyncFile requiredFile, @javax.annotation.Nullable String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> handler);

default Future<ModelApiResponse> uploadFileWithRequiredFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull AsyncFile requiredFile, @javax.annotation.Nullable String additionalMetadata){
Promise<ModelApiResponse> promise = Promise.promise();
uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, promise);
uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, promise::handle);
return promise.future();
}

void uploadFileWithRequiredFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull AsyncFile requiredFile, @javax.annotation.Nullable String additionalMetadata, ApiClient.AuthInfo authInfo, Handler<AsyncResult<ModelApiResponse>> handler);

default Future<ModelApiResponse> uploadFileWithRequiredFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull AsyncFile requiredFile, @javax.annotation.Nullable String additionalMetadata, ApiClient.AuthInfo authInfo){
Promise<ModelApiResponse> promise = Promise.promise();
uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, authInfo, promise);
uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, authInfo, promise::handle);
return promise.future();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,63 +16,63 @@ public interface StoreApi {

default Future<Void> deleteOrder(@javax.annotation.Nonnull String orderId){
Promise<Void> promise = Promise.promise();
deleteOrder(orderId, promise);
deleteOrder(orderId, promise::handle);
return promise.future();
}

void deleteOrder(@javax.annotation.Nonnull String orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Void>> handler);

default Future<Void> deleteOrder(@javax.annotation.Nonnull String orderId, ApiClient.AuthInfo authInfo){
Promise<Void> promise = Promise.promise();
deleteOrder(orderId, authInfo, promise);
deleteOrder(orderId, authInfo, promise::handle);
return promise.future();
}

void getInventory(Handler<AsyncResult<Map<String, Integer>>> handler);

default Future<Map<String, Integer>> getInventory(){
Promise<Map<String, Integer>> promise = Promise.promise();
getInventory(promise);
getInventory(promise::handle);
return promise.future();
}

void getInventory(ApiClient.AuthInfo authInfo, Handler<AsyncResult<Map<String, Integer>>> handler);

default Future<Map<String, Integer>> getInventory(ApiClient.AuthInfo authInfo){
Promise<Map<String, Integer>> promise = Promise.promise();
getInventory(authInfo, promise);
getInventory(authInfo, promise::handle);
return promise.future();
}

void getOrderById(@javax.annotation.Nonnull Long orderId, Handler<AsyncResult<Order>> handler);

default Future<Order> getOrderById(@javax.annotation.Nonnull Long orderId){
Promise<Order> promise = Promise.promise();
getOrderById(orderId, promise);
getOrderById(orderId, promise::handle);
return promise.future();
}

void getOrderById(@javax.annotation.Nonnull Long orderId, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> handler);

default Future<Order> getOrderById(@javax.annotation.Nonnull Long orderId, ApiClient.AuthInfo authInfo){
Promise<Order> promise = Promise.promise();
getOrderById(orderId, authInfo, promise);
getOrderById(orderId, authInfo, promise::handle);
return promise.future();
}

void placeOrder(@javax.annotation.Nonnull Order order, Handler<AsyncResult<Order>> handler);

default Future<Order> placeOrder(@javax.annotation.Nonnull Order order){
Promise<Order> promise = Promise.promise();
placeOrder(order, promise);
placeOrder(order, promise::handle);
return promise.future();
}

void placeOrder(@javax.annotation.Nonnull Order order, ApiClient.AuthInfo authInfo, Handler<AsyncResult<Order>> handler);

default Future<Order> placeOrder(@javax.annotation.Nonnull Order order, ApiClient.AuthInfo authInfo){
Promise<Order> promise = Promise.promise();
placeOrder(order, authInfo, promise);
placeOrder(order, authInfo, promise::handle);
return promise.future();
}

Expand Down
Loading
Loading