params) {
+ super(params);
+ }
+
+ public PIPESParams(String... params) {
+ super(params);
+ }
+
+ @Override
+ public String toString() {
+ return StringUtil.join(params.toArray(new String[0]), "|");
+ }
+ }
+
+}
diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/StringUtil.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/StringUtil.java
new file mode 100644
index 000000000000..339a3fb36d5c
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/StringUtil.java
@@ -0,0 +1,55 @@
+/*
+ * Swagger Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: apiteam@swagger.io
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client;
+
+
+public class StringUtil {
+ /**
+ * Check if the given array contains the given value (with case-insensitive comparison).
+ *
+ * @param array The array
+ * @param value The value to search
+ * @return true if the array contains the value
+ */
+ public static boolean containsIgnoreCase(String[] array, String value) {
+ for (String str : array) {
+ if (value == null && str == null) return true;
+ if (value != null && value.equalsIgnoreCase(str)) return true;
+ }
+ return false;
+ }
+
+ /**
+ * Join an array of strings with the given separator.
+ *
+ * Note: This might be replaced by utility method from commons-lang or guava someday
+ * if one of those libraries is added as dependency.
+ *
+ *
+ * @param array The array of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(String[] array, String separator) {
+ int len = array.length;
+ if (len == 0) return "";
+
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
+ }
+ return out.toString();
+ }
+}
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
new file mode 100644
index 000000000000..b0c30a0ab8dd
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/FakeApi.java
@@ -0,0 +1,82 @@
+package io.swagger.client.api;
+
+import io.swagger.client.CollectionFormats.*;
+
+import rx.Observable;
+
+
+import retrofit2.http.*;
+
+import okhttp3.RequestBody;
+
+import java.math.BigDecimal;
+import io.swagger.client.model.Client;
+import org.threeten.bp.LocalDate;
+import org.threeten.bp.OffsetDateTime;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public interface FakeApi {
+ /**
+ * To test \"client\" model
+ * To test \"client\" model
+ * @param body client model (required)
+ * @return Call<Client>
+ */
+ @Headers({
+ "Content-Type:application/json"
+ })
+ @PATCH("fake")
+ Observable testClientModel(
+ @retrofit2.http.Body Client body
+ );
+
+ /**
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ * @param number None (required)
+ * @param _double None (required)
+ * @param patternWithoutDelimiter None (required)
+ * @param _byte None (required)
+ * @param integer None (optional)
+ * @param int32 None (optional)
+ * @param int64 None (optional)
+ * @param _float None (optional)
+ * @param string None (optional)
+ * @param binary None (optional)
+ * @param date None (optional)
+ * @param dateTime None (optional)
+ * @param password None (optional)
+ * @param paramCallback None (optional)
+ * @return Call<Void>
+ */
+ @retrofit2.http.FormUrlEncoded
+ @POST("fake")
+ Observable 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
+ );
+
+ /**
+ * To test enum parameters
+ * To test enum parameters
+ * @param enumFormStringArray Form parameter enum test (string array) (optional)
+ * @param enumFormString Form parameter enum test (string) (optional, default to -efg)
+ * @param enumHeaderStringArray Header parameter enum test (string array) (optional)
+ * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
+ * @param enumQueryStringArray Query parameter enum test (string array) (optional)
+ * @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>
+ */
+ @retrofit2.http.FormUrlEncoded
+ @GET("fake")
+ Observable 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
+ );
+
+}
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
new file mode 100644
index 000000000000..ca50dfdeb64c
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/PetApi.java
@@ -0,0 +1,124 @@
+package io.swagger.client.api;
+
+import io.swagger.client.CollectionFormats.*;
+
+import rx.Observable;
+
+
+import retrofit2.http.*;
+
+import okhttp3.RequestBody;
+
+import java.io.File;
+import io.swagger.client.model.ModelApiResponse;
+import io.swagger.client.model.Pet;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+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>
+ */
+ @Headers({
+ "Content-Type:application/json"
+ })
+ @POST("pet")
+ Observable addPet(
+ @retrofit2.http.Body Pet body
+ );
+
+ /**
+ * Deletes a pet
+ *
+ * @param petId Pet id to delete (required)
+ * @param apiKey (optional)
+ * @return Call<Void>
+ */
+ @DELETE("pet/{petId}")
+ Observable deletePet(
+ @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Header("api_key") String apiKey
+ );
+
+ /**
+ * 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>>
+ */
+ @GET("pet/findByStatus")
+ Observable> findPetsByStatus(
+ @retrofit2.http.Query("status") CSVParams status
+ );
+
+ /**
+ * 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>>
+ */
+ @GET("pet/findByTags")
+ Observable> findPetsByTags(
+ @retrofit2.http.Query("tags") CSVParams tags
+ );
+
+ /**
+ * Find pet by ID
+ * Returns a single pet
+ * @param petId ID of pet to return (required)
+ * @return Call<Pet>
+ */
+ @GET("pet/{petId}")
+ Observable getPetById(
+ @retrofit2.http.Path("petId") Long petId
+ );
+
+ /**
+ * Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store (required)
+ * @return Call<Void>
+ */
+ @Headers({
+ "Content-Type:application/json"
+ })
+ @PUT("pet")
+ Observable updatePet(
+ @retrofit2.http.Body Pet body
+ );
+
+ /**
+ * Updates a pet in the store with form data
+ *
+ * @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>
+ */
+ @retrofit2.http.FormUrlEncoded
+ @POST("pet/{petId}")
+ Observable updatePetWithForm(
+ @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Field("name") String name, @retrofit2.http.Field("status") String status
+ );
+
+ /**
+ * uploads an image
+ *
+ * @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>
+ */
+ @retrofit2.http.Multipart
+ @POST("pet/{petId}/uploadImage")
+ Observable uploadFile(
+ @retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("additionalMetadata") String additionalMetadata, @retrofit2.http.Part("file\"; filename=\"file") RequestBody file
+ );
+
+}
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
new file mode 100644
index 000000000000..a937daca7cc5
--- /dev/null
+++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/api/StoreApi.java
@@ -0,0 +1,63 @@
+package io.swagger.client.api;
+
+import io.swagger.client.CollectionFormats.*;
+
+import rx.Observable;
+
+
+import retrofit2.http.*;
+
+import okhttp3.RequestBody;
+
+import io.swagger.client.model.Order;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+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>
+ */
+ @DELETE("store/order/{orderId}")
+ Observable deleteOrder(
+ @retrofit2.http.Path("orderId") String orderId
+ );
+
+ /**
+ * Returns pet inventories by status
+ * Returns a map of status codes to quantities
+ * @return Call<Map<String, Integer>>
+ */
+ @GET("store/inventory")
+ Observable