forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 2.3.0
This commit is contained in:
@@ -10,6 +10,7 @@ import java.math.BigDecimal;
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
import io.swagger.client.model.OuterComposite;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -17,6 +18,102 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface FakeApi {
|
||||
/**
|
||||
*
|
||||
* Sync method
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @return Boolean
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/boolean")
|
||||
Boolean fakeOuterBooleanSerialize(
|
||||
@retrofit.http.Body Boolean body
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
* Async method
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @param cb callback method
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/boolean")
|
||||
void fakeOuterBooleanSerialize(
|
||||
@retrofit.http.Body Boolean body, Callback<Boolean> cb
|
||||
);
|
||||
/**
|
||||
*
|
||||
* Sync method
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @return OuterComposite
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/composite")
|
||||
OuterComposite fakeOuterCompositeSerialize(
|
||||
@retrofit.http.Body OuterComposite body
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
* Async method
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param cb callback method
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/composite")
|
||||
void fakeOuterCompositeSerialize(
|
||||
@retrofit.http.Body OuterComposite body, Callback<OuterComposite> cb
|
||||
);
|
||||
/**
|
||||
*
|
||||
* Sync method
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @return BigDecimal
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/number")
|
||||
BigDecimal fakeOuterNumberSerialize(
|
||||
@retrofit.http.Body BigDecimal body
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
* Async method
|
||||
* @param body Input number as post body (optional)
|
||||
* @param cb callback method
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/number")
|
||||
void fakeOuterNumberSerialize(
|
||||
@retrofit.http.Body BigDecimal body, Callback<BigDecimal> cb
|
||||
);
|
||||
/**
|
||||
*
|
||||
* Sync method
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @return String
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/string")
|
||||
String fakeOuterStringSerialize(
|
||||
@retrofit.http.Body String body
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
* Async method
|
||||
* @param body Input string as post body (optional)
|
||||
* @param cb callback method
|
||||
*/
|
||||
|
||||
@POST("/fake/outer/string")
|
||||
void fakeOuterStringSerialize(
|
||||
@retrofit.http.Body String body, Callback<String> cb
|
||||
);
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* Sync method
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* 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.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
|
||||
public class OuterComposite {
|
||||
@SerializedName("my_number")
|
||||
private BigDecimal myNumber = null;
|
||||
|
||||
@SerializedName("my_string")
|
||||
private String myString = null;
|
||||
|
||||
@SerializedName("my_boolean")
|
||||
private Boolean myBoolean = null;
|
||||
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
this.myNumber = myNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get myNumber
|
||||
* @return myNumber
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public BigDecimal getMyNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
|
||||
public void setMyNumber(BigDecimal myNumber) {
|
||||
this.myNumber = myNumber;
|
||||
}
|
||||
|
||||
public OuterComposite myString(String myString) {
|
||||
this.myString = myString;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get myString
|
||||
* @return myString
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getMyString() {
|
||||
return myString;
|
||||
}
|
||||
|
||||
public void setMyString(String myString) {
|
||||
this.myString = myString;
|
||||
}
|
||||
|
||||
public OuterComposite myBoolean(Boolean myBoolean) {
|
||||
this.myBoolean = myBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get myBoolean
|
||||
* @return myBoolean
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getMyBoolean() {
|
||||
return myBoolean;
|
||||
}
|
||||
|
||||
public void setMyBoolean(Boolean myBoolean) {
|
||||
this.myBoolean = myBoolean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
OuterComposite outerComposite = (OuterComposite) o;
|
||||
return Objects.equals(this.myNumber, outerComposite.myNumber) &&
|
||||
Objects.equals(this.myString, outerComposite.myString) &&
|
||||
Objects.equals(this.myBoolean, outerComposite.myBoolean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(myNumber, myString, myBoolean);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class OuterComposite {\n");
|
||||
|
||||
sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n");
|
||||
sb.append(" myString: ").append(toIndentedString(myString)).append("\n");
|
||||
sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user