From 642c0566de50eeb34cbe9fa557000af7b603507a Mon Sep 17 00:00:00 2001 From: Illia Ovchynnikov Date: Sat, 13 Jan 2018 14:15:44 +0100 Subject: [PATCH] Use Rx2 Completalbe for Void Retrofit2 responses --- .../codegen/languages/JavaClientCodegen.java | 15 +++---- .../Java/libraries/retrofit/api.mustache | 8 ++-- .../Java/libraries/retrofit2/api.mustache | 11 +++-- .../libraries/retrofit2/play24/api.mustache | 6 +-- .../libraries/retrofit2/play25/api.mustache | 6 +-- .../java/feign/.swagger-codegen/VERSION | 2 +- .../.swagger-codegen/VERSION | 2 +- .../java/jersey1/.swagger-codegen/VERSION | 2 +- .../jersey2-java6/.swagger-codegen/VERSION | 2 +- .../jersey2-java8/.swagger-codegen/VERSION | 2 +- .../java/jersey2/.swagger-codegen/VERSION | 2 +- .../.swagger-codegen/VERSION | 2 +- .../java/okhttp-gson/.swagger-codegen/VERSION | 2 +- .../java/resteasy/.swagger-codegen/VERSION | 2 +- .../.swagger-codegen/VERSION | 2 +- .../resttemplate/.swagger-codegen/VERSION | 2 +- .../java/retrofit/.swagger-codegen/VERSION | 2 +- .../retrofit2-play24/.swagger-codegen/VERSION | 2 +- .../java/retrofit2-play24/docs/FakeApi.md | 28 ++++++------- .../java/retrofit2-play24/docs/PetApi.md | 28 ++++++------- .../java/retrofit2-play24/docs/StoreApi.md | 7 ++-- .../java/retrofit2-play24/docs/UserApi.md | 42 ++++++++----------- .../java/retrofit2/.swagger-codegen/VERSION | 2 +- .../petstore/java/retrofit2/docs/FakeApi.md | 28 ++++++------- .../petstore/java/retrofit2/docs/PetApi.md | 28 ++++++------- .../petstore/java/retrofit2/docs/StoreApi.md | 7 ++-- .../petstore/java/retrofit2/docs/UserApi.md | 42 ++++++++----------- .../java/retrofit2rx/.swagger-codegen/VERSION | 2 +- .../petstore/java/retrofit2rx/docs/FakeApi.md | 28 ++++++------- .../petstore/java/retrofit2rx/docs/PetApi.md | 28 ++++++------- .../java/retrofit2rx/docs/StoreApi.md | 7 ++-- .../petstore/java/retrofit2rx/docs/UserApi.md | 42 ++++++++----------- .../io/swagger/client/api/AnotherFakeApi.java | 2 +- .../java/io/swagger/client/api/FakeApi.java | 18 ++++---- .../client/api/FakeClassnameTags123Api.java | 2 +- .../java/io/swagger/client/api/PetApi.java | 16 +++---- .../java/io/swagger/client/api/StoreApi.java | 8 ++-- .../java/io/swagger/client/api/UserApi.java | 16 +++---- .../retrofit2rx2/.swagger-codegen/VERSION | 2 +- .../java/retrofit2rx2/docs/FakeApi.md | 28 ++++++------- .../petstore/java/retrofit2rx2/docs/PetApi.md | 28 ++++++------- .../java/retrofit2rx2/docs/StoreApi.md | 7 ++-- .../java/retrofit2rx2/docs/UserApi.md | 42 ++++++++----------- .../io/swagger/client/api/AnotherFakeApi.java | 3 +- .../java/io/swagger/client/api/FakeApi.java | 27 ++++++------ .../client/api/FakeClassnameTags123Api.java | 3 +- .../java/io/swagger/client/api/PetApi.java | 25 +++++------ .../java/io/swagger/client/api/StoreApi.java | 11 ++--- .../java/io/swagger/client/api/UserApi.java | 29 ++++++------- 49 files changed, 302 insertions(+), 356 deletions(-) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java index 9ef0e34aa99..64c0e7ba082 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java @@ -127,7 +127,7 @@ public void processOpts() { this.setUsePlayWS(Boolean.valueOf(additionalProperties.get(USE_PLAY_WS).toString())); } additionalProperties.put(USE_PLAY_WS, usePlayWS); - + if (additionalProperties.containsKey(PLAY_VERSION)) { this.setPlayVersion(additionalProperties.get(PLAY_VERSION).toString()); } @@ -251,7 +251,7 @@ public void processOpts() { } if (usePlayWS) { - // remove unsupported auth + // remove unsupported auth Iterator iter = supportingFiles.iterator(); while (iter.hasNext()) { SupportingFile sf = iter.next(); @@ -261,11 +261,11 @@ public void processOpts() { } apiTemplateFiles.remove("api.mustache"); - + if (PLAY_24.equals(playVersion)) { additionalProperties.put(PLAY_24, true); apiTemplateFiles.put("play24/api.mustache", ".java"); - + supportingFiles.add(new SupportingFile("play24/ApiClient.mustache", invokerFolder, "ApiClient.java")); supportingFiles.add(new SupportingFile("play24/Play24CallFactory.mustache", invokerFolder, "Play24CallFactory.java")); supportingFiles.add(new SupportingFile("play24/Play24CallAdapterFactory.mustache", invokerFolder, @@ -273,7 +273,7 @@ public void processOpts() { } else { additionalProperties.put(PLAY_25, true); apiTemplateFiles.put("play25/api.mustache", ".java"); - + supportingFiles.add(new SupportingFile("play25/ApiClient.mustache", invokerFolder, "ApiClient.java")); supportingFiles.add(new SupportingFile("play25/Play25CallFactory.mustache", invokerFolder, "Play25CallFactory.java")); supportingFiles.add(new SupportingFile("play25/Play25CallAdapterFactory.mustache", invokerFolder, @@ -284,7 +284,7 @@ public void processOpts() { supportingFiles.add(new SupportingFile("play-common/auth/ApiKeyAuth.mustache", authFolder, "ApiKeyAuth.java")); supportingFiles.add(new SupportingFile("auth/Authentication.mustache", authFolder, "Authentication.java")); supportingFiles.add(new SupportingFile("Pair.mustache", invokerFolder, "Pair.java")); - + additionalProperties.put("jackson", "true"); additionalProperties.remove("gson"); } @@ -323,9 +323,6 @@ public Map postProcessOperations(Map objs) { operation.prioritizedContentTypes = prioritizeContentTypes(operation.consumes); } } - if (operation.returnType == null) { - operation.returnType = "Void"; - } if (usesRetrofit2Library() && StringUtils.isNotEmpty(operation.path) && operation.path.startsWith("/")){ operation.path = operation.path.substring(1); } diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache index f94389c12a1..46df0ecedf3 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit/api.mustache @@ -26,9 +26,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} -{{#returnType}} - * @return {{returnType}} -{{/returnType}} + * @return {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}} {{#externalDocs}} * {{description}} * @see {{summary}} Documentation @@ -37,7 +35,7 @@ public interface {{classname}} { {{#formParams}}{{#-first}} {{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}} @{{httpMethod}}("{{{path}}}") - {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}} {{operationId}}({{^allParams}});{{/allParams}} + {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}} {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} );{{/hasMore}}{{/allParams}} @@ -57,7 +55,7 @@ public interface {{classname}} { {{#isMultipart}}@retrofit.http.Multipart{{/isMultipart}}{{^isMultipart}}@retrofit.http.FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}} @{{httpMethod}}("{{{path}}}") void {{operationId}}( - {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}, {{/allParams}}Callback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> cb + {{#allParams}}{{>libraries/retrofit/queryParams}}{{>libraries/retrofit/pathParams}}{{>libraries/retrofit/headerParams}}{{>libraries/retrofit/bodyParams}}{{>libraries/retrofit/formParams}}, {{/allParams}}Callback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> cb ); {{/operation}} } diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache index d19c634e29d..40773f15dcc 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/api.mustache @@ -8,6 +8,11 @@ import rx.Observable; {{#useRxJava2}} import io.reactivex.Observable; {{/useRxJava2}} +{{^returnType}} +{{#useRxJava2}} +import io.reactivex.Completable; +{{/useRxJava2}} +{{/returnType}} {{#doNotUseRx}} import retrofit2.Call; {{/doNotUseRx}} @@ -35,7 +40,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object{{/returnType}}> + * @return {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{returnType}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{#externalDocs}} * {{description}} * @see {{summary}} Documentation @@ -54,9 +59,9 @@ public interface {{classname}} { }) {{/-first}} {{/prioritizedContentTypes}} - {{/formParams}} + {{/formParams}} @{{httpMethod}}("{{{path}}}") - {{^doNotUseRx}}Observable{{/doNotUseRx}}{{#doNotUseRx}}Call{{/doNotUseRx}}<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}{{/isResponseFile}}> {{operationId}}({{^allParams}});{{/allParams}} + {{^doNotUseRx}}{{#useRxJava}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/useRxJava}}{{#useRxJava2}}{{#returnType}}Observable<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}Completable{{/returnType}}{{/useRxJava2}}{{/doNotUseRx}}{{#doNotUseRx}}Call<{{#isResponseFile}}ResponseBody{{/isResponseFile}}{{^isResponseFile}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/isResponseFile}}>{{/doNotUseRx}} {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} );{{/hasMore}}{{/allParams}} diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play24/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play24/api.mustache index 6ffa06c5385..6538ed53d2f 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play24/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play24/api.mustache @@ -31,7 +31,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object{{/returnType}}> + * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> */ {{#formParams}} {{#-first}} @@ -46,9 +46,9 @@ public interface {{classname}} { }) {{/-first}} {{/prioritizedContentTypes}} - {{/formParams}} + {{/formParams}} @{{httpMethod}}("{{{path}}}") - F.Promise> {{operationId}}({{^allParams}});{{/allParams}} + F.Promise> {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} );{{/hasMore}}{{/allParams}} diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play25/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play25/api.mustache index b16f1779b9a..51b1812b49e 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play25/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/play25/api.mustache @@ -31,7 +31,7 @@ public interface {{classname}} { {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} {{/allParams}} - * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object{{/returnType}}> + * @return Call<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}> */ {{#formParams}} {{#-first}} @@ -46,9 +46,9 @@ public interface {{classname}} { }) {{/-first}} {{/prioritizedContentTypes}} - {{/formParams}} + {{/formParams}} @{{httpMethod}}("{{{path}}}") - CompletionStage> {{operationId}}({{^allParams}});{{/allParams}} + CompletionStage> {{operationId}}({{^allParams}});{{/allParams}} {{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}} );{{/hasMore}}{{/allParams}} diff --git a/samples/client/petstore/java/feign/.swagger-codegen/VERSION b/samples/client/petstore/java/feign/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/feign/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/feign/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION b/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/google-api-client/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey1/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2-java6/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2-java8/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/jersey2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/okhttp-gson/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION b/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resteasy/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate-withXml/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/resttemplate/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2-play24/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md index 3e052dea273..9526fadf552 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md @@ -242,7 +242,7 @@ No authorization required # **testEndpointParameters** -> Void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) +> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -280,8 +280,7 @@ OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None try { - Void result = apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - System.out.println(result); + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); e.printStackTrace(); @@ -309,7 +308,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -322,7 +321,7 @@ Name | Type | Description | Notes # **testEnumParameters** -> Void testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) +> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) To test enum parameters @@ -345,8 +344,7 @@ String enumQueryString = "-efg"; // String | Query parameter enum test (string) Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) try { - Void result = apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); - System.out.println(result); + apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); e.printStackTrace(); @@ -368,7 +366,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -381,7 +379,7 @@ No authorization required # **testInlineAdditionalProperties** -> Void testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(param) test inline additionalProperties @@ -397,8 +395,7 @@ test inline additionalProperties FakeApi apiInstance = new FakeApi(); Object param = null; // Object | request body try { - Void result = apiInstance.testInlineAdditionalProperties(param); - System.out.println(result); + apiInstance.testInlineAdditionalProperties(param); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); e.printStackTrace(); @@ -413,7 +410,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -426,7 +423,7 @@ No authorization required # **testJsonFormData** -> Void testJsonFormData(param, param2) +> testJsonFormData(param, param2) test json serialization of form data @@ -443,8 +440,7 @@ FakeApi apiInstance = new FakeApi(); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 try { - Void result = apiInstance.testJsonFormData(param, param2); - System.out.println(result); + apiInstance.testJsonFormData(param, param2); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); e.printStackTrace(); @@ -460,7 +456,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md index ea3c05ad412..0bfc5532bbf 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **addPet** -> Void addPet(body) +> addPet(body) Add a new pet to the store @@ -40,8 +40,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.addPet(body); - System.out.println(result); + apiInstance.addPet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); e.printStackTrace(); @@ -56,7 +55,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -69,7 +68,7 @@ Name | Type | Description | Notes # **deletePet** -> Void deletePet(petId, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -94,8 +93,7 @@ PetApi apiInstance = new PetApi(); Long petId = 789L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | try { - Void result = apiInstance.deletePet(petId, apiKey); - System.out.println(result); + apiInstance.deletePet(petId, apiKey); } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); e.printStackTrace(); @@ -111,7 +109,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -285,7 +283,7 @@ Name | Type | Description | Notes # **updatePet** -> Void updatePet(body) +> updatePet(body) Update an existing pet @@ -309,8 +307,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.updatePet(body); - System.out.println(result); + apiInstance.updatePet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); e.printStackTrace(); @@ -325,7 +322,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -338,7 +335,7 @@ Name | Type | Description | Notes # **updatePetWithForm** -> Void updatePetWithForm(petId, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -364,8 +361,7 @@ Long petId = 789L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet try { - Void result = apiInstance.updatePetWithForm(petId, name, status); - System.out.println(result); + apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); e.printStackTrace(); @@ -382,7 +378,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md index 134f0c36578..77314313236 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/StoreApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **deleteOrder** -> Void deleteOrder(orderId) +> deleteOrder(orderId) Delete purchase order by ID @@ -28,8 +28,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or StoreApi apiInstance = new StoreApi(); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted try { - Void result = apiInstance.deleteOrder(orderId); - System.out.println(result); + apiInstance.deleteOrder(orderId); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); e.printStackTrace(); @@ -44,7 +43,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md b/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md index 40096ec05bc..95208371279 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/UserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** -> Void createUser(body) +> createUser(body) Create user @@ -32,8 +32,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); User body = new User(); // User | Created user object try { - Void result = apiInstance.createUser(body); - System.out.println(result); + apiInstance.createUser(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); e.printStackTrace(); @@ -48,7 +47,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -61,7 +60,7 @@ No authorization required # **createUsersWithArrayInput** -> Void createUsersWithArrayInput(body) +> createUsersWithArrayInput(body) Creates list of users with given input array @@ -77,8 +76,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithArrayInput(body); - System.out.println(result); + apiInstance.createUsersWithArrayInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); e.printStackTrace(); @@ -93,7 +91,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -106,7 +104,7 @@ No authorization required # **createUsersWithListInput** -> Void createUsersWithListInput(body) +> createUsersWithListInput(body) Creates list of users with given input array @@ -122,8 +120,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithListInput(body); - System.out.println(result); + apiInstance.createUsersWithListInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); e.printStackTrace(); @@ -138,7 +135,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -151,7 +148,7 @@ No authorization required # **deleteUser** -> Void deleteUser(username) +> deleteUser(username) Delete user @@ -167,8 +164,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); String username = "username_example"; // String | The name that needs to be deleted try { - Void result = apiInstance.deleteUser(username); - System.out.println(result); + apiInstance.deleteUser(username); } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); e.printStackTrace(); @@ -183,7 +179,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -288,7 +284,7 @@ No authorization required # **logoutUser** -> Void logoutUser() +> logoutUser() Logs out current logged in user session @@ -303,8 +299,7 @@ Logs out current logged in user session UserApi apiInstance = new UserApi(); try { - Void result = apiInstance.logoutUser(); - System.out.println(result); + apiInstance.logoutUser(); } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); e.printStackTrace(); @@ -316,7 +311,7 @@ This endpoint does not need any parameter. ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -329,7 +324,7 @@ No authorization required # **updateUser** -> Void updateUser(username, body) +> updateUser(username, body) Updated user @@ -346,8 +341,7 @@ UserApi apiInstance = new UserApi(); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object try { - Void result = apiInstance.updateUser(username, body); - System.out.println(result); + apiInstance.updateUser(username, body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); e.printStackTrace(); @@ -363,7 +357,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 3e052dea273..9526fadf552 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -242,7 +242,7 @@ No authorization required # **testEndpointParameters** -> Void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) +> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -280,8 +280,7 @@ OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None try { - Void result = apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - System.out.println(result); + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); e.printStackTrace(); @@ -309,7 +308,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -322,7 +321,7 @@ Name | Type | Description | Notes # **testEnumParameters** -> Void testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) +> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) To test enum parameters @@ -345,8 +344,7 @@ String enumQueryString = "-efg"; // String | Query parameter enum test (string) Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) try { - Void result = apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); - System.out.println(result); + apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); e.printStackTrace(); @@ -368,7 +366,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -381,7 +379,7 @@ No authorization required # **testInlineAdditionalProperties** -> Void testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(param) test inline additionalProperties @@ -397,8 +395,7 @@ test inline additionalProperties FakeApi apiInstance = new FakeApi(); Object param = null; // Object | request body try { - Void result = apiInstance.testInlineAdditionalProperties(param); - System.out.println(result); + apiInstance.testInlineAdditionalProperties(param); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); e.printStackTrace(); @@ -413,7 +410,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -426,7 +423,7 @@ No authorization required # **testJsonFormData** -> Void testJsonFormData(param, param2) +> testJsonFormData(param, param2) test json serialization of form data @@ -443,8 +440,7 @@ FakeApi apiInstance = new FakeApi(); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 try { - Void result = apiInstance.testJsonFormData(param, param2); - System.out.println(result); + apiInstance.testJsonFormData(param, param2); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); e.printStackTrace(); @@ -460,7 +456,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md index ea3c05ad412..0bfc5532bbf 100644 --- a/samples/client/petstore/java/retrofit2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **addPet** -> Void addPet(body) +> addPet(body) Add a new pet to the store @@ -40,8 +40,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.addPet(body); - System.out.println(result); + apiInstance.addPet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); e.printStackTrace(); @@ -56,7 +55,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -69,7 +68,7 @@ Name | Type | Description | Notes # **deletePet** -> Void deletePet(petId, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -94,8 +93,7 @@ PetApi apiInstance = new PetApi(); Long petId = 789L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | try { - Void result = apiInstance.deletePet(petId, apiKey); - System.out.println(result); + apiInstance.deletePet(petId, apiKey); } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); e.printStackTrace(); @@ -111,7 +109,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -285,7 +283,7 @@ Name | Type | Description | Notes # **updatePet** -> Void updatePet(body) +> updatePet(body) Update an existing pet @@ -309,8 +307,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.updatePet(body); - System.out.println(result); + apiInstance.updatePet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); e.printStackTrace(); @@ -325,7 +322,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -338,7 +335,7 @@ Name | Type | Description | Notes # **updatePetWithForm** -> Void updatePetWithForm(petId, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -364,8 +361,7 @@ Long petId = 789L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet try { - Void result = apiInstance.updatePetWithForm(petId, name, status); - System.out.println(result); + apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); e.printStackTrace(); @@ -382,7 +378,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2/docs/StoreApi.md index 134f0c36578..77314313236 100644 --- a/samples/client/petstore/java/retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2/docs/StoreApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **deleteOrder** -> Void deleteOrder(orderId) +> deleteOrder(orderId) Delete purchase order by ID @@ -28,8 +28,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or StoreApi apiInstance = new StoreApi(); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted try { - Void result = apiInstance.deleteOrder(orderId); - System.out.println(result); + apiInstance.deleteOrder(orderId); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); e.printStackTrace(); @@ -44,7 +43,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2/docs/UserApi.md b/samples/client/petstore/java/retrofit2/docs/UserApi.md index 40096ec05bc..95208371279 100644 --- a/samples/client/petstore/java/retrofit2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2/docs/UserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** -> Void createUser(body) +> createUser(body) Create user @@ -32,8 +32,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); User body = new User(); // User | Created user object try { - Void result = apiInstance.createUser(body); - System.out.println(result); + apiInstance.createUser(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); e.printStackTrace(); @@ -48,7 +47,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -61,7 +60,7 @@ No authorization required # **createUsersWithArrayInput** -> Void createUsersWithArrayInput(body) +> createUsersWithArrayInput(body) Creates list of users with given input array @@ -77,8 +76,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithArrayInput(body); - System.out.println(result); + apiInstance.createUsersWithArrayInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); e.printStackTrace(); @@ -93,7 +91,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -106,7 +104,7 @@ No authorization required # **createUsersWithListInput** -> Void createUsersWithListInput(body) +> createUsersWithListInput(body) Creates list of users with given input array @@ -122,8 +120,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithListInput(body); - System.out.println(result); + apiInstance.createUsersWithListInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); e.printStackTrace(); @@ -138,7 +135,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -151,7 +148,7 @@ No authorization required # **deleteUser** -> Void deleteUser(username) +> deleteUser(username) Delete user @@ -167,8 +164,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); String username = "username_example"; // String | The name that needs to be deleted try { - Void result = apiInstance.deleteUser(username); - System.out.println(result); + apiInstance.deleteUser(username); } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); e.printStackTrace(); @@ -183,7 +179,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -288,7 +284,7 @@ No authorization required # **logoutUser** -> Void logoutUser() +> logoutUser() Logs out current logged in user session @@ -303,8 +299,7 @@ Logs out current logged in user session UserApi apiInstance = new UserApi(); try { - Void result = apiInstance.logoutUser(); - System.out.println(result); + apiInstance.logoutUser(); } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); e.printStackTrace(); @@ -316,7 +311,7 @@ This endpoint does not need any parameter. ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -329,7 +324,7 @@ No authorization required # **updateUser** -> Void updateUser(username, body) +> updateUser(username, body) Updated user @@ -346,8 +341,7 @@ UserApi apiInstance = new UserApi(); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object try { - Void result = apiInstance.updateUser(username, body); - System.out.println(result); + apiInstance.updateUser(username, body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); e.printStackTrace(); @@ -363,7 +357,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2rx/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md index 3e052dea273..9526fadf552 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md @@ -242,7 +242,7 @@ No authorization required # **testEndpointParameters** -> Void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) +> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -280,8 +280,7 @@ OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None try { - Void result = apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - System.out.println(result); + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); e.printStackTrace(); @@ -309,7 +308,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -322,7 +321,7 @@ Name | Type | Description | Notes # **testEnumParameters** -> Void testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) +> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) To test enum parameters @@ -345,8 +344,7 @@ String enumQueryString = "-efg"; // String | Query parameter enum test (string) Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) try { - Void result = apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); - System.out.println(result); + apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); e.printStackTrace(); @@ -368,7 +366,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -381,7 +379,7 @@ No authorization required # **testInlineAdditionalProperties** -> Void testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(param) test inline additionalProperties @@ -397,8 +395,7 @@ test inline additionalProperties FakeApi apiInstance = new FakeApi(); Object param = null; // Object | request body try { - Void result = apiInstance.testInlineAdditionalProperties(param); - System.out.println(result); + apiInstance.testInlineAdditionalProperties(param); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); e.printStackTrace(); @@ -413,7 +410,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -426,7 +423,7 @@ No authorization required # **testJsonFormData** -> Void testJsonFormData(param, param2) +> testJsonFormData(param, param2) test json serialization of form data @@ -443,8 +440,7 @@ FakeApi apiInstance = new FakeApi(); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 try { - Void result = apiInstance.testJsonFormData(param, param2); - System.out.println(result); + apiInstance.testJsonFormData(param, param2); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); e.printStackTrace(); @@ -460,7 +456,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md index ea3c05ad412..0bfc5532bbf 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **addPet** -> Void addPet(body) +> addPet(body) Add a new pet to the store @@ -40,8 +40,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.addPet(body); - System.out.println(result); + apiInstance.addPet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); e.printStackTrace(); @@ -56,7 +55,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -69,7 +68,7 @@ Name | Type | Description | Notes # **deletePet** -> Void deletePet(petId, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -94,8 +93,7 @@ PetApi apiInstance = new PetApi(); Long petId = 789L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | try { - Void result = apiInstance.deletePet(petId, apiKey); - System.out.println(result); + apiInstance.deletePet(petId, apiKey); } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); e.printStackTrace(); @@ -111,7 +109,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -285,7 +283,7 @@ Name | Type | Description | Notes # **updatePet** -> Void updatePet(body) +> updatePet(body) Update an existing pet @@ -309,8 +307,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.updatePet(body); - System.out.println(result); + apiInstance.updatePet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); e.printStackTrace(); @@ -325,7 +322,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -338,7 +335,7 @@ Name | Type | Description | Notes # **updatePetWithForm** -> Void updatePetWithForm(petId, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -364,8 +361,7 @@ Long petId = 789L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet try { - Void result = apiInstance.updatePetWithForm(petId, name, status); - System.out.println(result); + apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); e.printStackTrace(); @@ -382,7 +378,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md index 134f0c36578..77314313236 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/StoreApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **deleteOrder** -> Void deleteOrder(orderId) +> deleteOrder(orderId) Delete purchase order by ID @@ -28,8 +28,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or StoreApi apiInstance = new StoreApi(); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted try { - Void result = apiInstance.deleteOrder(orderId); - System.out.println(result); + apiInstance.deleteOrder(orderId); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); e.printStackTrace(); @@ -44,7 +43,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md index 40096ec05bc..95208371279 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/UserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** -> Void createUser(body) +> createUser(body) Create user @@ -32,8 +32,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); User body = new User(); // User | Created user object try { - Void result = apiInstance.createUser(body); - System.out.println(result); + apiInstance.createUser(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); e.printStackTrace(); @@ -48,7 +47,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -61,7 +60,7 @@ No authorization required # **createUsersWithArrayInput** -> Void createUsersWithArrayInput(body) +> createUsersWithArrayInput(body) Creates list of users with given input array @@ -77,8 +76,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithArrayInput(body); - System.out.println(result); + apiInstance.createUsersWithArrayInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); e.printStackTrace(); @@ -93,7 +91,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -106,7 +104,7 @@ No authorization required # **createUsersWithListInput** -> Void createUsersWithListInput(body) +> createUsersWithListInput(body) Creates list of users with given input array @@ -122,8 +120,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithListInput(body); - System.out.println(result); + apiInstance.createUsersWithListInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); e.printStackTrace(); @@ -138,7 +135,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -151,7 +148,7 @@ No authorization required # **deleteUser** -> Void deleteUser(username) +> deleteUser(username) Delete user @@ -167,8 +164,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); String username = "username_example"; // String | The name that needs to be deleted try { - Void result = apiInstance.deleteUser(username); - System.out.println(result); + apiInstance.deleteUser(username); } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); e.printStackTrace(); @@ -183,7 +179,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -288,7 +284,7 @@ No authorization required # **logoutUser** -> Void logoutUser() +> logoutUser() Logs out current logged in user session @@ -303,8 +299,7 @@ Logs out current logged in user session UserApi apiInstance = new UserApi(); try { - Void result = apiInstance.logoutUser(); - System.out.println(result); + apiInstance.logoutUser(); } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); e.printStackTrace(); @@ -316,7 +311,7 @@ This endpoint does not need any parameter. ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -329,7 +324,7 @@ No authorization required # **updateUser** -> Void updateUser(username, body) +> updateUser(username, body) Updated user @@ -346,8 +341,7 @@ UserApi apiInstance = new UserApi(); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object try { - Void result = apiInstance.updateUser(username, body); - System.out.println(result); + apiInstance.updateUser(username, body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); e.printStackTrace(); @@ -363,7 +357,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/AnotherFakeApi.java index 3d71a91b2ab..f3a744e9c88 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -20,7 +20,7 @@ public interface AnotherFakeApi { * To test special tags * To test special tags * @param body client model (required) - * @return Call<Client> + * @return Observable<Client> */ @Headers({ "Content-Type:application/json" diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java index 475de10d940..25c403fceeb 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java @@ -24,7 +24,7 @@ public interface FakeApi { * * Test serialization of outer boolean types * @param body Input boolean as post body (optional) - * @return Call<Boolean> + * @return Observable<Boolean> */ @POST("fake/outer/boolean") Observable fakeOuterBooleanSerialize( @@ -35,7 +35,7 @@ Observable fakeOuterBooleanSerialize( * * Test serialization of object with outer number type * @param body Input composite as post body (optional) - * @return Call<OuterComposite> + * @return Observable<OuterComposite> */ @POST("fake/outer/composite") Observable fakeOuterCompositeSerialize( @@ -46,7 +46,7 @@ Observable fakeOuterCompositeSerialize( * * Test serialization of outer number types * @param body Input number as post body (optional) - * @return Call<BigDecimal> + * @return Observable<BigDecimal> */ @POST("fake/outer/number") Observable fakeOuterNumberSerialize( @@ -57,7 +57,7 @@ Observable fakeOuterNumberSerialize( * * Test serialization of outer string types * @param body Input string as post body (optional) - * @return Call<String> + * @return Observable<String> */ @POST("fake/outer/string") Observable fakeOuterStringSerialize( @@ -68,7 +68,7 @@ Observable fakeOuterStringSerialize( * To test \"client\" model * To test \"client\" model * @param body client model (required) - * @return Call<Client> + * @return Observable<Client> */ @Headers({ "Content-Type:application/json" @@ -95,7 +95,7 @@ Observable testClientModel( * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @return Call<Void> + * @return Observable<Void> */ @retrofit2.http.FormUrlEncoded @POST("fake") @@ -114,7 +114,7 @@ Observable testEndpointParameters( * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @return Call<Void> + * @return Observable<Void> */ @retrofit2.http.FormUrlEncoded @GET("fake") @@ -126,7 +126,7 @@ Observable testEnumParameters( * test inline additionalProperties * * @param param request body (required) - * @return Call<Void> + * @return Observable<Void> */ @Headers({ "Content-Type:application/json" @@ -141,7 +141,7 @@ Observable testInlineAdditionalProperties( * * @param param field1 (required) * @param param2 field2 (required) - * @return Call<Void> + * @return Observable<Void> */ @retrofit2.http.FormUrlEncoded @GET("fake/jsonFormData") diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 092f0bf5c50..41a9fc215ca 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -20,7 +20,7 @@ public interface FakeClassnameTags123Api { * To test class name in snake case * * @param body client model (required) - * @return Call<Client> + * @return Observable<Client> */ @Headers({ "Content-Type:application/json" diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java index 4f848e7d69f..d605025aff6 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java @@ -22,7 +22,7 @@ public interface PetApi { * Add a new pet to the store * * @param body Pet object that needs to be added to the store (required) - * @return Call<Void> + * @return Observable<Void> */ @Headers({ "Content-Type:application/json" @@ -37,7 +37,7 @@ Observable addPet( * * @param petId Pet id to delete (required) * @param apiKey (optional) - * @return Call<Void> + * @return Observable<Void> */ @DELETE("pet/{petId}") Observable deletePet( @@ -48,7 +48,7 @@ Observable deletePet( * Finds Pets by status * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter (required) - * @return Call<List<Pet>> + * @return Observable<List<Pet>> */ @GET("pet/findByStatus") Observable> findPetsByStatus( @@ -59,7 +59,7 @@ Observable> findPetsByStatus( * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by (required) - * @return Call<List<Pet>> + * @return Observable<List<Pet>> */ @GET("pet/findByTags") Observable> findPetsByTags( @@ -70,7 +70,7 @@ Observable> findPetsByTags( * Find pet by ID * Returns a single pet * @param petId ID of pet to return (required) - * @return Call<Pet> + * @return Observable<Pet> */ @GET("pet/{petId}") Observable getPetById( @@ -81,7 +81,7 @@ Observable getPetById( * Update an existing pet * * @param body Pet object that needs to be added to the store (required) - * @return Call<Void> + * @return Observable<Void> */ @Headers({ "Content-Type:application/json" @@ -97,7 +97,7 @@ Observable updatePet( * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) - * @return Call<Void> + * @return Observable<Void> */ @retrofit2.http.FormUrlEncoded @POST("pet/{petId}") @@ -111,7 +111,7 @@ Observable updatePetWithForm( * @param petId ID of pet to update (required) * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) - * @return Call<ModelApiResponse> + * @return Observable<ModelApiResponse> */ @retrofit2.http.Multipart @POST("pet/{petId}/uploadImage") diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java index b8cbf56d1b3..e3b6637db03 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/StoreApi.java @@ -20,7 +20,7 @@ public interface StoreApi { * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) - * @return Call<Void> + * @return Observable<Void> */ @DELETE("store/order/{order_id}") Observable deleteOrder( @@ -30,7 +30,7 @@ Observable deleteOrder( /** * Returns pet inventories by status * Returns a map of status codes to quantities - * @return Call<Map<String, Integer>> + * @return Observable<Map<String, Integer>> */ @GET("store/inventory") Observable> getInventory(); @@ -40,7 +40,7 @@ Observable deleteOrder( * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched (required) - * @return Call<Order> + * @return Observable<Order> */ @GET("store/order/{order_id}") Observable getOrderById( @@ -51,7 +51,7 @@ Observable getOrderById( * Place an order for a pet * * @param body order placed for purchasing the pet (required) - * @return Call<Order> + * @return Observable<Order> */ @POST("store/order") Observable placeOrder( diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java index f0bff0c7730..79d46595bf5 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/UserApi.java @@ -20,7 +20,7 @@ public interface UserApi { * Create user * This can only be done by the logged in user. * @param body Created user object (required) - * @return Call<Void> + * @return Observable<Void> */ @POST("user") Observable createUser( @@ -31,7 +31,7 @@ Observable createUser( * Creates list of users with given input array * * @param body List of user object (required) - * @return Call<Void> + * @return Observable<Void> */ @POST("user/createWithArray") Observable createUsersWithArrayInput( @@ -42,7 +42,7 @@ Observable createUsersWithArrayInput( * Creates list of users with given input array * * @param body List of user object (required) - * @return Call<Void> + * @return Observable<Void> */ @POST("user/createWithList") Observable createUsersWithListInput( @@ -53,7 +53,7 @@ Observable createUsersWithListInput( * Delete user * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) - * @return Call<Void> + * @return Observable<Void> */ @DELETE("user/{username}") Observable deleteUser( @@ -64,7 +64,7 @@ Observable deleteUser( * Get user by user name * * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return Call<User> + * @return Observable<User> */ @GET("user/{username}") Observable getUserByName( @@ -76,7 +76,7 @@ Observable getUserByName( * * @param username The user name for login (required) * @param password The password for login in clear text (required) - * @return Call<String> + * @return Observable<String> */ @GET("user/login") Observable loginUser( @@ -86,7 +86,7 @@ Observable loginUser( /** * Logs out current logged in user session * - * @return Call<Void> + * @return Observable<Void> */ @GET("user/logout") Observable logoutUser(); @@ -97,7 +97,7 @@ Observable loginUser( * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) - * @return Call<Void> + * @return Observable<Void> */ @PUT("user/{username}") Observable updateUser( diff --git a/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION b/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION index f9f7450d135..50794f17f1a 100644 --- a/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION +++ b/samples/client/petstore/java/retrofit2rx2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 3e052dea273..9526fadf552 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -242,7 +242,7 @@ No authorization required # **testEndpointParameters** -> Void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) +> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -280,8 +280,7 @@ OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None try { - Void result = apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - System.out.println(result); + apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); e.printStackTrace(); @@ -309,7 +308,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -322,7 +321,7 @@ Name | Type | Description | Notes # **testEnumParameters** -> Void testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) +> testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble) To test enum parameters @@ -345,8 +344,7 @@ String enumQueryString = "-efg"; // String | Query parameter enum test (string) Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double) Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) try { - Void result = apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); - System.out.println(result); + apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); e.printStackTrace(); @@ -368,7 +366,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -381,7 +379,7 @@ No authorization required # **testInlineAdditionalProperties** -> Void testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(param) test inline additionalProperties @@ -397,8 +395,7 @@ test inline additionalProperties FakeApi apiInstance = new FakeApi(); Object param = null; // Object | request body try { - Void result = apiInstance.testInlineAdditionalProperties(param); - System.out.println(result); + apiInstance.testInlineAdditionalProperties(param); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); e.printStackTrace(); @@ -413,7 +410,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -426,7 +423,7 @@ No authorization required # **testJsonFormData** -> Void testJsonFormData(param, param2) +> testJsonFormData(param, param2) test json serialization of form data @@ -443,8 +440,7 @@ FakeApi apiInstance = new FakeApi(); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 try { - Void result = apiInstance.testJsonFormData(param, param2); - System.out.println(result); + apiInstance.testJsonFormData(param, param2); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); e.printStackTrace(); @@ -460,7 +456,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md index ea3c05ad412..0bfc5532bbf 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **addPet** -> Void addPet(body) +> addPet(body) Add a new pet to the store @@ -40,8 +40,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.addPet(body); - System.out.println(result); + apiInstance.addPet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); e.printStackTrace(); @@ -56,7 +55,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -69,7 +68,7 @@ Name | Type | Description | Notes # **deletePet** -> Void deletePet(petId, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -94,8 +93,7 @@ PetApi apiInstance = new PetApi(); Long petId = 789L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | try { - Void result = apiInstance.deletePet(petId, apiKey); - System.out.println(result); + apiInstance.deletePet(petId, apiKey); } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); e.printStackTrace(); @@ -111,7 +109,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -285,7 +283,7 @@ Name | Type | Description | Notes # **updatePet** -> Void updatePet(body) +> updatePet(body) Update an existing pet @@ -309,8 +307,7 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store try { - Void result = apiInstance.updatePet(body); - System.out.println(result); + apiInstance.updatePet(body); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); e.printStackTrace(); @@ -325,7 +322,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -338,7 +335,7 @@ Name | Type | Description | Notes # **updatePetWithForm** -> Void updatePetWithForm(petId, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -364,8 +361,7 @@ Long petId = 789L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet try { - Void result = apiInstance.updatePetWithForm(petId, name, status); - System.out.println(result); + apiInstance.updatePetWithForm(petId, name, status); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); e.printStackTrace(); @@ -382,7 +378,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md index 134f0c36578..77314313236 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **deleteOrder** -> Void deleteOrder(orderId) +> deleteOrder(orderId) Delete purchase order by ID @@ -28,8 +28,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or StoreApi apiInstance = new StoreApi(); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted try { - Void result = apiInstance.deleteOrder(orderId); - System.out.println(result); + apiInstance.deleteOrder(orderId); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); e.printStackTrace(); @@ -44,7 +43,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md index 40096ec05bc..95208371279 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/UserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** -> Void createUser(body) +> createUser(body) Create user @@ -32,8 +32,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); User body = new User(); // User | Created user object try { - Void result = apiInstance.createUser(body); - System.out.println(result); + apiInstance.createUser(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); e.printStackTrace(); @@ -48,7 +47,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -61,7 +60,7 @@ No authorization required # **createUsersWithArrayInput** -> Void createUsersWithArrayInput(body) +> createUsersWithArrayInput(body) Creates list of users with given input array @@ -77,8 +76,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithArrayInput(body); - System.out.println(result); + apiInstance.createUsersWithArrayInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); e.printStackTrace(); @@ -93,7 +91,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -106,7 +104,7 @@ No authorization required # **createUsersWithListInput** -> Void createUsersWithListInput(body) +> createUsersWithListInput(body) Creates list of users with given input array @@ -122,8 +120,7 @@ Creates list of users with given input array UserApi apiInstance = new UserApi(); List body = Arrays.asList(new User()); // List | List of user object try { - Void result = apiInstance.createUsersWithListInput(body); - System.out.println(result); + apiInstance.createUsersWithListInput(body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); e.printStackTrace(); @@ -138,7 +135,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -151,7 +148,7 @@ No authorization required # **deleteUser** -> Void deleteUser(username) +> deleteUser(username) Delete user @@ -167,8 +164,7 @@ This can only be done by the logged in user. UserApi apiInstance = new UserApi(); String username = "username_example"; // String | The name that needs to be deleted try { - Void result = apiInstance.deleteUser(username); - System.out.println(result); + apiInstance.deleteUser(username); } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); e.printStackTrace(); @@ -183,7 +179,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -288,7 +284,7 @@ No authorization required # **logoutUser** -> Void logoutUser() +> logoutUser() Logs out current logged in user session @@ -303,8 +299,7 @@ Logs out current logged in user session UserApi apiInstance = new UserApi(); try { - Void result = apiInstance.logoutUser(); - System.out.println(result); + apiInstance.logoutUser(); } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); e.printStackTrace(); @@ -316,7 +311,7 @@ This endpoint does not need any parameter. ### Return type -[**Void**](.md) +null (empty response body) ### Authorization @@ -329,7 +324,7 @@ No authorization required # **updateUser** -> Void updateUser(username, body) +> updateUser(username, body) Updated user @@ -346,8 +341,7 @@ UserApi apiInstance = new UserApi(); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object try { - Void result = apiInstance.updateUser(username, body); - System.out.println(result); + apiInstance.updateUser(username, body); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); e.printStackTrace(); @@ -363,7 +357,7 @@ Name | Type | Description | Notes ### Return type -[**Void**](.md) +null (empty response body) ### Authorization diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/AnotherFakeApi.java index a9eb671bfe0..f9bc971c63c 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; import io.reactivex.Observable; +import io.reactivex.Completable; import retrofit2.http.*; import okhttp3.RequestBody; @@ -20,7 +21,7 @@ public interface AnotherFakeApi { * To test special tags * To test special tags * @param body client model (required) - * @return Call<Client> + * @return Observable<Client> */ @Headers({ "Content-Type:application/json" diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeApi.java index 37673eac589..6717e2fb332 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; import io.reactivex.Observable; +import io.reactivex.Completable; import retrofit2.http.*; import okhttp3.RequestBody; @@ -24,7 +25,7 @@ public interface FakeApi { * * Test serialization of outer boolean types * @param body Input boolean as post body (optional) - * @return Call<Boolean> + * @return Observable<Boolean> */ @POST("fake/outer/boolean") Observable fakeOuterBooleanSerialize( @@ -35,7 +36,7 @@ Observable fakeOuterBooleanSerialize( * * Test serialization of object with outer number type * @param body Input composite as post body (optional) - * @return Call<OuterComposite> + * @return Observable<OuterComposite> */ @POST("fake/outer/composite") Observable fakeOuterCompositeSerialize( @@ -46,7 +47,7 @@ Observable fakeOuterCompositeSerialize( * * Test serialization of outer number types * @param body Input number as post body (optional) - * @return Call<BigDecimal> + * @return Observable<BigDecimal> */ @POST("fake/outer/number") Observable fakeOuterNumberSerialize( @@ -57,7 +58,7 @@ Observable fakeOuterNumberSerialize( * * Test serialization of outer string types * @param body Input string as post body (optional) - * @return Call<String> + * @return Observable<String> */ @POST("fake/outer/string") Observable fakeOuterStringSerialize( @@ -68,7 +69,7 @@ Observable fakeOuterStringSerialize( * To test \"client\" model * To test \"client\" model * @param body client model (required) - * @return Call<Client> + * @return Observable<Client> */ @Headers({ "Content-Type:application/json" @@ -95,11 +96,11 @@ Observable testClientModel( * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @return Call<Void> + * @return Completable */ @retrofit2.http.FormUrlEncoded @POST("fake") - Observable testEndpointParameters( + Completable testEndpointParameters( @retrofit2.http.Field("number") BigDecimal number, @retrofit2.http.Field("double") Double _double, @retrofit2.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit2.http.Field("byte") byte[] _byte, @retrofit2.http.Field("integer") Integer integer, @retrofit2.http.Field("int32") Integer int32, @retrofit2.http.Field("int64") Long int64, @retrofit2.http.Field("float") Float _float, @retrofit2.http.Field("string") String string, @retrofit2.http.Field("binary") byte[] binary, @retrofit2.http.Field("date") LocalDate date, @retrofit2.http.Field("dateTime") OffsetDateTime dateTime, @retrofit2.http.Field("password") String password, @retrofit2.http.Field("callback") String paramCallback ); @@ -114,11 +115,11 @@ Observable testEndpointParameters( * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) - * @return Call<Void> + * @return Completable */ @retrofit2.http.FormUrlEncoded @GET("fake") - Observable testEnumParameters( + Completable testEnumParameters( @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble ); @@ -126,13 +127,13 @@ Observable testEnumParameters( * test inline additionalProperties * * @param param request body (required) - * @return Call<Void> + * @return Completable */ @Headers({ "Content-Type:application/json" }) @POST("fake/inline-additionalProperties") - Observable testInlineAdditionalProperties( + Completable testInlineAdditionalProperties( @retrofit2.http.Body Object param ); @@ -141,11 +142,11 @@ Observable testInlineAdditionalProperties( * * @param param field1 (required) * @param param2 field2 (required) - * @return Call<Void> + * @return Completable */ @retrofit2.http.FormUrlEncoded @GET("fake/jsonFormData") - Observable testJsonFormData( + Completable testJsonFormData( @retrofit2.http.Field("param") String param, @retrofit2.http.Field("param2") String param2 ); diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java index 6e7e3555a21..fdcce26c48c 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeClassnameTags123Api.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; import io.reactivex.Observable; +import io.reactivex.Completable; import retrofit2.http.*; import okhttp3.RequestBody; @@ -20,7 +21,7 @@ public interface FakeClassnameTags123Api { * To test class name in snake case * * @param body client model (required) - * @return Call<Client> + * @return Observable<Client> */ @Headers({ "Content-Type:application/json" diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/PetApi.java index e3c9fbf2581..5770e1b2ee2 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/PetApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; import io.reactivex.Observable; +import io.reactivex.Completable; import retrofit2.http.*; import okhttp3.RequestBody; @@ -22,13 +23,13 @@ public interface PetApi { * Add a new pet to the store * * @param body Pet object that needs to be added to the store (required) - * @return Call<Void> + * @return Completable */ @Headers({ "Content-Type:application/json" }) @POST("pet") - Observable addPet( + Completable addPet( @retrofit2.http.Body Pet body ); @@ -37,10 +38,10 @@ Observable addPet( * * @param petId Pet id to delete (required) * @param apiKey (optional) - * @return Call<Void> + * @return Completable */ @DELETE("pet/{petId}") - Observable deletePet( + Completable deletePet( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Header("api_key") String apiKey ); @@ -48,7 +49,7 @@ Observable deletePet( * Finds Pets by status * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter (required) - * @return Call<List<Pet>> + * @return Observable<List<Pet>> */ @GET("pet/findByStatus") Observable> findPetsByStatus( @@ -59,7 +60,7 @@ Observable> findPetsByStatus( * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by (required) - * @return Call<List<Pet>> + * @return Observable<List<Pet>> */ @GET("pet/findByTags") Observable> findPetsByTags( @@ -70,7 +71,7 @@ Observable> findPetsByTags( * Find pet by ID * Returns a single pet * @param petId ID of pet to return (required) - * @return Call<Pet> + * @return Observable<Pet> */ @GET("pet/{petId}") Observable getPetById( @@ -81,13 +82,13 @@ Observable getPetById( * Update an existing pet * * @param body Pet object that needs to be added to the store (required) - * @return Call<Void> + * @return Completable */ @Headers({ "Content-Type:application/json" }) @PUT("pet") - Observable updatePet( + Completable updatePet( @retrofit2.http.Body Pet body ); @@ -97,11 +98,11 @@ Observable updatePet( * @param petId ID of pet that needs to be updated (required) * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) - * @return Call<Void> + * @return Completable */ @retrofit2.http.FormUrlEncoded @POST("pet/{petId}") - Observable updatePetWithForm( + Completable updatePetWithForm( @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Field("name") String name, @retrofit2.http.Field("status") String status ); @@ -111,7 +112,7 @@ Observable updatePetWithForm( * @param petId ID of pet to update (required) * @param additionalMetadata Additional data to pass to server (optional) * @param file file to upload (optional) - * @return Call<ModelApiResponse> + * @return Observable<ModelApiResponse> */ @retrofit2.http.Multipart @POST("pet/{petId}/uploadImage") diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java index 746909cce01..541c8c33964 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; import io.reactivex.Observable; +import io.reactivex.Completable; import retrofit2.http.*; import okhttp3.RequestBody; @@ -20,17 +21,17 @@ public interface StoreApi { * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) - * @return Call<Void> + * @return Completable */ @DELETE("store/order/{order_id}") - Observable deleteOrder( + Completable deleteOrder( @retrofit2.http.Path("order_id") String orderId ); /** * Returns pet inventories by status * Returns a map of status codes to quantities - * @return Call<Map<String, Integer>> + * @return Observable<Map<String, Integer>> */ @GET("store/inventory") Observable> getInventory(); @@ -40,7 +41,7 @@ Observable deleteOrder( * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched (required) - * @return Call<Order> + * @return Observable<Order> */ @GET("store/order/{order_id}") Observable getOrderById( @@ -51,7 +52,7 @@ Observable getOrderById( * Place an order for a pet * * @param body order placed for purchasing the pet (required) - * @return Call<Order> + * @return Observable<Order> */ @POST("store/order") Observable placeOrder( diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/UserApi.java index 1997f4c6cfb..91f9c495e3f 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/UserApi.java @@ -3,6 +3,7 @@ import io.swagger.client.CollectionFormats.*; import io.reactivex.Observable; +import io.reactivex.Completable; import retrofit2.http.*; import okhttp3.RequestBody; @@ -20,10 +21,10 @@ public interface UserApi { * Create user * This can only be done by the logged in user. * @param body Created user object (required) - * @return Call<Void> + * @return Completable */ @POST("user") - Observable createUser( + Completable createUser( @retrofit2.http.Body User body ); @@ -31,10 +32,10 @@ Observable createUser( * Creates list of users with given input array * * @param body List of user object (required) - * @return Call<Void> + * @return Completable */ @POST("user/createWithArray") - Observable createUsersWithArrayInput( + Completable createUsersWithArrayInput( @retrofit2.http.Body List body ); @@ -42,10 +43,10 @@ Observable createUsersWithArrayInput( * Creates list of users with given input array * * @param body List of user object (required) - * @return Call<Void> + * @return Completable */ @POST("user/createWithList") - Observable createUsersWithListInput( + Completable createUsersWithListInput( @retrofit2.http.Body List body ); @@ -53,10 +54,10 @@ Observable createUsersWithListInput( * Delete user * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) - * @return Call<Void> + * @return Completable */ @DELETE("user/{username}") - Observable deleteUser( + Completable deleteUser( @retrofit2.http.Path("username") String username ); @@ -64,7 +65,7 @@ Observable deleteUser( * Get user by user name * * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return Call<User> + * @return Observable<User> */ @GET("user/{username}") Observable getUserByName( @@ -76,7 +77,7 @@ Observable getUserByName( * * @param username The user name for login (required) * @param password The password for login in clear text (required) - * @return Call<String> + * @return Observable<String> */ @GET("user/login") Observable loginUser( @@ -86,10 +87,10 @@ Observable loginUser( /** * Logs out current logged in user session * - * @return Call<Void> + * @return Completable */ @GET("user/logout") - Observable logoutUser(); + Completable logoutUser(); /** @@ -97,10 +98,10 @@ Observable loginUser( * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) - * @return Call<Void> + * @return Completable */ @PUT("user/{username}") - Observable updateUser( + Completable updateUser( @retrofit2.http.Path("username") String username, @retrofit2.http.Body User body );