This commit is contained in:
wing328 2016-10-02 17:24:37 +08:00
commit a6287bed1d
32 changed files with 111 additions and 96 deletions

View File

@ -107,7 +107,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
instantiationTypes.put("map", "HashMap");
typeMapping.put("date", "Date");
typeMapping.put("file", "File");
typeMapping.put("UUID", "String");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));
@ -795,10 +794,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
CodegenOperation op = super.fromOperation(path, httpMethod, operation, definitions, swagger);
op.path = sanitizePath(op.path);
return op;
}
private static CodegenModel reconcileInlineEnums(CodegenModel codegenModel, CodegenModel parentCodegenModel) {
// This generator uses inline classes to define enums, which breaks when
// dealing with models that have subTypes. To clean this up, we will analyze

View File

@ -43,7 +43,7 @@ class ApiException extends Exception
/**
* The HTTP header of the server response.
*
* @var string[]
* @var string[]|null
*/
protected $responseHeaders;
@ -57,12 +57,12 @@ class ApiException extends Exception
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string $responseHeaders HTTP response header
* @param mixed $responseBody HTTP body of the server response either as Json or string
* @param string $message Error message
* @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header
* @param mixed $responseBody HTTP body of the server response either as Json or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = null, $responseBody = null)
public function __construct($message = "", $code = 0, array $responseHeaders = null, $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
@ -72,7 +72,7 @@ class ApiException extends Exception
/**
* Gets the HTTP response header
*
* @return string HTTP response header
* @return string[]|null HTTP response header
*/
public function getResponseHeaders()
{

View File

@ -33,10 +33,10 @@ public class {{classname}}: JSONEncodable {
public init() {}
{{/unwrapRequired}}
{{#unwrapRequired}}
public init({{#requiredVars}}{{^-first}}, {{/-first}}{{name}}: {{#isEnum}}{{datatypeWithEnum}}{{/isEnum}}{{^isEnum}}{{datatype}}{{/isEnum}}{{/requiredVars}}) {
{{#requiredVars}}
public init({{#allVars}}{{^-first}}, {{/-first}}{{name}}: {{#isEnum}}{{datatypeWithEnum}}{{/isEnum}}{{^isEnum}}{{datatype}}{{/isEnum}}{{^required}}?=nil{{/required}}{{/allVars}}) {
{{#allVars}}
self.{{name}} = {{name}}
{{/requiredVars}}
{{/allVars}}
}
{{/unwrapRequired}}

View File

@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -74,7 +75,7 @@ public class FormatTest {
private DateTime dateTime = null;
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("password")
private String password = null;
@ -287,7 +288,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -297,11 +298,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -34,6 +34,7 @@ import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
@ -43,7 +44,7 @@ import org.joda.time.DateTime;
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("dateTime")
private DateTime dateTime = null;
@ -51,7 +52,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -61,11 +62,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

View File

@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -74,7 +75,7 @@ public class FormatTest {
private DateTime dateTime = null;
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("password")
private String password = null;
@ -287,7 +288,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -297,11 +298,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -34,6 +34,7 @@ import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
@ -43,7 +44,7 @@ import org.joda.time.DateTime;
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("dateTime")
private DateTime dateTime = null;
@ -51,7 +52,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -61,11 +62,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

View File

@ -33,6 +33,7 @@ import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.UUID;
/**
@ -74,7 +75,7 @@ public class FormatTest {
private OffsetDateTime dateTime = null;
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("password")
private String password = null;
@ -287,7 +288,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -297,11 +298,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -35,6 +35,7 @@ import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
@ -43,7 +44,7 @@ import java.util.Map;
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("dateTime")
private OffsetDateTime dateTime = null;
@ -51,7 +52,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -61,11 +62,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

View File

@ -31,6 +31,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -74,7 +75,7 @@ public class FormatTest {
private DateTime dateTime = null;
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("password")
private String password = null;
@ -287,7 +288,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -297,11 +298,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -34,6 +34,7 @@ import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
@ -43,7 +44,7 @@ import org.joda.time.DateTime;
public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid")
private String uuid = null;
private UUID uuid = null;
@JsonProperty("dateTime")
private DateTime dateTime = null;
@ -51,7 +52,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -61,11 +62,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

View File

@ -30,6 +30,7 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -73,7 +74,7 @@ public class FormatTest {
private DateTime dateTime = null;
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("password")
private String password = null;
@ -286,7 +287,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -296,11 +297,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -33,6 +33,7 @@ import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
@ -42,7 +43,7 @@ import org.joda.time.DateTime;
public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("dateTime")
private DateTime dateTime = null;
@ -50,7 +51,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -60,11 +61,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -30,6 +30,7 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -73,7 +74,7 @@ public class FormatTest {
private DateTime dateTime = null;
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("password")
private String password = null;
@ -286,7 +287,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -296,11 +297,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -33,6 +33,7 @@ import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
@ -42,7 +43,7 @@ import org.joda.time.DateTime;
public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("dateTime")
private DateTime dateTime = null;
@ -50,7 +51,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -60,11 +61,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

View File

@ -30,6 +30,7 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -73,7 +74,7 @@ public class FormatTest {
private DateTime dateTime = null;
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("password")
private String password = null;
@ -286,7 +287,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -296,11 +297,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -33,6 +33,7 @@ import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
@ -42,7 +43,7 @@ import org.joda.time.DateTime;
public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("dateTime")
private DateTime dateTime = null;
@ -50,7 +51,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -60,11 +61,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |

View File

@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

View File

@ -30,6 +30,7 @@ import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
@ -73,7 +74,7 @@ public class FormatTest {
private DateTime dateTime = null;
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("password")
private String password = null;
@ -286,7 +287,7 @@ public class FormatTest {
this.dateTime = dateTime;
}
public FormatTest uuid(String uuid) {
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -296,11 +297,11 @@ public class FormatTest {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -33,6 +33,7 @@ import io.swagger.client.model.Animal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
@ -42,7 +43,7 @@ import org.joda.time.DateTime;
public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("uuid")
private String uuid = null;
private UUID uuid = null;
@SerializedName("dateTime")
private DateTime dateTime = null;
@ -50,7 +51,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName("map")
private Map<String, Animal> map = new HashMap<String, Animal>();
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
@ -60,11 +61,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* @return uuid
**/
@ApiModelProperty(example = "null", value = "")
public String getUuid() {
public UUID getUuid() {
return uuid;
}
public void setUuid(String uuid) {
public void setUuid(UUID uuid) {
this.uuid = uuid;
}

View File

@ -64,7 +64,7 @@ class ApiException extends Exception
/**
* The HTTP header of the server response.
*
* @var string[]
* @var string[]|null
*/
protected $responseHeaders;
@ -78,12 +78,12 @@ class ApiException extends Exception
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string $responseHeaders HTTP response header
* @param mixed $responseBody HTTP body of the server response either as Json or string
* @param string $message Error message
* @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header
* @param mixed $responseBody HTTP body of the server response either as Json or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = null, $responseBody = null)
public function __construct($message = "", $code = 0, array $responseHeaders = null, $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
@ -93,7 +93,7 @@ class ApiException extends Exception
/**
* Gets the HTTP response header
*
* @return string HTTP response header
* @return string[]|null HTTP response header
*/
public function getResponseHeaders()
{