remove newline char in *.mustache; added generated code

This commit is contained in:
Stas Shakirov
2016-10-10 14:42:08 +03:00
parent 1006b0ca0a
commit 26faf6cf4e
108 changed files with 1241 additions and 277 deletions

View File

@@ -54,7 +54,7 @@ No authorization required
<a name="testEndpointParameters"></a>
# **testEndpointParameters**
> Void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password)
> Void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -90,8 +90,9 @@ byte[] binary = B; // byte[] | None
LocalDate date = new LocalDate(); // LocalDate | None
DateTime dateTime = new DateTime(); // DateTime | 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);
Void result = apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testEndpointParameters");
@@ -116,6 +117,7 @@ Name | Type | Description | Notes
**date** | **LocalDate**| None | [optional]
**dateTime** | **DateTime**| None | [optional]
**password** | **String**| None | [optional]
**paramCallback** | **String**| None | [optional]
### Return type

View File

@@ -28,7 +28,12 @@ public interface FakeApi {
@PATCH("fake")
Call<Client> testClientModel(
@Body Client body
@retrofit2.http.Body Client body
);
/**
@@ -47,13 +52,84 @@ public interface FakeApi {
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @param paramCallback None (optional)
* @return Call&lt;Void&gt;
*/
@FormUrlEncoded
@retrofit2.http.FormUrlEncoded
@POST("fake")
Call<Void> testEndpointParameters(
@Field("number") BigDecimal number, @Field("double") Double _double, @Field("pattern_without_delimiter") String patternWithoutDelimiter, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("string") String string, @Field("binary") byte[] binary, @Field("date") LocalDate date, @Field("dateTime") DateTime dateTime, @Field("password") String password
@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") DateTime dateTime
,
@retrofit2.http.Field("password") String password
,
@retrofit2.http.Field("callback") String paramCallback
);
/**
@@ -70,10 +146,50 @@ public interface FakeApi {
* @return Call&lt;Void&gt;
*/
@FormUrlEncoded
@retrofit2.http.FormUrlEncoded
@GET("fake")
Call<Void> testEnumParameters(
@Field("enum_form_string_array") List<String> enumFormStringArray, @Field("enum_form_string") String enumFormString, @Header("enum_header_string_array") List<String> enumHeaderStringArray, @Header("enum_header_string") String enumHeaderString, @Query("enum_query_string_array") CSVParams enumQueryStringArray, @Query("enum_query_string") String enumQueryString, @Query("enum_query_integer") BigDecimal enumQueryInteger, @Field("enum_query_double") Double enumQueryDouble
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray
,
@retrofit2.http.Field("enum_form_string") String enumFormString
,
@retrofit2.http.Header("enum_header_string_array") List<String> 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") BigDecimal enumQueryInteger
,
@retrofit2.http.Field("enum_query_double") Double enumQueryDouble
);
}

View File

@@ -27,7 +27,12 @@ public interface PetApi {
@POST("pet")
Call<Void> addPet(
@Body Pet body
@retrofit2.http.Body Pet body
);
/**
@@ -40,7 +45,17 @@ public interface PetApi {
@DELETE("pet/{petId}")
Call<Void> deletePet(
@Path("petId") Long petId, @Header("api_key") String apiKey
@retrofit2.http.Path("petId") Long petId
,
@retrofit2.http.Header("api_key") String apiKey
);
/**
@@ -52,7 +67,12 @@ public interface PetApi {
@GET("pet/findByStatus")
Call<List<Pet>> findPetsByStatus(
@Query("status") CSVParams status
@retrofit2.http.Query("status") CSVParams status
);
/**
@@ -64,7 +84,12 @@ public interface PetApi {
@GET("pet/findByTags")
Call<List<Pet>> findPetsByTags(
@Query("tags") CSVParams tags
@retrofit2.http.Query("tags") CSVParams tags
);
/**
@@ -76,7 +101,12 @@ public interface PetApi {
@GET("pet/{petId}")
Call<Pet> getPetById(
@Path("petId") Long petId
@retrofit2.http.Path("petId") Long petId
);
/**
@@ -88,7 +118,12 @@ public interface PetApi {
@PUT("pet")
Call<Void> updatePet(
@Body Pet body
@retrofit2.http.Body Pet body
);
/**
@@ -100,10 +135,25 @@ public interface PetApi {
* @return Call&lt;Void&gt;
*/
@FormUrlEncoded
@retrofit2.http.FormUrlEncoded
@POST("pet/{petId}")
Call<Void> updatePetWithForm(
@Path("petId") Long petId, @Field("name") String name, @Field("status") String status
@retrofit2.http.Path("petId") Long petId
,
@retrofit2.http.Field("name") String name
,
@retrofit2.http.Field("status") String status
);
/**
@@ -115,10 +165,25 @@ public interface PetApi {
* @return Call&lt;ModelApiResponse&gt;
*/
@Multipart
@retrofit2.http.Multipart
@POST("pet/{petId}/uploadImage")
Call<ModelApiResponse> uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file") RequestBody file
@retrofit2.http.Path("petId") Long petId
,
@retrofit2.http.Part("additionalMetadata") String additionalMetadata
,
@retrofit2.http.Part("file\"; filename=\"file") RequestBody file
);
}

View File

@@ -25,7 +25,12 @@ public interface StoreApi {
@DELETE("store/order/{orderId}")
Call<Void> deleteOrder(
@Path("orderId") String orderId
@retrofit2.http.Path("orderId") String orderId
);
/**
@@ -47,7 +52,12 @@ public interface StoreApi {
@GET("store/order/{orderId}")
Call<Order> getOrderById(
@Path("orderId") Long orderId
@retrofit2.http.Path("orderId") Long orderId
);
/**
@@ -59,7 +69,12 @@ public interface StoreApi {
@POST("store/order")
Call<Order> placeOrder(
@Body Order body
@retrofit2.http.Body Order body
);
}

View File

@@ -25,7 +25,12 @@ public interface UserApi {
@POST("user")
Call<Void> createUser(
@Body User body
@retrofit2.http.Body User body
);
/**
@@ -37,7 +42,12 @@ public interface UserApi {
@POST("user/createWithArray")
Call<Void> createUsersWithArrayInput(
@Body List<User> body
@retrofit2.http.Body List<User> body
);
/**
@@ -49,7 +59,12 @@ public interface UserApi {
@POST("user/createWithList")
Call<Void> createUsersWithListInput(
@Body List<User> body
@retrofit2.http.Body List<User> body
);
/**
@@ -61,7 +76,12 @@ public interface UserApi {
@DELETE("user/{username}")
Call<Void> deleteUser(
@Path("username") String username
@retrofit2.http.Path("username") String username
);
/**
@@ -73,7 +93,12 @@ public interface UserApi {
@GET("user/{username}")
Call<User> getUserByName(
@Path("username") String username
@retrofit2.http.Path("username") String username
);
/**
@@ -86,7 +111,17 @@ public interface UserApi {
@GET("user/login")
Call<String> loginUser(
@Query("username") String username, @Query("password") String password
@retrofit2.http.Query("username") String username
, @retrofit2.http.Query("password") String password
);
/**
@@ -109,7 +144,17 @@ public interface UserApi {
@PUT("user/{username}")
Call<Void> updateUser(
@Path("username") String username, @Body User body
@retrofit2.http.Path("username") String username
,
@retrofit2.http.Body User body
);
}

View File

@@ -33,12 +33,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* AdditionalPropertiesClass
*/
public class AdditionalPropertiesClass {
public class AdditionalPropertiesClass {
@SerializedName("map_property")
private Map<String, String> mapProperty = new HashMap<String, String>();
@@ -131,5 +130,6 @@ public class AdditionalPropertiesClass {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Animal
*/
public class Animal {
public class Animal {
@SerializedName("className")
private String className = null;
@@ -118,5 +117,6 @@ public class Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import io.swagger.client.model.Animal;
import java.util.ArrayList;
import java.util.List;
/**
* AnimalFarm
*/
public class AnimalFarm extends ArrayList<Animal> {
public class AnimalFarm extends ArrayList<Animal> {
@Override
public boolean equals(java.lang.Object o) {
@@ -72,5 +71,6 @@ public class AnimalFarm extends ArrayList<Animal> {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -33,12 +33,11 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfArrayOfNumberOnly
*/
public class ArrayOfArrayOfNumberOnly {
public class ArrayOfArrayOfNumberOnly {
@SerializedName("ArrayArrayNumber")
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<List<BigDecimal>>();
@@ -103,5 +102,6 @@ public class ArrayOfArrayOfNumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -33,12 +33,11 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfNumberOnly
*/
public class ArrayOfNumberOnly {
public class ArrayOfNumberOnly {
@SerializedName("ArrayNumber")
private List<BigDecimal> arrayNumber = new ArrayList<BigDecimal>();
@@ -103,5 +102,6 @@ public class ArrayOfNumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -33,12 +33,11 @@ import io.swagger.client.model.ReadOnlyFirst;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayTest
*/
public class ArrayTest {
public class ArrayTest {
@SerializedName("array_of_string")
private List<String> arrayOfString = new ArrayList<String>();
@@ -159,5 +158,6 @@ public class ArrayTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -31,12 +31,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
/**
* Cat
*/
public class Cat extends Animal {
public class Cat extends Animal {
@SerializedName("declawed")
private Boolean declawed = null;
@@ -97,5 +96,6 @@ public class Cat extends Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Category
*/
public class Category {
public class Category {
@SerializedName("id")
private Long id = null;
@@ -118,5 +117,6 @@ public class Category {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Client
*/
public class Client {
public class Client {
@SerializedName("client")
private String client = null;
@@ -95,5 +94,6 @@ public class Client {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -31,12 +31,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
/**
* Dog
*/
public class Dog extends Animal {
public class Dog extends Animal {
@SerializedName("breed")
private String breed = null;
@@ -97,5 +96,6 @@ public class Dog extends Animal {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -32,12 +32,11 @@ import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* EnumArrays
*/
public class EnumArrays {
public class EnumArrays {
/**
* Gets or Sets justSymbol
*/
@@ -169,5 +168,6 @@ public class EnumArrays {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -29,7 +29,6 @@ import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Gets or Sets EnumClass
*/

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* EnumTest
*/
public class EnumTest {
public class EnumTest {
/**
* Gets or Sets enumString
*/
@@ -207,5 +206,6 @@ public class EnumTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -33,12 +33,11 @@ import java.math.BigDecimal;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
/**
* FormatTest
*/
public class FormatTest {
public class FormatTest {
@SerializedName("integer")
private Integer integer = null;
@@ -384,5 +383,6 @@ public class FormatTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* HasOnlyReadOnly
*/
public class HasOnlyReadOnly {
public class HasOnlyReadOnly {
@SerializedName("bar")
private String bar = null;
@@ -100,5 +99,6 @@ public class HasOnlyReadOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -33,12 +33,11 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MapTest
*/
public class MapTest {
public class MapTest {
@SerializedName("map_map_of_string")
private Map<String, Map<String, String>> mapMapOfString = new HashMap<String, Map<String, String>>();
@@ -153,5 +152,6 @@ public class MapTest {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -35,12 +35,11 @@ import java.util.List;
import java.util.Map;
import org.joda.time.DateTime;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
public class MixedPropertiesAndAdditionalPropertiesClass {
public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("uuid")
private String uuid = null;
@@ -151,5 +150,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,13 +30,12 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name starting with number
*/
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
public class Model200Response {
@SerializedName("name")
private Integer name = null;
@@ -119,5 +118,6 @@ public class Model200Response {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ModelApiResponse
*/
public class ModelApiResponse {
public class ModelApiResponse {
@SerializedName("code")
private Integer code = null;
@@ -141,5 +140,6 @@ public class ModelApiResponse {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,13 +30,12 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing reserved words
*/
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
public class ModelReturn {
@SerializedName("return")
private Integer _return = null;
@@ -96,5 +95,6 @@ public class ModelReturn {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,13 +30,12 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name same as property name
*/
@ApiModel(description = "Model for testing model name same as property name")
public class Name {
public class Name {
@SerializedName("name")
private Integer name = null;
@@ -147,5 +146,6 @@ public class Name {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -31,12 +31,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* NumberOnly
*/
public class NumberOnly {
public class NumberOnly {
@SerializedName("JustNumber")
private BigDecimal justNumber = null;
@@ -96,5 +95,6 @@ public class NumberOnly {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -31,12 +31,11 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;
/**
* Order
*/
public class Order {
public class Order {
@SerializedName("id")
private Long id = null;
@@ -236,5 +235,6 @@ public class Order {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -34,12 +34,11 @@ import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
/**
* Pet
*/
public class Pet {
public class Pet {
@SerializedName("id")
private Long id = null;
@@ -249,5 +248,6 @@ public class Pet {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ReadOnlyFirst
*/
public class ReadOnlyFirst {
public class ReadOnlyFirst {
@SerializedName("bar")
private String bar = null;
@@ -109,5 +108,6 @@ public class ReadOnlyFirst {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* SpecialModelName
*/
public class SpecialModelName {
public class SpecialModelName {
@SerializedName("$special[property.name]")
private Long specialPropertyName = null;
@@ -95,5 +94,6 @@ public class SpecialModelName {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Tag
*/
public class Tag {
public class Tag {
@SerializedName("id")
private Long id = null;
@@ -118,5 +117,6 @@ public class Tag {
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -30,12 +30,11 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* User
*/
public class User {
public class User {
@SerializedName("id")
private Long id = null;
@@ -256,5 +255,6 @@ public class User {
}
return o.toString().replace("\n", "\n ");
}
}