Merge remote-tracking branch 'origin/master' into 2.3.0

This commit is contained in:
wing328
2017-05-17 22:00:06 +08:00
681 changed files with 31245 additions and 3547 deletions

View File

@@ -10,6 +10,7 @@ import io.swagger.jaxrs.*;
import java.math.BigDecimal;
import io.swagger.model.Client;
import java.util.Date;
import io.swagger.model.OuterComposite;
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -32,6 +33,54 @@ import javax.ws.rs.*;
public class FakeApi {
private final FakeApiService delegate = FakeApiServiceFactory.getFakeApi();
@POST
@Path("/outer/boolean")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) Boolean body
)
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body);
}
@POST
@Path("/outer/composite")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) OuterComposite body
)
throws NotFoundException {
return delegate.fakeOuterCompositeSerialize(body);
}
@POST
@Path("/outer/number")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) BigDecimal body
)
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body);
}
@POST
@Path("/outer/string")
@io.swagger.annotations.ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "Output string", response = String.class) })
public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) String body
)
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body);
}
@PATCH
@Consumes({ "application/json" })

View File

@@ -9,6 +9,7 @@ import org.wso2.msf4j.formparam.FileInfo;
import java.math.BigDecimal;
import io.swagger.model.Client;
import java.util.Date;
import io.swagger.model.OuterComposite;
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -20,6 +21,14 @@ import javax.ws.rs.core.SecurityContext;
public abstract class FakeApiService {
public abstract Response fakeOuterBooleanSerialize(Boolean body
) throws NotFoundException;
public abstract Response fakeOuterCompositeSerialize(OuterComposite body
) throws NotFoundException;
public abstract Response fakeOuterNumberSerialize(BigDecimal body
) throws NotFoundException;
public abstract Response fakeOuterStringSerialize(String body
) throws NotFoundException;
public abstract Response testClientModel(Client body
) throws NotFoundException;
public abstract Response testEndpointParameters(BigDecimal number

View File

@@ -0,0 +1,121 @@
package io.swagger.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
/**
* OuterComposite
*/
public class OuterComposite {
@JsonProperty("my_number")
private BigDecimal myNumber = null;
@JsonProperty("my_string")
private String myString = null;
@JsonProperty("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 ");
}
}

View File

@@ -6,6 +6,7 @@ import io.swagger.model.*;
import java.math.BigDecimal;
import io.swagger.model.Client;
import java.util.Date;
import io.swagger.model.OuterComposite;
import java.util.List;
import io.swagger.api.NotFoundException;
@@ -20,6 +21,30 @@ import javax.ws.rs.core.SecurityContext;
public class FakeApiServiceImpl extends FakeApiService {
@Override
public Response fakeOuterBooleanSerialize(Boolean body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response fakeOuterCompositeSerialize(OuterComposite body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response fakeOuterNumberSerialize(BigDecimal body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response fakeOuterStringSerialize(String body
) throws NotFoundException {
// do some magic!
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
}
@Override
public Response testClientModel(Client body
) throws NotFoundException {