diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache
index 6ca343943cf..f9434978704 100644
--- a/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache
+++ b/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2/ApiClient.mustache
@@ -74,7 +74,7 @@ public class ApiClient {
/**
* Basic constructor for single auth name
- * @param authName
+ * @param authName Authentication name
*/
public ApiClient(String authName) {
this(new String[]{authName});
@@ -82,8 +82,8 @@ public class ApiClient {
/**
* Helper constructor for single api key
- * @param authName
- * @param apiKey
+ * @param authName Authentication name
+ * @param apiKey API key
*/
public ApiClient(String authName, String apiKey) {
this(authName);
@@ -92,9 +92,9 @@ public class ApiClient {
/**
* Helper constructor for single basic auth or password oauth2
- * @param authName
- * @param username
- * @param password
+ * @param authName Authentication name
+ * @param username Username
+ * @param password Password
*/
public ApiClient(String authName, String username, String password) {
this(authName);
@@ -103,11 +103,11 @@ public class ApiClient {
/**
* Helper constructor for single password oauth2
- * @param authName
- * @param clientId
- * @param secret
- * @param username
- * @param password
+ * @param authName Authentication name
+ * @param clientId Client ID
+ * @param secret Client Secret
+ * @param username Username
+ * @param password Password
*/
public ApiClient(String authName, String clientId, String secret, String username, String password) {
this(authName);
@@ -154,7 +154,7 @@ public class ApiClient {
/**
* Helper method to configure the first api key found
- * @param apiKey
+ * @param apiKey API key
*/
private void setApiKey(String apiKey) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -168,8 +168,8 @@ public class ApiClient {
/**
* Helper method to configure the username/password for basic auth or password oauth
- * @param username
- * @param password
+ * @param username Username
+ * @param password Password
*/
private void setCredentials(String username, String password) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -216,7 +216,7 @@ public class ApiClient {
/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
- * @param accessToken
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -230,9 +230,9 @@ public class ApiClient {
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
- * @param clientId
- * @param clientSecret
- * @param redirectURI
+ * @param clientId Client ID
+ * @param clientSecret Client secret
+ * @param redirectURI Redirect URI
*/
public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -252,7 +252,7 @@ public class ApiClient {
/**
* Configures a listener which is notified when a new access token is received.
- * @param accessTokenListener
+ * @param accessTokenListener Access token listener
*/
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -266,8 +266,8 @@ public class ApiClient {
/**
* Adds an authorization to be used by the client
- * @param authName
- * @param authorization
+ * @param authName Authentication name
+ * @param authorization Authorization interceptor
*/
public void addAuthorization(String authName, Interceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
@@ -305,7 +305,7 @@ public class ApiClient {
/**
* Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit
- * @param okClient
+ * @param okClient An instance of OK HTTP client
*/
public void configureFromOkclient(OkHttpClient okClient) {
this.okBuilder = okClient.newBuilder();
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 9bd835a4a36..398cbe6a132 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
@@ -25,12 +25,12 @@ public interface {{classname}} {
* {{summary}}
* {{notes}}
{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
-{{/allParams}} * @return Call<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
+{{/allParams}} * @return Call[{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}]
*/
{{#formParams}}{{#-first}}
{{#isMultipart}}@Multipart{{/isMultipart}}{{^isMultipart}}@FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
@{{httpMethod}}("{{path}}")
- {{#useRxJava}}Observable{{/useRxJava}}{{^useRxJava}}Call{{/useRxJava}}<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{^allParams}});{{/allParams}}
+ {{#useRxJava}}Observable{{/useRxJava}}{{^useRxJava}}Call{{/useRxJava}}[{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}] {{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/retrofit2/.swagger-codegen-ignore b/samples/client/petstore/java/retrofit2/.swagger-codegen-ignore
index bca48b38e28..c5fa491b4c5 100644
--- a/samples/client/petstore/java/retrofit2/.swagger-codegen-ignore
+++ b/samples/client/petstore/java/retrofit2/.swagger-codegen-ignore
@@ -21,5 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
-
-pom.xml
diff --git a/samples/client/petstore/java/retrofit2/pom.xml b/samples/client/petstore/java/retrofit2/pom.xml
index 770278851e6..9b832202144 100644
--- a/samples/client/petstore/java/retrofit2/pom.xml
+++ b/samples/client/petstore/java/retrofit2/pom.xml
@@ -96,55 +96,6 @@
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- 1.2.1
-
-
- gradle-test
- integration-test
-
- exec
-
-
- gradle
-
- check
-
-
-
-
- sbt-test
- integration-test
-
- exec
-
-
- sbt
-
- publishLocal
-
-
-
-
- mvn-javadoc-test
- integration-test
-
- exec
-
-
- mvn
-
- javadoc:javadoc
-
-
-
-
-
-
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java
index 87866795bf7..604861f6072 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/ApiClient.java
@@ -66,7 +66,7 @@ public class ApiClient {
/**
* Basic constructor for single auth name
- * @param authName
+ * @param authName Authentication name
*/
public ApiClient(String authName) {
this(new String[]{authName});
@@ -74,8 +74,8 @@ public class ApiClient {
/**
* Helper constructor for single api key
- * @param authName
- * @param apiKey
+ * @param authName Authentication name
+ * @param apiKey API key
*/
public ApiClient(String authName, String apiKey) {
this(authName);
@@ -84,9 +84,9 @@ public class ApiClient {
/**
* Helper constructor for single basic auth or password oauth2
- * @param authName
- * @param username
- * @param password
+ * @param authName Authentication name
+ * @param username Username
+ * @param password Password
*/
public ApiClient(String authName, String username, String password) {
this(authName);
@@ -95,11 +95,11 @@ public class ApiClient {
/**
* Helper constructor for single password oauth2
- * @param authName
- * @param clientId
- * @param secret
- * @param username
- * @param password
+ * @param authName Authentication name
+ * @param clientId Client ID
+ * @param secret Client Secret
+ * @param username Username
+ * @param password Password
*/
public ApiClient(String authName, String clientId, String secret, String username, String password) {
this(authName);
@@ -141,7 +141,7 @@ public class ApiClient {
/**
* Helper method to configure the first api key found
- * @param apiKey
+ * @param apiKey API key
*/
private void setApiKey(String apiKey) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -155,8 +155,8 @@ public class ApiClient {
/**
* Helper method to configure the username/password for basic auth or password oauth
- * @param username
- * @param password
+ * @param username Username
+ * @param password Password
*/
private void setCredentials(String username, String password) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -203,7 +203,7 @@ public class ApiClient {
/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
- * @param accessToken
+ * @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -217,9 +217,9 @@ public class ApiClient {
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
- * @param clientId
- * @param clientSecret
- * @param redirectURI
+ * @param clientId Client ID
+ * @param clientSecret Client secret
+ * @param redirectURI Redirect URI
*/
public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -239,7 +239,7 @@ public class ApiClient {
/**
* Configures a listener which is notified when a new access token is received.
- * @param accessTokenListener
+ * @param accessTokenListener Access token listener
*/
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -253,8 +253,8 @@ public class ApiClient {
/**
* Adds an authorization to be used by the client
- * @param authName
- * @param authorization
+ * @param authName Authentication name
+ * @param authorization Authorization interceptor
*/
public void addAuthorization(String authName, Interceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
@@ -292,7 +292,7 @@ public class ApiClient {
/**
* Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit
- * @param okClient
+ * @param okClient An instance of OK HTTP client
*/
public void configureFromOkclient(OkHttpClient okClient) {
this.okBuilder = okClient.newBuilder();
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
index aa1089ddbed..4b2149758a7 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
@@ -33,12 +33,12 @@ public interface FakeApi {
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
- * @return Call
+ * @return Call[Void]
*/
@FormUrlEncoded
@POST("fake")
- Call testEndpointParameters(
+ Call[Void] testEndpointParameters(
@Field("number") BigDecimal number, @Field("double") Double _double, @Field("string") String string, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("binary") byte[] binary, @Field("date") LocalDate date, @Field("dateTime") DateTime dateTime, @Field("password") String password
);
@@ -48,12 +48,12 @@ public interface FakeApi {
* @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
+ * @return Call[Void]
*/
@FormUrlEncoded
@GET("fake")
- Call testEnumQueryParameters(
+ Call[Void] testEnumQueryParameters(
@Field("enum_query_string") String enumQueryString, @Query("enum_query_integer") BigDecimal enumQueryInteger, @Field("enum_query_double") Double enumQueryDouble
);
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java
index dd39a864f06..23e97996c66 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/PetApi.java
@@ -22,11 +22,11 @@ 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
+ * @return Call[Void]
*/
@POST("pet")
- Call addPet(
+ Call[Void] addPet(
@Body Pet body
);
@@ -35,11 +35,11 @@ public interface PetApi {
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
- * @return Call
+ * @return Call[Void]
*/
@DELETE("pet/{petId}")
- Call deletePet(
+ Call[Void] deletePet(
@Path("petId") Long petId, @Header("api_key") String apiKey
);
@@ -47,11 +47,11 @@ public interface PetApi {
* 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>
+ * @return Call[List]
*/
@GET("pet/findByStatus")
- Call> findPetsByStatus(
+ Call[List] findPetsByStatus(
@Query("status") CSVParams status
);
@@ -59,11 +59,11 @@ public interface PetApi {
* 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>
+ * @return Call[List]
*/
@GET("pet/findByTags")
- Call> findPetsByTags(
+ Call[List] findPetsByTags(
@Query("tags") CSVParams tags
);
@@ -71,11 +71,11 @@ public interface PetApi {
* Find pet by ID
* Returns a single pet
* @param petId ID of pet to return (required)
- * @return Call
+ * @return Call[Pet]
*/
@GET("pet/{petId}")
- Call getPetById(
+ Call[Pet] getPetById(
@Path("petId") Long petId
);
@@ -83,11 +83,11 @@ public interface PetApi {
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (required)
- * @return Call
+ * @return Call[Void]
*/
@PUT("pet")
- Call updatePet(
+ Call[Void] updatePet(
@Body Pet body
);
@@ -97,12 +97,12 @@ public interface PetApi {
* @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
+ * @return Call[Void]
*/
@FormUrlEncoded
@POST("pet/{petId}")
- Call updatePetWithForm(
+ Call[Void] updatePetWithForm(
@Path("petId") Long petId, @Field("name") String name, @Field("status") String status
);
@@ -112,12 +112,12 @@ public interface PetApi {
* @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
+ * @return Call[ModelApiResponse]
*/
@Multipart
@POST("pet/{petId}/uploadImage")
- Call uploadFile(
+ Call[ModelApiResponse] uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
);
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java
index 1651c07482c..97c331e1a58 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/StoreApi.java
@@ -20,33 +20,33 @@ 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
+ * @return Call[Void]
*/
@DELETE("store/order/{orderId}")
- Call deleteOrder(
+ Call[Void] deleteOrder(
@Path("orderId") String orderId
);
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
- * @return Call