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

@@ -0,0 +1,119 @@
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;
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;
}
@ApiModelProperty(value = "")
@JsonProperty("my_number")
public BigDecimal getMyNumber() {
return myNumber;
}
public void setMyNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
}
/**
**/
public OuterComposite myString(String myString) {
this.myString = myString;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("my_string")
public String getMyString() {
return myString;
}
public void setMyString(String myString) {
this.myString = myString;
}
/**
**/
public OuterComposite myBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("my_boolean")
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(myNumber, outerComposite.myNumber) &&
Objects.equals(myString, outerComposite.myString) &&
Objects.equals(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

@@ -13,6 +13,7 @@ import io.swagger.model.*;
import java.math.BigDecimal;
import io.swagger.model.Client;
import java.util.Date;
import io.swagger.model.OuterComposite;
public class FakeController {
@@ -22,6 +23,30 @@ public class FakeController {
* Code allows you to implement logic incrementally, they are disabled.
**/
/*
public ResponseContext fakeOuterBooleanSerialize(RequestContext request , Boolean body) {
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
}
*/
/*
public ResponseContext fakeOuterCompositeSerialize(RequestContext request , OuterComposite body) {
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
}
*/
/*
public ResponseContext fakeOuterNumberSerialize(RequestContext request , BigDecimal body) {
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
}
*/
/*
public ResponseContext fakeOuterStringSerialize(RequestContext request , String body) {
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );
}
*/
/*
public ResponseContext testClientModel(RequestContext request , Client body) {
return new ResponseContext().status(Status.INTERNAL_SERVER_ERROR).entity( "Not implemented" );

View File

@@ -868,6 +868,86 @@ paths:
$ref: "#/definitions/Client"
x-contentType: "application/json"
x-accepts: "application/json"
/fake/outer/number:
post:
tags:
- "fake"
description: "Test serialization of outer number types"
operationId: "fakeOuterNumberSerialize"
parameters:
- in: "body"
name: "body"
description: "Input number as post body"
required: false
schema:
$ref: "#/definitions/OuterNumber"
responses:
200:
description: "Output number"
schema:
$ref: "#/definitions/OuterNumber"
x-contentType: "application/json"
x-accepts: "application/json"
/fake/outer/string:
post:
tags:
- "fake"
description: "Test serialization of outer string types"
operationId: "fakeOuterStringSerialize"
parameters:
- in: "body"
name: "body"
description: "Input string as post body"
required: false
schema:
$ref: "#/definitions/OuterString"
responses:
200:
description: "Output string"
schema:
$ref: "#/definitions/OuterString"
x-contentType: "application/json"
x-accepts: "application/json"
/fake/outer/boolean:
post:
tags:
- "fake"
description: "Test serialization of outer boolean types"
operationId: "fakeOuterBooleanSerialize"
parameters:
- in: "body"
name: "body"
description: "Input boolean as post body"
required: false
schema:
$ref: "#/definitions/OuterBoolean"
responses:
200:
description: "Output boolean"
schema:
$ref: "#/definitions/OuterBoolean"
x-contentType: "application/json"
x-accepts: "application/json"
/fake/outer/composite:
post:
tags:
- "fake"
description: "Test serialization of object with outer number type"
operationId: "fakeOuterCompositeSerialize"
parameters:
- in: "body"
name: "body"
description: "Input composite as post body"
required: false
schema:
$ref: "#/definitions/OuterComposite"
responses:
200:
description: "Output composite"
schema:
$ref: "#/definitions/OuterComposite"
x-contentType: "application/json"
x-accepts: "application/json"
securityDefinitions:
petstore_auth:
type: "oauth2"
@@ -1315,6 +1395,21 @@ definitions:
- "placed"
- "approved"
- "delivered"
OuterNumber:
type: "number"
OuterString:
type: "string"
OuterBoolean:
type: "boolean"
OuterComposite:
type: "object"
properties:
my_number:
$ref: "#/definitions/OuterNumber"
my_string:
$ref: "#/definitions/OuterString"
my_boolean:
$ref: "#/definitions/OuterBoolean"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"