forked from loafle/openapi-generator-original
Merge branch 'arnested-php-generated-codestyle'
This commit is contained in:
commit
935d6d35d1
@ -3,6 +3,7 @@ package io.swagger.codegen.languages;
|
|||||||
import io.swagger.codegen.CliOption;
|
import io.swagger.codegen.CliOption;
|
||||||
import io.swagger.codegen.CodegenConfig;
|
import io.swagger.codegen.CodegenConfig;
|
||||||
import io.swagger.codegen.CodegenConstants;
|
import io.swagger.codegen.CodegenConstants;
|
||||||
|
import io.swagger.codegen.CodegenOperation;
|
||||||
import io.swagger.codegen.CodegenParameter;
|
import io.swagger.codegen.CodegenParameter;
|
||||||
import io.swagger.codegen.CodegenProperty;
|
import io.swagger.codegen.CodegenProperty;
|
||||||
import io.swagger.codegen.CodegenType;
|
import io.swagger.codegen.CodegenType;
|
||||||
@ -13,6 +14,7 @@ import io.swagger.models.properties.*;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
@ -626,4 +628,14 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
// process enum in models
|
// process enum in models
|
||||||
return postProcessModelsEnum(objs);
|
return postProcessModelsEnum(objs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> postProcessOperations(Map<String, Object> objs) {
|
||||||
|
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
|
||||||
|
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
|
||||||
|
for (CodegenOperation op : operationList) {
|
||||||
|
op.vendorExtensions.put("x-testOperationId", camelize(op.operationId));
|
||||||
|
}
|
||||||
|
return objs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ class ApiClient
|
|||||||
// Handle the response
|
// Handle the response
|
||||||
if ($response_info['http_code'] == 0) {
|
if ($response_info['http_code'] == 0) {
|
||||||
throw new ApiException("API call to $url timed out: ".serialize($response_info), 0, null, null);
|
throw new ApiException("API call to $url timed out: ".serialize($response_info), 0, null, null);
|
||||||
} elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299 ) {
|
} elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299) {
|
||||||
// return raw body if response is a file
|
// return raw body if response is a file
|
||||||
if ($responseType == '\SplFileObject' || $responseType == 'string') {
|
if ($responseType == '\SplFileObject' || $responseType == 'string') {
|
||||||
return array($http_body, $response_info['http_code'], $http_header);
|
return array($http_body, $response_info['http_code'], $http_header);
|
||||||
@ -255,7 +255,9 @@ class ApiClient
|
|||||||
|
|
||||||
throw new ApiException(
|
throw new ApiException(
|
||||||
"[".$response_info['http_code']."] Error connecting to the API ($url)",
|
"[".$response_info['http_code']."] Error connecting to the API ($url)",
|
||||||
$response_info['http_code'], $http_header, $data
|
$response_info['http_code'],
|
||||||
|
$http_header,
|
||||||
|
$data
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return array($data, $response_info['http_code'], $http_header);
|
return array($data, $response_info['http_code'], $http_header);
|
||||||
@ -310,31 +312,26 @@ class ApiClient
|
|||||||
$headers = array();
|
$headers = array();
|
||||||
$key = '';
|
$key = '';
|
||||||
|
|
||||||
foreach(explode("\n", $raw_headers) as $h)
|
foreach (explode("\n", $raw_headers) as $h) {
|
||||||
{
|
|
||||||
$h = explode(':', $h, 2);
|
$h = explode(':', $h, 2);
|
||||||
|
|
||||||
if (isset($h[1]))
|
if (isset($h[1])) {
|
||||||
{
|
if (!isset($headers[$h[0]])) {
|
||||||
if (!isset($headers[$h[0]]))
|
|
||||||
$headers[$h[0]] = trim($h[1]);
|
$headers[$h[0]] = trim($h[1]);
|
||||||
elseif (is_array($headers[$h[0]]))
|
} elseif (is_array($headers[$h[0]])) {
|
||||||
{
|
|
||||||
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
|
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
|
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
|
||||||
}
|
}
|
||||||
|
|
||||||
$key = $h[0];
|
$key = $h[0];
|
||||||
}
|
} else {
|
||||||
else
|
if (substr($h[0], 0, 1) == "\t") {
|
||||||
{
|
|
||||||
if (substr($h[0], 0, 1) == "\t")
|
|
||||||
$headers[$key] .= "\r\n\t".trim($h[0]);
|
$headers[$key] .= "\r\n\t".trim($h[0]);
|
||||||
elseif (!$key)
|
} elseif (!$key) {
|
||||||
$headers[0] = trim($h[0]);trim($h[0]);
|
$headers[0] = trim($h[0]);
|
||||||
|
}
|
||||||
|
trim($h[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class ApiException extends Exception
|
|||||||
* @param string $responseHeaders HTTP response header
|
* @param string $responseHeaders HTTP response header
|
||||||
* @param mixed $responseBody HTTP body of the server response either as Json or string
|
* @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, $responseHeaders = null, $responseBody = null)
|
||||||
{
|
{
|
||||||
parent::__construct($message, $code);
|
parent::__construct($message, $code);
|
||||||
$this->responseHeaders = $responseHeaders;
|
$this->responseHeaders = $responseHeaders;
|
||||||
|
@ -185,7 +185,7 @@ class ObjectSerializer
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti=false)
|
public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false)
|
||||||
{
|
{
|
||||||
if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) {
|
if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) {
|
||||||
// http_build_query() almost does the job for us. We just
|
// http_build_query() almost does the job for us. We just
|
||||||
@ -219,7 +219,7 @@ class ObjectSerializer
|
|||||||
*
|
*
|
||||||
* @return object an instance of $class
|
* @return object an instance of $class
|
||||||
*/
|
*/
|
||||||
public static function deserialize($data, $class, $httpHeaders=null, $discriminator=null)
|
public static function deserialize($data, $class, $httpHeaders = null, $discriminator = null)
|
||||||
{
|
{
|
||||||
if (null === $data) {
|
if (null === $data) {
|
||||||
return null;
|
return null;
|
||||||
@ -261,7 +261,8 @@ class ObjectSerializer
|
|||||||
return $data;
|
return $data;
|
||||||
} elseif ($class === '\SplFileObject') {
|
} elseif ($class === '\SplFileObject') {
|
||||||
// determine file name
|
// determine file name
|
||||||
if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
|
if (array_key_exists('Content-Disposition', $httpHeaders) &&
|
||||||
|
preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
|
||||||
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]);
|
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]);
|
||||||
} else {
|
} else {
|
||||||
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
|
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
|
||||||
@ -274,7 +275,6 @@ class ObjectSerializer
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $deserialized;
|
return $deserialized;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// If a discriminator is defined and points to a valid subclass, use it.
|
// If a discriminator is defined and points to a valid subclass, use it.
|
||||||
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
|
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
|
||||||
|
@ -62,7 +62,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
*
|
*
|
||||||
* @param \{{invokerPackage}}\ApiClient|null $apiClient The api client to use
|
* @param \{{invokerPackage}}\ApiClient|null $apiClient The api client to use
|
||||||
*/
|
*/
|
||||||
function __construct(\{{invokerPackage}}\ApiClient $apiClient = null)
|
public function __construct(\{{invokerPackage}}\ApiClient $apiClient = null)
|
||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
@ -99,7 +99,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
/**
|
/**
|
||||||
* Operation {{{operationId}}}
|
* Operation {{{operationId}}}
|
||||||
*
|
*
|
||||||
* {{{summary}}}
|
* {{{summary}}}.
|
||||||
*
|
*
|
||||||
{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
{{/allParams}} *
|
{{/allParams}} *
|
||||||
@ -116,7 +116,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
/**
|
/**
|
||||||
* Operation {{{operationId}}}WithHttpInfo
|
* Operation {{{operationId}}}WithHttpInfo
|
||||||
*
|
*
|
||||||
* {{{summary}}}
|
* {{{summary}}}.
|
||||||
*
|
*
|
||||||
{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
{{/allParams}} *
|
{{/allParams}} *
|
||||||
@ -251,9 +251,12 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, '{{httpMethod}}',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'{{httpMethod}}',
|
||||||
$headerParams{{#returnType}}, '{{returnType}}'{{/returnType}}
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams{{#returnType}},
|
||||||
|
'{{returnType}}'{{/returnType}}
|
||||||
);
|
);
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
@ -261,15 +264,20 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
}
|
}
|
||||||
|
|
||||||
return array($this->apiClient->getSerializer()->deserialize($response, '{{returnType}}', $httpHeader{{#discriminator}}, '{{discriminator}}'{{/discriminator}}), $statusCode, $httpHeader);
|
return array($this->apiClient->getSerializer()->deserialize($response, '{{returnType}}', $httpHeader{{#discriminator}}, '{{discriminator}}'{{/discriminator}}), $statusCode, $httpHeader);
|
||||||
{{/returnType}}{{^returnType}}
|
{{/returnType}}
|
||||||
|
{{^returnType}}
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) { {{#responses}}{{#dataType}}
|
switch ($e->getCode()) {
|
||||||
|
{{#responses}}
|
||||||
|
{{#dataType}}
|
||||||
{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}}
|
{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}}
|
||||||
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '{{dataType}}', $e->getResponseHeaders());
|
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '{{dataType}}', $e->getResponseHeaders());
|
||||||
$e->setResponseObject($data);
|
$e->setResponseObject($data);
|
||||||
break;{{/dataType}}{{/responses}}
|
break;
|
||||||
|
{{/dataType}}
|
||||||
|
{{/responses}}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw $e;
|
throw $e;
|
||||||
|
@ -70,10 +70,10 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
/**
|
/**
|
||||||
* Test case for {{{operationId}}}
|
* Test case for {{{operationId}}}
|
||||||
*
|
*
|
||||||
* {{{summary}}}
|
* {{{summary}}}.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_{{operationId}}()
|
public function test{{vendorExtensions.x-testOperationId}}()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ namespace {{invokerPackage}};
|
|||||||
class Configuration
|
class Configuration
|
||||||
{
|
{
|
||||||
|
|
||||||
private static $_defaultConfiguration = null;
|
private static $defaultConfiguration = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate array to store API key(s)
|
* Associate array to store API key(s)
|
||||||
@ -487,11 +487,11 @@ class Configuration
|
|||||||
*/
|
*/
|
||||||
public static function getDefaultConfiguration()
|
public static function getDefaultConfiguration()
|
||||||
{
|
{
|
||||||
if (self::$_defaultConfiguration == null) {
|
if (self::$defaultConfiguration == null) {
|
||||||
self::$_defaultConfiguration = new Configuration();
|
self::$defaultConfiguration = new Configuration();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$_defaultConfiguration;
|
return self::$defaultConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -503,7 +503,7 @@ class Configuration
|
|||||||
*/
|
*/
|
||||||
public static function setDefaultConfiguration(Configuration $config)
|
public static function setDefaultConfiguration(Configuration $config)
|
||||||
{
|
{
|
||||||
self::$_defaultConfiguration = $config;
|
self::$defaultConfiguration = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -522,5 +522,4 @@ class Configuration
|
|||||||
|
|
||||||
return $report;
|
return $report;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,9 @@ use \ArrayAccess;
|
|||||||
* {{classname}} Class Doc Comment
|
* {{classname}} Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
|
{{#description}}
|
||||||
* @description {{description}}
|
* @description {{description}}
|
||||||
|
{{/description}}
|
||||||
* @package {{invokerPackage}}
|
* @package {{invokerPackage}}
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -53,18 +55,19 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = '{{name}}';
|
protected static $swaggerModelName = '{{name}}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
{{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}},
|
{{#vars}}'{{name}}' => '{{{datatype}}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes{{#parentSchema}} + parent::swaggerTypes(){{/parentSchema}};
|
return self::$swaggerTypes{{#parentSchema}} + parent::swaggerTypes(){{/parentSchema}};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,12 +75,13 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
{{#vars}}'{{name}}' => '{{baseName}}'{{#hasMore}},
|
{{#vars}}'{{name}}' => '{{baseName}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return {{#parentSchema}}parent::attributeMap() + {{/parentSchema}}self::$attributeMap;
|
return {{#parentSchema}}parent::attributeMap() + {{/parentSchema}}self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,12 +89,13 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
{{#vars}}'{{name}}' => '{{setter}}'{{#hasMore}},
|
{{#vars}}'{{name}}' => '{{setter}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return {{#parentSchema}}parent::setters() + {{/parentSchema}}self::$setters;
|
return {{#parentSchema}}parent::setters() + {{/parentSchema}}self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,12 +103,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
{{#vars}}'{{name}}' => '{{getter}}'{{#hasMore}},
|
{{#vars}}'{{name}}' => '{{getter}}'{{#hasMore}},
|
||||||
{{/hasMore}}{{/vars}}
|
{{/hasMore}}{{/vars}}
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return {{#parentSchema}}parent::getters() + {{/parentSchema}}self::$getters;
|
return {{#parentSchema}}parent::getters() + {{/parentSchema}}self::$getters;
|
||||||
}
|
}
|
||||||
@ -267,7 +272,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets {{name}}
|
* Sets {{name}}
|
||||||
* @param {{datatype}} ${{name}} {{#description}}{{{description}}}{{/description}}
|
* @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function {{setter}}(${{name}})
|
public function {{setter}}(${{name}})
|
||||||
|
@ -39,7 +39,7 @@ namespace {{modelPackage}};
|
|||||||
* {{classname}}Test Class Doc Comment
|
* {{classname}}Test Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description {{description}}
|
* @description {{#description}}{{description}}{{/description}}{{^description}}{{classname}}{{/description}}
|
||||||
* @package {{invokerPackage}}
|
* @package {{invokerPackage}}
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -65,13 +65,12 @@ class {{classname}}Test extends \PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test {{classname}}
|
* Test "{{classname}}"
|
||||||
*/
|
*/
|
||||||
public function test{{classname}}()
|
public function test{{classname}}()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
{{/model}}
|
{{/model}}
|
||||||
{{/models}}
|
{{/models}}
|
||||||
|
@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Package version:
|
- Package version:
|
||||||
- Build date: 2016-05-14T17:06:01.056+08:00
|
- Build date: 2016-05-14T13:02:51.476+02:00
|
||||||
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
|
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@ -134,12 +134,6 @@ Class | Method | HTTP request | Description
|
|||||||
## Documentation For Authorization
|
## Documentation For Authorization
|
||||||
|
|
||||||
|
|
||||||
## api_key
|
|
||||||
|
|
||||||
- **Type**: API key
|
|
||||||
- **API key parameter name**: api_key
|
|
||||||
- **Location**: HTTP header
|
|
||||||
|
|
||||||
## petstore_auth
|
## petstore_auth
|
||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
@ -149,6 +143,12 @@ Class | Method | HTTP request | Description
|
|||||||
- **write:pets**: modify pets in your account
|
- **write:pets**: modify pets in your account
|
||||||
- **read:pets**: read your pets
|
- **read:pets**: read your pets
|
||||||
|
|
||||||
|
## api_key
|
||||||
|
|
||||||
|
- **Type**: API key
|
||||||
|
- **API key parameter name**: api_key
|
||||||
|
- **Location**: HTTP header
|
||||||
|
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class FakeApi
|
|||||||
*
|
*
|
||||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||||
*/
|
*/
|
||||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
public function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
@ -98,7 +98,7 @@ class FakeApi
|
|||||||
/**
|
/**
|
||||||
* Operation testEndpointParameters
|
* Operation testEndpointParameters
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 .
|
||||||
*
|
*
|
||||||
* @param float $number None (required)
|
* @param float $number None (required)
|
||||||
* @param double $double None (required)
|
* @param double $double None (required)
|
||||||
@ -126,7 +126,7 @@ class FakeApi
|
|||||||
/**
|
/**
|
||||||
* Operation testEndpointParametersWithHttpInfo
|
* Operation testEndpointParametersWithHttpInfo
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 .
|
||||||
*
|
*
|
||||||
* @param float $number None (required)
|
* @param float $number None (required)
|
||||||
* @param double $double None (required)
|
* @param double $double None (required)
|
||||||
@ -276,11 +276,12 @@ class FakeApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
|
@ -62,7 +62,7 @@ class PetApi
|
|||||||
*
|
*
|
||||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||||
*/
|
*/
|
||||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
public function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
@ -98,7 +98,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation addPet
|
* Operation addPet
|
||||||
*
|
*
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
*
|
||||||
@ -115,7 +115,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation addPetWithHttpInfo
|
* Operation addPetWithHttpInfo
|
||||||
*
|
*
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
*
|
||||||
@ -169,11 +169,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -185,7 +186,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation deletePet
|
* Operation deletePet
|
||||||
*
|
*
|
||||||
* Deletes a pet
|
* Deletes a pet.
|
||||||
*
|
*
|
||||||
* @param int $pet_id Pet id to delete (required)
|
* @param int $pet_id Pet id to delete (required)
|
||||||
* @param string $api_key (optional)
|
* @param string $api_key (optional)
|
||||||
@ -203,7 +204,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation deletePetWithHttpInfo
|
* Operation deletePetWithHttpInfo
|
||||||
*
|
*
|
||||||
* Deletes a pet
|
* Deletes a pet.
|
||||||
*
|
*
|
||||||
* @param int $pet_id Pet id to delete (required)
|
* @param int $pet_id Pet id to delete (required)
|
||||||
* @param string $api_key (optional)
|
* @param string $api_key (optional)
|
||||||
@ -264,11 +265,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'DELETE',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'DELETE',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -280,7 +282,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation findPetsByStatus
|
* Operation findPetsByStatus
|
||||||
*
|
*
|
||||||
* Finds Pets by status
|
* Finds Pets by status.
|
||||||
*
|
*
|
||||||
* @param string[] $status Status values that need to be considered for filter (required)
|
* @param string[] $status Status values that need to be considered for filter (required)
|
||||||
*
|
*
|
||||||
@ -297,7 +299,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation findPetsByStatusWithHttpInfo
|
* Operation findPetsByStatusWithHttpInfo
|
||||||
*
|
*
|
||||||
* Finds Pets by status
|
* Finds Pets by status.
|
||||||
*
|
*
|
||||||
* @param string[] $status Status values that need to be considered for filter (required)
|
* @param string[] $status Status values that need to be considered for filter (required)
|
||||||
*
|
*
|
||||||
@ -353,9 +355,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
$headerParams, '\Swagger\Client\Model\Pet[]'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'\Swagger\Client\Model\Pet[]'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
@ -376,7 +381,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation findPetsByTags
|
* Operation findPetsByTags
|
||||||
*
|
*
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags.
|
||||||
*
|
*
|
||||||
* @param string[] $tags Tags to filter by (required)
|
* @param string[] $tags Tags to filter by (required)
|
||||||
*
|
*
|
||||||
@ -393,7 +398,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation findPetsByTagsWithHttpInfo
|
* Operation findPetsByTagsWithHttpInfo
|
||||||
*
|
*
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags.
|
||||||
*
|
*
|
||||||
* @param string[] $tags Tags to filter by (required)
|
* @param string[] $tags Tags to filter by (required)
|
||||||
*
|
*
|
||||||
@ -449,9 +454,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
$headerParams, '\Swagger\Client\Model\Pet[]'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'\Swagger\Client\Model\Pet[]'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
@ -472,7 +480,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation getPetById
|
* Operation getPetById
|
||||||
*
|
*
|
||||||
* Find pet by ID
|
* Find pet by ID.
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to return (required)
|
* @param int $pet_id ID of pet to return (required)
|
||||||
*
|
*
|
||||||
@ -489,7 +497,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation getPetByIdWithHttpInfo
|
* Operation getPetByIdWithHttpInfo
|
||||||
*
|
*
|
||||||
* Find pet by ID
|
* Find pet by ID.
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to return (required)
|
* @param int $pet_id ID of pet to return (required)
|
||||||
*
|
*
|
||||||
@ -548,9 +556,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
$headerParams, '\Swagger\Client\Model\Pet'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'\Swagger\Client\Model\Pet'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
@ -571,7 +582,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation updatePet
|
* Operation updatePet
|
||||||
*
|
*
|
||||||
* Update an existing pet
|
* Update an existing pet.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
*
|
||||||
@ -588,7 +599,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation updatePetWithHttpInfo
|
* Operation updatePetWithHttpInfo
|
||||||
*
|
*
|
||||||
* Update an existing pet
|
* Update an existing pet.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
*
|
||||||
@ -642,11 +653,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'PUT',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'PUT',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -658,7 +670,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation updatePetWithForm
|
* Operation updatePetWithForm
|
||||||
*
|
*
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data.
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet that needs to be updated (required)
|
* @param int $pet_id ID of pet that needs to be updated (required)
|
||||||
* @param string $name Updated name of the pet (optional)
|
* @param string $name Updated name of the pet (optional)
|
||||||
@ -677,7 +689,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation updatePetWithFormWithHttpInfo
|
* Operation updatePetWithFormWithHttpInfo
|
||||||
*
|
*
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data.
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet that needs to be updated (required)
|
* @param int $pet_id ID of pet that needs to be updated (required)
|
||||||
* @param string $name Updated name of the pet (optional)
|
* @param string $name Updated name of the pet (optional)
|
||||||
@ -742,11 +754,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -758,7 +771,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation uploadFile
|
* Operation uploadFile
|
||||||
*
|
*
|
||||||
* uploads an image
|
* uploads an image.
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to update (required)
|
* @param int $pet_id ID of pet to update (required)
|
||||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||||
@ -777,7 +790,7 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation uploadFileWithHttpInfo
|
* Operation uploadFileWithHttpInfo
|
||||||
*
|
*
|
||||||
* uploads an image
|
* uploads an image.
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to update (required)
|
* @param int $pet_id ID of pet to update (required)
|
||||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||||
@ -848,9 +861,12 @@ class PetApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
$headerParams, '\Swagger\Client\Model\ApiResponse'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'\Swagger\Client\Model\ApiResponse'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
|
@ -62,7 +62,7 @@ class StoreApi
|
|||||||
*
|
*
|
||||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||||
*/
|
*/
|
||||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
public function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
@ -98,7 +98,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation deleteOrder
|
* Operation deleteOrder
|
||||||
*
|
*
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID.
|
||||||
*
|
*
|
||||||
* @param string $order_id ID of the order that needs to be deleted (required)
|
* @param string $order_id ID of the order that needs to be deleted (required)
|
||||||
*
|
*
|
||||||
@ -115,7 +115,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation deleteOrderWithHttpInfo
|
* Operation deleteOrderWithHttpInfo
|
||||||
*
|
*
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID.
|
||||||
*
|
*
|
||||||
* @param string $order_id ID of the order that needs to be deleted (required)
|
* @param string $order_id ID of the order that needs to be deleted (required)
|
||||||
*
|
*
|
||||||
@ -171,11 +171,12 @@ class StoreApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'DELETE',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'DELETE',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -187,7 +188,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation getInventory
|
* Operation getInventory
|
||||||
*
|
*
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return map[string,int]
|
* @return map[string,int]
|
||||||
@ -203,7 +204,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation getInventoryWithHttpInfo
|
* Operation getInventoryWithHttpInfo
|
||||||
*
|
*
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return Array of map[string,int], HTTP status code, HTTP response headers (array of strings)
|
* @return Array of map[string,int], HTTP status code, HTTP response headers (array of strings)
|
||||||
@ -249,9 +250,12 @@ class StoreApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
$headerParams, 'map[string,int]'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'map[string,int]'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
@ -272,7 +276,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation getOrderById
|
* Operation getOrderById
|
||||||
*
|
*
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID.
|
||||||
*
|
*
|
||||||
* @param int $order_id ID of pet that needs to be fetched (required)
|
* @param int $order_id ID of pet that needs to be fetched (required)
|
||||||
*
|
*
|
||||||
@ -289,7 +293,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation getOrderByIdWithHttpInfo
|
* Operation getOrderByIdWithHttpInfo
|
||||||
*
|
*
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID.
|
||||||
*
|
*
|
||||||
* @param int $order_id ID of pet that needs to be fetched (required)
|
* @param int $order_id ID of pet that needs to be fetched (required)
|
||||||
*
|
*
|
||||||
@ -348,9 +352,12 @@ class StoreApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
$headerParams, '\Swagger\Client\Model\Order'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'\Swagger\Client\Model\Order'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
@ -371,7 +378,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation placeOrder
|
* Operation placeOrder
|
||||||
*
|
*
|
||||||
* Place an order for a pet
|
* Place an order for a pet.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
||||||
*
|
*
|
||||||
@ -388,7 +395,7 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation placeOrderWithHttpInfo
|
* Operation placeOrderWithHttpInfo
|
||||||
*
|
*
|
||||||
* Place an order for a pet
|
* Place an order for a pet.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
||||||
*
|
*
|
||||||
@ -437,9 +444,12 @@ class StoreApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
$headerParams, '\Swagger\Client\Model\Order'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'\Swagger\Client\Model\Order'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
|
@ -62,7 +62,7 @@ class UserApi
|
|||||||
*
|
*
|
||||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||||
*/
|
*/
|
||||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
public function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
@ -98,7 +98,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation createUser
|
* Operation createUser
|
||||||
*
|
*
|
||||||
* Create user
|
* Create user.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User $body Created user object (required)
|
* @param \Swagger\Client\Model\User $body Created user object (required)
|
||||||
*
|
*
|
||||||
@ -115,7 +115,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation createUserWithHttpInfo
|
* Operation createUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Create user
|
* Create user.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User $body Created user object (required)
|
* @param \Swagger\Client\Model\User $body Created user object (required)
|
||||||
*
|
*
|
||||||
@ -164,11 +164,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -180,7 +181,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation createUsersWithArrayInput
|
* Operation createUsersWithArrayInput
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
*
|
||||||
@ -197,7 +198,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation createUsersWithArrayInputWithHttpInfo
|
* Operation createUsersWithArrayInputWithHttpInfo
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
*
|
||||||
@ -246,11 +247,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -262,7 +264,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation createUsersWithListInput
|
* Operation createUsersWithListInput
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
*
|
||||||
@ -279,7 +281,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation createUsersWithListInputWithHttpInfo
|
* Operation createUsersWithListInputWithHttpInfo
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array.
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
*
|
||||||
@ -328,11 +330,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'POST',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'POST',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -344,7 +347,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation deleteUser
|
* Operation deleteUser
|
||||||
*
|
*
|
||||||
* Delete user
|
* Delete user.
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be deleted (required)
|
* @param string $username The name that needs to be deleted (required)
|
||||||
*
|
*
|
||||||
@ -361,7 +364,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation deleteUserWithHttpInfo
|
* Operation deleteUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Delete user
|
* Delete user.
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be deleted (required)
|
* @param string $username The name that needs to be deleted (required)
|
||||||
*
|
*
|
||||||
@ -413,11 +416,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'DELETE',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'DELETE',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -429,7 +433,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation getUserByName
|
* Operation getUserByName
|
||||||
*
|
*
|
||||||
* Get user by user name
|
* Get user by user name.
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
*
|
*
|
||||||
@ -446,7 +450,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation getUserByNameWithHttpInfo
|
* Operation getUserByNameWithHttpInfo
|
||||||
*
|
*
|
||||||
* Get user by user name
|
* Get user by user name.
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
*
|
*
|
||||||
@ -498,9 +502,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
$headerParams, '\Swagger\Client\Model\User'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'\Swagger\Client\Model\User'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
@ -521,7 +528,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation loginUser
|
* Operation loginUser
|
||||||
*
|
*
|
||||||
* Logs user into the system
|
* Logs user into the system.
|
||||||
*
|
*
|
||||||
* @param string $username The user name for login (required)
|
* @param string $username The user name for login (required)
|
||||||
* @param string $password The password for login in clear text (required)
|
* @param string $password The password for login in clear text (required)
|
||||||
@ -539,7 +546,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation loginUserWithHttpInfo
|
* Operation loginUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Logs user into the system
|
* Logs user into the system.
|
||||||
*
|
*
|
||||||
* @param string $username The user name for login (required)
|
* @param string $username The user name for login (required)
|
||||||
* @param string $password The password for login in clear text (required)
|
* @param string $password The password for login in clear text (required)
|
||||||
@ -596,9 +603,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
$headerParams, 'string'
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams,
|
||||||
|
'string'
|
||||||
);
|
);
|
||||||
if (!$response) {
|
if (!$response) {
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
@ -619,7 +629,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation logoutUser
|
* Operation logoutUser
|
||||||
*
|
*
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
@ -635,7 +645,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation logoutUserWithHttpInfo
|
* Operation logoutUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
@ -674,11 +684,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'GET',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'GET',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
@ -690,7 +701,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation updateUser
|
* Operation updateUser
|
||||||
*
|
*
|
||||||
* Updated user
|
* Updated user.
|
||||||
*
|
*
|
||||||
* @param string $username name that need to be deleted (required)
|
* @param string $username name that need to be deleted (required)
|
||||||
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
||||||
@ -708,7 +719,7 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation updateUserWithHttpInfo
|
* Operation updateUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Updated user
|
* Updated user.
|
||||||
*
|
*
|
||||||
* @param string $username name that need to be deleted (required)
|
* @param string $username name that need to be deleted (required)
|
||||||
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
||||||
@ -770,11 +781,12 @@ class UserApi
|
|||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath, 'PUT',
|
$resourcePath,
|
||||||
$queryParams, $httpBody,
|
'PUT',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(null, $statusCode, $httpHeader);
|
return array(null, $statusCode, $httpHeader);
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
|
@ -237,7 +237,7 @@ class ApiClient
|
|||||||
// Handle the response
|
// Handle the response
|
||||||
if ($response_info['http_code'] == 0) {
|
if ($response_info['http_code'] == 0) {
|
||||||
throw new ApiException("API call to $url timed out: ".serialize($response_info), 0, null, null);
|
throw new ApiException("API call to $url timed out: ".serialize($response_info), 0, null, null);
|
||||||
} elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299 ) {
|
} elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299) {
|
||||||
// return raw body if response is a file
|
// return raw body if response is a file
|
||||||
if ($responseType == '\SplFileObject' || $responseType == 'string') {
|
if ($responseType == '\SplFileObject' || $responseType == 'string') {
|
||||||
return array($http_body, $response_info['http_code'], $http_header);
|
return array($http_body, $response_info['http_code'], $http_header);
|
||||||
@ -255,7 +255,9 @@ class ApiClient
|
|||||||
|
|
||||||
throw new ApiException(
|
throw new ApiException(
|
||||||
"[".$response_info['http_code']."] Error connecting to the API ($url)",
|
"[".$response_info['http_code']."] Error connecting to the API ($url)",
|
||||||
$response_info['http_code'], $http_header, $data
|
$response_info['http_code'],
|
||||||
|
$http_header,
|
||||||
|
$data
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return array($data, $response_info['http_code'], $http_header);
|
return array($data, $response_info['http_code'], $http_header);
|
||||||
@ -310,31 +312,26 @@ class ApiClient
|
|||||||
$headers = array();
|
$headers = array();
|
||||||
$key = '';
|
$key = '';
|
||||||
|
|
||||||
foreach(explode("\n", $raw_headers) as $h)
|
foreach (explode("\n", $raw_headers) as $h) {
|
||||||
{
|
|
||||||
$h = explode(':', $h, 2);
|
$h = explode(':', $h, 2);
|
||||||
|
|
||||||
if (isset($h[1]))
|
if (isset($h[1])) {
|
||||||
{
|
if (!isset($headers[$h[0]])) {
|
||||||
if (!isset($headers[$h[0]]))
|
|
||||||
$headers[$h[0]] = trim($h[1]);
|
$headers[$h[0]] = trim($h[1]);
|
||||||
elseif (is_array($headers[$h[0]]))
|
} elseif (is_array($headers[$h[0]])) {
|
||||||
{
|
|
||||||
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
|
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
|
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
|
||||||
}
|
}
|
||||||
|
|
||||||
$key = $h[0];
|
$key = $h[0];
|
||||||
}
|
} else {
|
||||||
else
|
if (substr($h[0], 0, 1) == "\t") {
|
||||||
{
|
|
||||||
if (substr($h[0], 0, 1) == "\t")
|
|
||||||
$headers[$key] .= "\r\n\t".trim($h[0]);
|
$headers[$key] .= "\r\n\t".trim($h[0]);
|
||||||
elseif (!$key)
|
} elseif (!$key) {
|
||||||
$headers[0] = trim($h[0]);trim($h[0]);
|
$headers[0] = trim($h[0]);
|
||||||
|
}
|
||||||
|
trim($h[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class ApiException extends Exception
|
|||||||
* @param string $responseHeaders HTTP response header
|
* @param string $responseHeaders HTTP response header
|
||||||
* @param mixed $responseBody HTTP body of the server response either as Json or string
|
* @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, $responseHeaders = null, $responseBody = null)
|
||||||
{
|
{
|
||||||
parent::__construct($message, $code);
|
parent::__construct($message, $code);
|
||||||
$this->responseHeaders = $responseHeaders;
|
$this->responseHeaders = $responseHeaders;
|
||||||
|
@ -47,7 +47,7 @@ namespace Swagger\Client;
|
|||||||
class Configuration
|
class Configuration
|
||||||
{
|
{
|
||||||
|
|
||||||
private static $_defaultConfiguration = null;
|
private static $defaultConfiguration = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate array to store API key(s)
|
* Associate array to store API key(s)
|
||||||
@ -487,11 +487,11 @@ class Configuration
|
|||||||
*/
|
*/
|
||||||
public static function getDefaultConfiguration()
|
public static function getDefaultConfiguration()
|
||||||
{
|
{
|
||||||
if (self::$_defaultConfiguration == null) {
|
if (self::$defaultConfiguration == null) {
|
||||||
self::$_defaultConfiguration = new Configuration();
|
self::$defaultConfiguration = new Configuration();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$_defaultConfiguration;
|
return self::$defaultConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -503,7 +503,7 @@ class Configuration
|
|||||||
*/
|
*/
|
||||||
public static function setDefaultConfiguration(Configuration $config)
|
public static function setDefaultConfiguration(Configuration $config)
|
||||||
{
|
{
|
||||||
self::$_defaultConfiguration = $config;
|
self::$defaultConfiguration = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -522,5 +522,4 @@ class Configuration
|
|||||||
|
|
||||||
return $report;
|
return $report;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* Animal Class Doc Comment
|
* Animal Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,18 +50,19 @@ class Animal implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Animal';
|
protected static $swaggerModelName = 'Animal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'class_name' => 'string',
|
'class_name' => 'string',
|
||||||
'color' => 'string'
|
'color' => 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,12 +70,13 @@ class Animal implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'class_name' => 'className',
|
'class_name' => 'className',
|
||||||
'color' => 'color'
|
'color' => 'color'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,12 +84,13 @@ class Animal implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'class_name' => 'setClassName',
|
'class_name' => 'setClassName',
|
||||||
'color' => 'setColor'
|
'color' => 'setColor'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,12 +98,12 @@ class Animal implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'class_name' => 'getClassName',
|
'class_name' => 'getClassName',
|
||||||
'color' => 'getColor'
|
'color' => 'getColor'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* AnimalFarm Class Doc Comment
|
* AnimalFarm Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,17 +50,18 @@ class AnimalFarm implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'AnimalFarm';
|
protected static $swaggerModelName = 'AnimalFarm';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +69,12 @@ class AnimalFarm implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,11 +82,12 @@ class AnimalFarm implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +95,11 @@ class AnimalFarm implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* ApiResponse Class Doc Comment
|
* ApiResponse Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,19 +50,20 @@ class ApiResponse implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'ApiResponse';
|
protected static $swaggerModelName = 'ApiResponse';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'code' => 'int',
|
'code' => 'int',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'message' => 'string'
|
'message' => 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,13 +71,14 @@ class ApiResponse implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'code' => 'code',
|
'code' => 'code',
|
||||||
'type' => 'type',
|
'type' => 'type',
|
||||||
'message' => 'message'
|
'message' => 'message'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,13 +86,14 @@ class ApiResponse implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'code' => 'setCode',
|
'code' => 'setCode',
|
||||||
'type' => 'setType',
|
'type' => 'setType',
|
||||||
'message' => 'setMessage'
|
'message' => 'setMessage'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,13 +101,13 @@ class ApiResponse implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'code' => 'getCode',
|
'code' => 'getCode',
|
||||||
'type' => 'getType',
|
'type' => 'getType',
|
||||||
'message' => 'getMessage'
|
'message' => 'getMessage'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* Cat Class Doc Comment
|
* Cat Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,17 +50,18 @@ class Cat extends Animal implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Cat';
|
protected static $swaggerModelName = 'Cat';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'declawed' => 'bool'
|
'declawed' => 'bool'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes + parent::swaggerTypes();
|
return self::$swaggerTypes + parent::swaggerTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +69,12 @@ class Cat extends Animal implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'declawed' => 'declawed'
|
'declawed' => 'declawed'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return parent::attributeMap() + self::$attributeMap;
|
return parent::attributeMap() + self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,11 +82,12 @@ class Cat extends Animal implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'declawed' => 'setDeclawed'
|
'declawed' => 'setDeclawed'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return parent::setters() + self::$setters;
|
return parent::setters() + self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +95,11 @@ class Cat extends Animal implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'declawed' => 'getDeclawed'
|
'declawed' => 'getDeclawed'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return parent::getters() + self::$getters;
|
return parent::getters() + self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* Category Class Doc Comment
|
* Category Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,18 +50,19 @@ class Category implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Category';
|
protected static $swaggerModelName = 'Category';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'id' => 'int',
|
'id' => 'int',
|
||||||
'name' => 'string'
|
'name' => 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,12 +70,13 @@ class Category implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,12 +84,13 @@ class Category implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'id' => 'setId',
|
'id' => 'setId',
|
||||||
'name' => 'setName'
|
'name' => 'setName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,12 +98,12 @@ class Category implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'id' => 'getId',
|
'id' => 'getId',
|
||||||
'name' => 'getName'
|
'name' => 'getName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* Dog Class Doc Comment
|
* Dog Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,17 +50,18 @@ class Dog extends Animal implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Dog';
|
protected static $swaggerModelName = 'Dog';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'breed' => 'string'
|
'breed' => 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes + parent::swaggerTypes();
|
return self::$swaggerTypes + parent::swaggerTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +69,12 @@ class Dog extends Animal implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'breed' => 'breed'
|
'breed' => 'breed'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return parent::attributeMap() + self::$attributeMap;
|
return parent::attributeMap() + self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,11 +82,12 @@ class Dog extends Animal implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'breed' => 'setBreed'
|
'breed' => 'setBreed'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return parent::setters() + self::$setters;
|
return parent::setters() + self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +95,11 @@ class Dog extends Animal implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'breed' => 'getBreed'
|
'breed' => 'getBreed'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return parent::getters() + self::$getters;
|
return parent::getters() + self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* EnumClass Class Doc Comment
|
* EnumClass Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,17 +50,18 @@ class EnumClass implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'EnumClass';
|
protected static $swaggerModelName = 'EnumClass';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +69,12 @@ class EnumClass implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,11 +82,12 @@ class EnumClass implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +95,11 @@ class EnumClass implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* EnumTest Class Doc Comment
|
* EnumTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,19 +50,20 @@ class EnumTest implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Enum_Test';
|
protected static $swaggerModelName = 'Enum_Test';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'enum_string' => 'string',
|
'enum_string' => 'string',
|
||||||
'enum_integer' => 'int',
|
'enum_integer' => 'int',
|
||||||
'enum_number' => 'double'
|
'enum_number' => 'double'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,13 +71,14 @@ class EnumTest implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'enum_string' => 'enum_string',
|
'enum_string' => 'enum_string',
|
||||||
'enum_integer' => 'enum_integer',
|
'enum_integer' => 'enum_integer',
|
||||||
'enum_number' => 'enum_number'
|
'enum_number' => 'enum_number'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,13 +86,14 @@ class EnumTest implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'enum_string' => 'setEnumString',
|
'enum_string' => 'setEnumString',
|
||||||
'enum_integer' => 'setEnumInteger',
|
'enum_integer' => 'setEnumInteger',
|
||||||
'enum_number' => 'setEnumNumber'
|
'enum_number' => 'setEnumNumber'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,13 +101,13 @@ class EnumTest implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'enum_string' => 'getEnumString',
|
'enum_string' => 'getEnumString',
|
||||||
'enum_integer' => 'getEnumInteger',
|
'enum_integer' => 'getEnumInteger',
|
||||||
'enum_number' => 'getEnumNumber'
|
'enum_number' => 'getEnumNumber'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* FormatTest Class Doc Comment
|
* FormatTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,13 +50,13 @@ class FormatTest implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'format_test';
|
protected static $swaggerModelName = 'format_test';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'integer' => 'int',
|
'integer' => 'int',
|
||||||
'int32' => 'int',
|
'int32' => 'int',
|
||||||
'int64' => 'int',
|
'int64' => 'int',
|
||||||
@ -73,7 +72,8 @@ class FormatTest implements ArrayAccess
|
|||||||
'password' => 'string'
|
'password' => 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ class FormatTest implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'integer' => 'integer',
|
'integer' => 'integer',
|
||||||
'int32' => 'int32',
|
'int32' => 'int32',
|
||||||
'int64' => 'int64',
|
'int64' => 'int64',
|
||||||
@ -97,7 +97,8 @@ class FormatTest implements ArrayAccess
|
|||||||
'password' => 'password'
|
'password' => 'password'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +106,7 @@ class FormatTest implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'integer' => 'setInteger',
|
'integer' => 'setInteger',
|
||||||
'int32' => 'setInt32',
|
'int32' => 'setInt32',
|
||||||
'int64' => 'setInt64',
|
'int64' => 'setInt64',
|
||||||
@ -121,7 +122,8 @@ class FormatTest implements ArrayAccess
|
|||||||
'password' => 'setPassword'
|
'password' => 'setPassword'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +131,7 @@ class FormatTest implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'integer' => 'getInteger',
|
'integer' => 'getInteger',
|
||||||
'int32' => 'getInt32',
|
'int32' => 'getInt32',
|
||||||
'int64' => 'getInt64',
|
'int64' => 'getInt64',
|
||||||
@ -145,7 +147,7 @@ class FormatTest implements ArrayAccess
|
|||||||
'password' => 'getPassword'
|
'password' => 'getPassword'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -51,17 +51,18 @@ class Model200Response implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = '200_response';
|
protected static $swaggerModelName = '200_response';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'name' => 'int'
|
'name' => 'int'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +70,12 @@ class Model200Response implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,11 +83,12 @@ class Model200Response implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'name' => 'setName'
|
'name' => 'setName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +96,11 @@ class Model200Response implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'name' => 'getName'
|
'name' => 'getName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -51,17 +51,18 @@ class ModelReturn implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Return';
|
protected static $swaggerModelName = 'Return';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'return' => 'int'
|
'return' => 'int'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +70,12 @@ class ModelReturn implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'return' => 'return'
|
'return' => 'return'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,11 +83,12 @@ class ModelReturn implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'return' => 'setReturn'
|
'return' => 'setReturn'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +96,11 @@ class ModelReturn implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'return' => 'getReturn'
|
'return' => 'getReturn'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -51,20 +51,21 @@ class Name implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Name';
|
protected static $swaggerModelName = 'Name';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'name' => 'int',
|
'name' => 'int',
|
||||||
'snake_case' => 'int',
|
'snake_case' => 'int',
|
||||||
'property' => 'string',
|
'property' => 'string',
|
||||||
'_123_number' => 'int'
|
'_123_number' => 'int'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,14 +73,15 @@ class Name implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'snake_case' => 'snake_case',
|
'snake_case' => 'snake_case',
|
||||||
'property' => 'property',
|
'property' => 'property',
|
||||||
'_123_number' => '123Number'
|
'_123_number' => '123Number'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,14 +89,15 @@ class Name implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'name' => 'setName',
|
'name' => 'setName',
|
||||||
'snake_case' => 'setSnakeCase',
|
'snake_case' => 'setSnakeCase',
|
||||||
'property' => 'setProperty',
|
'property' => 'setProperty',
|
||||||
'_123_number' => 'set123Number'
|
'_123_number' => 'set123Number'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,14 +105,14 @@ class Name implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'name' => 'getName',
|
'name' => 'getName',
|
||||||
'snake_case' => 'getSnakeCase',
|
'snake_case' => 'getSnakeCase',
|
||||||
'property' => 'getProperty',
|
'property' => 'getProperty',
|
||||||
'_123_number' => 'get123Number'
|
'_123_number' => 'get123Number'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* Order Class Doc Comment
|
* Order Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,13 +50,13 @@ class Order implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Order';
|
protected static $swaggerModelName = 'Order';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'id' => 'int',
|
'id' => 'int',
|
||||||
'pet_id' => 'int',
|
'pet_id' => 'int',
|
||||||
'quantity' => 'int',
|
'quantity' => 'int',
|
||||||
@ -66,7 +65,8 @@ class Order implements ArrayAccess
|
|||||||
'complete' => 'bool'
|
'complete' => 'bool'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ class Order implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'pet_id' => 'petId',
|
'pet_id' => 'petId',
|
||||||
'quantity' => 'quantity',
|
'quantity' => 'quantity',
|
||||||
@ -83,7 +83,8 @@ class Order implements ArrayAccess
|
|||||||
'complete' => 'complete'
|
'complete' => 'complete'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ class Order implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'id' => 'setId',
|
'id' => 'setId',
|
||||||
'pet_id' => 'setPetId',
|
'pet_id' => 'setPetId',
|
||||||
'quantity' => 'setQuantity',
|
'quantity' => 'setQuantity',
|
||||||
@ -100,7 +101,8 @@ class Order implements ArrayAccess
|
|||||||
'complete' => 'setComplete'
|
'complete' => 'setComplete'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +110,7 @@ class Order implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'id' => 'getId',
|
'id' => 'getId',
|
||||||
'pet_id' => 'getPetId',
|
'pet_id' => 'getPetId',
|
||||||
'quantity' => 'getQuantity',
|
'quantity' => 'getQuantity',
|
||||||
@ -117,7 +119,7 @@ class Order implements ArrayAccess
|
|||||||
'complete' => 'getComplete'
|
'complete' => 'getComplete'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* Pet Class Doc Comment
|
* Pet Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,13 +50,13 @@ class Pet implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Pet';
|
protected static $swaggerModelName = 'Pet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'id' => 'int',
|
'id' => 'int',
|
||||||
'category' => '\Swagger\Client\Model\Category',
|
'category' => '\Swagger\Client\Model\Category',
|
||||||
'name' => 'string',
|
'name' => 'string',
|
||||||
@ -66,7 +65,8 @@ class Pet implements ArrayAccess
|
|||||||
'status' => 'string'
|
'status' => 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ class Pet implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'category' => 'category',
|
'category' => 'category',
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
@ -83,7 +83,8 @@ class Pet implements ArrayAccess
|
|||||||
'status' => 'status'
|
'status' => 'status'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ class Pet implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'id' => 'setId',
|
'id' => 'setId',
|
||||||
'category' => 'setCategory',
|
'category' => 'setCategory',
|
||||||
'name' => 'setName',
|
'name' => 'setName',
|
||||||
@ -100,7 +101,8 @@ class Pet implements ArrayAccess
|
|||||||
'status' => 'setStatus'
|
'status' => 'setStatus'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +110,7 @@ class Pet implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'id' => 'getId',
|
'id' => 'getId',
|
||||||
'category' => 'getCategory',
|
'category' => 'getCategory',
|
||||||
'name' => 'getName',
|
'name' => 'getName',
|
||||||
@ -117,7 +119,7 @@ class Pet implements ArrayAccess
|
|||||||
'status' => 'getStatus'
|
'status' => 'getStatus'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* SpecialModelName Class Doc Comment
|
* SpecialModelName Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,17 +50,18 @@ class SpecialModelName implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = '$special[model.name]';
|
protected static $swaggerModelName = '$special[model.name]';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'special_property_name' => 'int'
|
'special_property_name' => 'int'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +69,12 @@ class SpecialModelName implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'special_property_name' => '$special[property.name]'
|
'special_property_name' => '$special[property.name]'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,11 +82,12 @@ class SpecialModelName implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'special_property_name' => 'setSpecialPropertyName'
|
'special_property_name' => 'setSpecialPropertyName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,11 +95,11 @@ class SpecialModelName implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'special_property_name' => 'getSpecialPropertyName'
|
'special_property_name' => 'getSpecialPropertyName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* Tag Class Doc Comment
|
* Tag Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,18 +50,19 @@ class Tag implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'Tag';
|
protected static $swaggerModelName = 'Tag';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'id' => 'int',
|
'id' => 'int',
|
||||||
'name' => 'string'
|
'name' => 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,12 +70,13 @@ class Tag implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,12 +84,13 @@ class Tag implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'id' => 'setId',
|
'id' => 'setId',
|
||||||
'name' => 'setName'
|
'name' => 'setName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,12 +98,12 @@ class Tag implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'id' => 'getId',
|
'id' => 'getId',
|
||||||
'name' => 'getName'
|
'name' => 'getName'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ use \ArrayAccess;
|
|||||||
* User Class Doc Comment
|
* User Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -51,13 +50,13 @@ class User implements ArrayAccess
|
|||||||
* The original name of the model.
|
* The original name of the model.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
static $swaggerModelName = 'User';
|
protected static $swaggerModelName = 'User';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of property to type mappings. Used for (de)serialization
|
* Array of property to type mappings. Used for (de)serialization
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $swaggerTypes = array(
|
protected static $swaggerTypes = array(
|
||||||
'id' => 'int',
|
'id' => 'int',
|
||||||
'username' => 'string',
|
'username' => 'string',
|
||||||
'first_name' => 'string',
|
'first_name' => 'string',
|
||||||
@ -68,7 +67,8 @@ class User implements ArrayAccess
|
|||||||
'user_status' => 'int'
|
'user_status' => 'int'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function swaggerTypes() {
|
public static function swaggerTypes()
|
||||||
|
{
|
||||||
return self::$swaggerTypes;
|
return self::$swaggerTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ class User implements ArrayAccess
|
|||||||
* Array of attributes where the key is the local name, and the value is the original name
|
* Array of attributes where the key is the local name, and the value is the original name
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $attributeMap = array(
|
protected static $attributeMap = array(
|
||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'username' => 'username',
|
'username' => 'username',
|
||||||
'first_name' => 'firstName',
|
'first_name' => 'firstName',
|
||||||
@ -87,7 +87,8 @@ class User implements ArrayAccess
|
|||||||
'user_status' => 'userStatus'
|
'user_status' => 'userStatus'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function attributeMap() {
|
public static function attributeMap()
|
||||||
|
{
|
||||||
return self::$attributeMap;
|
return self::$attributeMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +96,7 @@ class User implements ArrayAccess
|
|||||||
* Array of attributes to setter functions (for deserialization of responses)
|
* Array of attributes to setter functions (for deserialization of responses)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $setters = array(
|
protected static $setters = array(
|
||||||
'id' => 'setId',
|
'id' => 'setId',
|
||||||
'username' => 'setUsername',
|
'username' => 'setUsername',
|
||||||
'first_name' => 'setFirstName',
|
'first_name' => 'setFirstName',
|
||||||
@ -106,7 +107,8 @@ class User implements ArrayAccess
|
|||||||
'user_status' => 'setUserStatus'
|
'user_status' => 'setUserStatus'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function setters() {
|
public static function setters()
|
||||||
|
{
|
||||||
return self::$setters;
|
return self::$setters;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +116,7 @@ class User implements ArrayAccess
|
|||||||
* Array of attributes to getter functions (for serialization of requests)
|
* Array of attributes to getter functions (for serialization of requests)
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
static $getters = array(
|
protected static $getters = array(
|
||||||
'id' => 'getId',
|
'id' => 'getId',
|
||||||
'username' => 'getUsername',
|
'username' => 'getUsername',
|
||||||
'first_name' => 'getFirstName',
|
'first_name' => 'getFirstName',
|
||||||
@ -125,7 +127,7 @@ class User implements ArrayAccess
|
|||||||
'user_status' => 'getUserStatus'
|
'user_status' => 'getUserStatus'
|
||||||
);
|
);
|
||||||
|
|
||||||
static function getters()
|
public static function getters()
|
||||||
{
|
{
|
||||||
return self::$getters;
|
return self::$getters;
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ class ObjectSerializer
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti=false)
|
public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false)
|
||||||
{
|
{
|
||||||
if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) {
|
if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) {
|
||||||
// http_build_query() almost does the job for us. We just
|
// http_build_query() almost does the job for us. We just
|
||||||
@ -219,7 +219,7 @@ class ObjectSerializer
|
|||||||
*
|
*
|
||||||
* @return object an instance of $class
|
* @return object an instance of $class
|
||||||
*/
|
*/
|
||||||
public static function deserialize($data, $class, $httpHeaders=null, $discriminator=null)
|
public static function deserialize($data, $class, $httpHeaders = null, $discriminator = null)
|
||||||
{
|
{
|
||||||
if (null === $data) {
|
if (null === $data) {
|
||||||
return null;
|
return null;
|
||||||
@ -256,12 +256,13 @@ class ObjectSerializer
|
|||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
|
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) {
|
||||||
settype($data, $class);
|
settype($data, $class);
|
||||||
return $data;
|
return $data;
|
||||||
} elseif ($class === '\SplFileObject') {
|
} elseif ($class === '\SplFileObject') {
|
||||||
// determine file name
|
// determine file name
|
||||||
if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
|
if (array_key_exists('Content-Disposition', $httpHeaders) &&
|
||||||
|
preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
|
||||||
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]);
|
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]);
|
||||||
} else {
|
} else {
|
||||||
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
|
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
|
||||||
@ -274,7 +275,6 @@ class ObjectSerializer
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $deserialized;
|
return $deserialized;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// If a discriminator is defined and points to a valid subclass, use it.
|
// If a discriminator is defined and points to a valid subclass, use it.
|
||||||
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
|
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* AnimalFarmTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AnimalFarmTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class AnimalFarmTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test AnimalFarm
|
|
||||||
*/
|
|
||||||
public function testAnimalFarm()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* AnimalTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AnimalTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class AnimalTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Animal
|
|
||||||
*/
|
|
||||||
public function testAnimal()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* ApiResponseTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ApiResponseTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class ApiResponseTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test ApiResponse
|
|
||||||
*/
|
|
||||||
public function testApiResponse()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* CatTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CatTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class CatTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Cat
|
|
||||||
*/
|
|
||||||
public function testCat()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* CategoryTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CategoryTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class CategoryTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Category
|
|
||||||
*/
|
|
||||||
public function testCategory()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* DogTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DogTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class DogTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Dog
|
|
||||||
*/
|
|
||||||
public function testDog()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* EnumClassTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EnumClassTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class EnumClassTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test EnumClass
|
|
||||||
*/
|
|
||||||
public function testEnumClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* EnumTestTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* EnumTestTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class EnumTestTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test EnumTest
|
|
||||||
*/
|
|
||||||
public function testEnumTest()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* FormatTestTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* FormatTestTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class FormatTestTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test FormatTest
|
|
||||||
*/
|
|
||||||
public function testFormatTest()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Model200ResponseTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model200ResponseTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description Model for testing model name starting with number
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class Model200ResponseTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Model200Response
|
|
||||||
*/
|
|
||||||
public function testModel200Response()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* ModelReturnTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ModelReturnTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description Model for testing reserved words
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class ModelReturnTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test ModelReturn
|
|
||||||
*/
|
|
||||||
public function testModelReturn()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* NameTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NameTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description Model for testing model name same as property name
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class NameTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Name
|
|
||||||
*/
|
|
||||||
public function testName()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* OrderTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OrderTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class OrderTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Order
|
|
||||||
*/
|
|
||||||
public function testOrder()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* PetTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* PetTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class PetTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Pet
|
|
||||||
*/
|
|
||||||
public function testPet()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* SpecialModelNameTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SpecialModelNameTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class SpecialModelNameTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test SpecialModelName
|
|
||||||
*/
|
|
||||||
public function testSpecialModelName()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* TagTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TagTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class TagTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test Tag
|
|
||||||
*/
|
|
||||||
public function testTag()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* UserTest
|
|
||||||
*
|
|
||||||
* PHP version 5
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copyright 2016 SmartBear Software
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
|
||||||
* https://github.com/swagger-api/swagger-codegen
|
|
||||||
* Please update the test case below to test the model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Swagger\Client\Model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* UserTest Class Doc Comment
|
|
||||||
*
|
|
||||||
* @category Class
|
|
||||||
* @description
|
|
||||||
* @package Swagger\Client
|
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
|
||||||
*/
|
|
||||||
class UserTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup before running each test case
|
|
||||||
*/
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean up after running each test case
|
|
||||||
*/
|
|
||||||
public static function tearDownAfterClass()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test User
|
|
||||||
*/
|
|
||||||
public function testUser()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- See http://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php -->
|
||||||
|
<ruleset name="PhpSwaggerCodegen">
|
||||||
|
<description>Arnes Drupal code checker</description>
|
||||||
|
|
||||||
|
<rule ref="PSR2" />
|
||||||
|
<rule ref="Generic.Files.LineLength">
|
||||||
|
<exclude-pattern>*</exclude-pattern>
|
||||||
|
</rule>
|
||||||
|
</ruleset>
|
@ -53,24 +53,27 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test case for testEndpointParameters
|
* Test case for testEndpointParameters
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 .
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_testEndpointParameters() {
|
public function testTestEndpointParameters()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,87 +53,97 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test case for addPet
|
* Test case for addPet
|
||||||
*
|
*
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_addPet() {
|
public function testAddPet()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for deletePet
|
* Test case for deletePet
|
||||||
*
|
*
|
||||||
* Deletes a pet
|
* Deletes a pet.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_deletePet() {
|
public function testDeletePet()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for findPetsByStatus
|
* Test case for findPetsByStatus
|
||||||
*
|
*
|
||||||
* Finds Pets by status
|
* Finds Pets by status.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_findPetsByStatus() {
|
public function testFindPetsByStatus()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for findPetsByTags
|
* Test case for findPetsByTags
|
||||||
*
|
*
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_findPetsByTags() {
|
public function testFindPetsByTags()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for getPetById
|
* Test case for getPetById
|
||||||
*
|
*
|
||||||
* Find pet by ID
|
* Find pet by ID.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_getPetById() {
|
public function testGetPetById()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for updatePet
|
* Test case for updatePet
|
||||||
*
|
*
|
||||||
* Update an existing pet
|
* Update an existing pet.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_updatePet() {
|
public function testUpdatePet()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for updatePetWithForm
|
* Test case for updatePetWithForm
|
||||||
*
|
*
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_updatePetWithForm() {
|
public function testUpdatePetWithForm()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for uploadFile
|
* Test case for uploadFile
|
||||||
*
|
*
|
||||||
* uploads an image
|
* uploads an image.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_uploadFile() {
|
public function testUploadFile()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,51 +53,57 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test case for deleteOrder
|
* Test case for deleteOrder
|
||||||
*
|
*
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_deleteOrder() {
|
public function testDeleteOrder()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for getInventory
|
* Test case for getInventory
|
||||||
*
|
*
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_getInventory() {
|
public function testGetInventory()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for getOrderById
|
* Test case for getOrderById
|
||||||
*
|
*
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_getOrderById() {
|
public function testGetOrderById()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for placeOrder
|
* Test case for placeOrder
|
||||||
*
|
*
|
||||||
* Place an order for a pet
|
* Place an order for a pet.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_placeOrder() {
|
public function testPlaceOrder()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,87 +53,97 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test case for createUser
|
* Test case for createUser
|
||||||
*
|
*
|
||||||
* Create user
|
* Create user.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_createUser() {
|
public function testCreateUser()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for createUsersWithArrayInput
|
* Test case for createUsersWithArrayInput
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_createUsersWithArrayInput() {
|
public function testCreateUsersWithArrayInput()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for createUsersWithListInput
|
* Test case for createUsersWithListInput
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_createUsersWithListInput() {
|
public function testCreateUsersWithListInput()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for deleteUser
|
* Test case for deleteUser
|
||||||
*
|
*
|
||||||
* Delete user
|
* Delete user.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_deleteUser() {
|
public function testDeleteUser()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for getUserByName
|
* Test case for getUserByName
|
||||||
*
|
*
|
||||||
* Get user by user name
|
* Get user by user name.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_getUserByName() {
|
public function testGetUserByName()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for loginUser
|
* Test case for loginUser
|
||||||
*
|
*
|
||||||
* Logs user into the system
|
* Logs user into the system.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_loginUser() {
|
public function testLoginUser()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for logoutUser
|
* Test case for logoutUser
|
||||||
*
|
*
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_logoutUser() {
|
public function testLogoutUser()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Test case for updateUser
|
* Test case for updateUser
|
||||||
*
|
*
|
||||||
* Updated user
|
* Updated user.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function test_updateUser() {
|
public function testUpdateUser()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* AnimalFarmTest Class Doc Comment
|
* AnimalFarmTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description AnimalFarm
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class AnimalFarmTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test AnimalFarm
|
* Test "AnimalFarm"
|
||||||
*/
|
*/
|
||||||
public function testAnimalFarm() {
|
public function testAnimalFarm()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* AnimalTest Class Doc Comment
|
* AnimalTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description Animal
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class AnimalTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Animal
|
* Test "Animal"
|
||||||
*/
|
*/
|
||||||
public function testAnimal() {
|
public function testAnimal()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* ApiResponseTest Class Doc Comment
|
* ApiResponseTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description ApiResponse
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class ApiResponseTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test ApiResponse
|
* Test "ApiResponse"
|
||||||
*/
|
*/
|
||||||
public function testApiResponse() {
|
public function testApiResponse()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* CatTest Class Doc Comment
|
* CatTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description Cat
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class CatTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Cat
|
* Test "Cat"
|
||||||
*/
|
*/
|
||||||
public function testCat() {
|
public function testCat()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* CategoryTest Class Doc Comment
|
* CategoryTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description Category
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class CategoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Category
|
* Test "Category"
|
||||||
*/
|
*/
|
||||||
public function testCategory() {
|
public function testCategory()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* DogTest Class Doc Comment
|
* DogTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description Dog
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class DogTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Dog
|
* Test "Dog"
|
||||||
*/
|
*/
|
||||||
public function testDog() {
|
public function testDog()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* EnumClassTest Class Doc Comment
|
* EnumClassTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description EnumClass
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class EnumClassTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test EnumClass
|
* Test "EnumClass"
|
||||||
*/
|
*/
|
||||||
public function testEnumClass() {
|
public function testEnumClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* EnumTestTest Class Doc Comment
|
* EnumTestTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description EnumTest
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class EnumTestTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test EnumTest
|
* Test "EnumTest"
|
||||||
*/
|
*/
|
||||||
public function testEnumTest() {
|
public function testEnumTest()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* FormatTestTest Class Doc Comment
|
* FormatTestTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description FormatTest
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class FormatTestTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test FormatTest
|
* Test "FormatTest"
|
||||||
*/
|
*/
|
||||||
public function testFormatTest() {
|
public function testFormatTest()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,22 +49,24 @@ class Model200ResponseTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Model200Response
|
* Test "Model200Response"
|
||||||
*/
|
*/
|
||||||
public function testModel200Response() {
|
public function testModel200Response()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,22 +49,24 @@ class ModelReturnTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test ModelReturn
|
* Test "ModelReturn"
|
||||||
*/
|
*/
|
||||||
public function testModelReturn() {
|
public function testModelReturn()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,22 +49,24 @@ class NameTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Name
|
* Test "Name"
|
||||||
*/
|
*/
|
||||||
public function testName() {
|
public function testName()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* OrderTest Class Doc Comment
|
* OrderTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description Order
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class OrderTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Order
|
* Test "Order"
|
||||||
*/
|
*/
|
||||||
public function testOrder() {
|
public function testOrder()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* PetTest Class Doc Comment
|
* PetTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description Pet
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class PetTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Pet
|
* Test "Pet"
|
||||||
*/
|
*/
|
||||||
public function testPet() {
|
public function testPet()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* SpecialModelNameTest Class Doc Comment
|
* SpecialModelNameTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description SpecialModelName
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class SpecialModelNameTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test SpecialModelName
|
* Test "SpecialModelName"
|
||||||
*/
|
*/
|
||||||
public function testSpecialModelName() {
|
public function testSpecialModelName()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* TagTest Class Doc Comment
|
* TagTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description Tag
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class TagTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test Tag
|
* Test "Tag"
|
||||||
*/
|
*/
|
||||||
public function testTag() {
|
public function testTag()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
|
|||||||
* UserTest Class Doc Comment
|
* UserTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class
|
||||||
* @description
|
* @description User
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
@ -49,22 +49,24 @@ class UserTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running each test case
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test User
|
* Test "User"
|
||||||
*/
|
*/
|
||||||
public function testUser() {
|
public function testUser()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('autoload.php');
|
namespace Swagger\Client;
|
||||||
|
|
||||||
// test object serializer
|
// test object serializer
|
||||||
class ObjectSerializerTest extends \PHPUnit_Framework_TestCase
|
class ObjectSerializerTest extends \PHPUnit_Framework_TestCase
|
||||||
@ -9,7 +9,7 @@ class ObjectSerializerTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testSanitizeFilename()
|
public function testSanitizeFilename()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$s = new Swagger\Client\ObjectSerializer();
|
$s = new ObjectSerializer();
|
||||||
|
|
||||||
$this->assertSame("sun.gif", $s->sanitizeFilename("sun.gif"));
|
$this->assertSame("sun.gif", $s->sanitizeFilename("sun.gif"));
|
||||||
$this->assertSame("sun.gif", $s->sanitizeFilename("../sun.gif"));
|
$this->assertSame("sun.gif", $s->sanitizeFilename("../sun.gif"));
|
||||||
@ -22,8 +22,4 @@ class ObjectSerializerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertSame("sun.gif", $s->sanitizeFilename("c:\var\tmp\sun.gif"));
|
$this->assertSame("sun.gif", $s->sanitizeFilename("c:\var\tmp\sun.gif"));
|
||||||
$this->assertSame("sun.gif", $s->sanitizeFilename(".\sun.gif"));
|
$this->assertSame("sun.gif", $s->sanitizeFilename(".\sun.gif"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('autoload.php');
|
namespace Swagger\Client;
|
||||||
|
|
||||||
class OrderApiTest extends \PHPUnit_Framework_TestCase
|
class OrderApiTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
// for error reporting (need to run with php5.3 to get no warning)
|
// for error reporting (need to run with php5.3 to get no warning)
|
||||||
//ini_set('display_errors', 1);
|
//ini_set('display_errors', 1);
|
||||||
//error_reporting(~0);
|
//error_reporting(~0);
|
||||||
@ -15,15 +16,15 @@ class OrderApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
// test get inventory
|
// test get inventory
|
||||||
public function testOrderEnum()
|
public function testOrderEnum()
|
||||||
{
|
{
|
||||||
$this->assertSame(Swagger\Client\Model\Order::STATUS_PLACED, "placed");
|
$this->assertSame(Model\Order::STATUS_PLACED, "placed");
|
||||||
$this->assertSame(Swagger\Client\Model\Order::STATUS_APPROVED, "approved");
|
$this->assertSame(Model\Order::STATUS_APPROVED, "approved");
|
||||||
}
|
}
|
||||||
|
|
||||||
// test get inventory
|
// test get inventory
|
||||||
public function testOrder()
|
public function testOrder()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$order = new Swagger\Client\Model\Order();
|
$order = new Model\Order();
|
||||||
|
|
||||||
$order->setStatus("placed");
|
$order->setStatus("placed");
|
||||||
$this->assertSame("placed", $order->getStatus());
|
$this->assertSame("placed", $order->getStatus());
|
||||||
@ -35,7 +36,7 @@ class OrderApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testOrderException()
|
public function testOrderException()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$order = new Swagger\Client\Model\Order();
|
$order = new Model\Order();
|
||||||
$order->setStatus("invalid_value");
|
$order->setStatus("invalid_value");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,13 +53,16 @@ class OrderApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
"complete": false
|
"complete": false
|
||||||
}
|
}
|
||||||
ORDER;
|
ORDER;
|
||||||
$order = \Swagger\Client\ObjectSerializer::deserialize(json_decode($order_json), 'Swagger\Client\Model\Order');
|
$order = ObjectSerializer::deserialize(
|
||||||
|
json_decode($order_json),
|
||||||
|
'Swagger\Client\Model\Order'
|
||||||
|
);
|
||||||
|
|
||||||
$this->assertInstanceOf('Swagger\Client\Model\Order', $order);
|
$this->assertInstanceOf('Swagger\Client\Model\Order', $order);
|
||||||
$this->assertSame(10, $order->getId());
|
$this->assertSame(10, $order->getId());
|
||||||
$this->assertSame(20, $order->getPetId());
|
$this->assertSame(20, $order->getPetId());
|
||||||
$this->assertSame(30, $order->getQuantity());
|
$this->assertSame(30, $order->getQuantity());
|
||||||
$this->assertTrue(new DateTime("2015-08-22T07:13:36.613Z") == $order->getShipDate());
|
$this->assertTrue(new \DateTime("2015-08-22T07:13:36.613Z") == $order->getShipDate());
|
||||||
$this->assertSame("placed", $order->getStatus());
|
$this->assertSame("placed", $order->getStatus());
|
||||||
$this->assertSame(false, $order->getComplete());
|
$this->assertSame(false, $order->getComplete());
|
||||||
}
|
}
|
||||||
@ -76,7 +80,10 @@ ORDER;
|
|||||||
"complete": false
|
"complete": false
|
||||||
}]]
|
}]]
|
||||||
ORDER;
|
ORDER;
|
||||||
$order = \Swagger\Client\ObjectSerializer::deserialize(json_decode($order_json), 'Swagger\Client\Model\Order[][]');
|
$order = ObjectSerializer::deserialize(
|
||||||
|
json_decode($order_json),
|
||||||
|
'Swagger\Client\Model\Order[][]'
|
||||||
|
);
|
||||||
|
|
||||||
$this->assertArrayHasKey(0, $order);
|
$this->assertArrayHasKey(0, $order);
|
||||||
$this->assertArrayHasKey(0, $order[0]);
|
$this->assertArrayHasKey(0, $order[0]);
|
||||||
@ -85,7 +92,7 @@ ORDER;
|
|||||||
$this->assertSame(10, $_order->getId());
|
$this->assertSame(10, $_order->getId());
|
||||||
$this->assertSame(20, $_order->getPetId());
|
$this->assertSame(20, $_order->getPetId());
|
||||||
$this->assertSame(30, $_order->getQuantity());
|
$this->assertSame(30, $_order->getQuantity());
|
||||||
$this->assertTrue(new DateTime("2015-08-22T07:13:36.613Z") == $_order->getShipDate());
|
$this->assertTrue(new \DateTime("2015-08-22T07:13:36.613Z") == $_order->getShipDate());
|
||||||
$this->assertSame("placed", $_order->getStatus());
|
$this->assertSame("placed", $_order->getStatus());
|
||||||
$this->assertSame(false, $_order->getComplete());
|
$this->assertSame(false, $_order->getComplete());
|
||||||
}
|
}
|
||||||
@ -107,7 +114,10 @@ ORDER;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ORDER;
|
ORDER;
|
||||||
$order = \Swagger\Client\ObjectSerializer::deserialize(json_decode($order_json), 'map[string,map[string,\Swagger\Client\Model\Order]]');
|
$order = ObjectSerializer::deserialize(
|
||||||
|
json_decode($order_json),
|
||||||
|
'map[string,map[string,\Swagger\Client\Model\Order]]'
|
||||||
|
);
|
||||||
|
|
||||||
$this->assertArrayHasKey('test', $order);
|
$this->assertArrayHasKey('test', $order);
|
||||||
$this->assertArrayHasKey('test2', $order['test']);
|
$this->assertArrayHasKey('test2', $order['test']);
|
||||||
@ -116,12 +126,8 @@ ORDER;
|
|||||||
$this->assertSame(10, $_order->getId());
|
$this->assertSame(10, $_order->getId());
|
||||||
$this->assertSame(20, $_order->getPetId());
|
$this->assertSame(20, $_order->getPetId());
|
||||||
$this->assertSame(30, $_order->getQuantity());
|
$this->assertSame(30, $_order->getQuantity());
|
||||||
$this->assertTrue(new DateTime("2015-08-22T07:13:36.613Z") == $_order->getShipDate());
|
$this->assertTrue(new \DateTime("2015-08-22T07:13:36.613Z") == $_order->getShipDate());
|
||||||
$this->assertSame("placed", $_order->getStatus());
|
$this->assertSame("placed", $_order->getStatus());
|
||||||
$this->assertSame(false, $_order->getComplete());
|
$this->assertSame(false, $_order->getComplete());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('autoload.php');
|
namespace Swagger\Client;
|
||||||
|
|
||||||
// increase memory limit to avoid fatal error due to findPetByStatus
|
|
||||||
// returning a lot of data
|
|
||||||
ini_set('memory_limit', '256M');
|
|
||||||
|
|
||||||
class PetApiTest extends \PHPUnit_Framework_TestCase
|
class PetApiTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
|
// increase memory limit to avoid fatal error due to findPetByStatus
|
||||||
|
// returning a lot of data
|
||||||
|
ini_set('memory_limit', '256M');
|
||||||
|
|
||||||
// for error reporting (need to run with php5.3 to get no warning)
|
// for error reporting (need to run with php5.3 to get no warning)
|
||||||
//ini_set('display_errors', 1);
|
//ini_set('display_errors', 1);
|
||||||
//error_reporting(~0);
|
//error_reporting(~0);
|
||||||
@ -21,29 +22,29 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
//error_reporting(-1);
|
//error_reporting(-1);
|
||||||
|
|
||||||
// enable debugging
|
// enable debugging
|
||||||
//Swagger\Client\Configuration::$debug = true;
|
//Configuration::$debug = true;
|
||||||
|
|
||||||
// skip initializing the API client as it should be automatic
|
// skip initializing the API client as it should be automatic
|
||||||
//$api_client = new Swagger\Client\ApiClient('http://petstore.swagger.io/v2');
|
//$api_client = new ApiClient('http://petstore.swagger.io/v2');
|
||||||
// new pet
|
// new pet
|
||||||
$new_pet_id = 10005;
|
$new_pet_id = 10005;
|
||||||
$new_pet = new Swagger\Client\Model\Pet;
|
$new_pet = new Model\Pet;
|
||||||
$new_pet->setId($new_pet_id);
|
$new_pet->setId($new_pet_id);
|
||||||
$new_pet->setName("PHP Unit Test");
|
$new_pet->setName("PHP Unit Test");
|
||||||
$new_pet->setPhotoUrls(array("http://test_php_unit_test.com"));
|
$new_pet->setPhotoUrls(array("http://test_php_unit_test.com"));
|
||||||
// new tag
|
// new tag
|
||||||
$tag= new Swagger\Client\Model\Tag;
|
$tag= new Model\Tag;
|
||||||
$tag->setId($new_pet_id); // use the same id as pet
|
$tag->setId($new_pet_id); // use the same id as pet
|
||||||
$tag->setName("test php tag");
|
$tag->setName("test php tag");
|
||||||
// new category
|
// new category
|
||||||
$category = new Swagger\Client\Model\Category;
|
$category = new Model\Category;
|
||||||
$category->setId($new_pet_id); // use the same id as pet
|
$category->setId($new_pet_id); // use the same id as pet
|
||||||
$category->setName("test php category");
|
$category->setName("test php category");
|
||||||
|
|
||||||
$new_pet->setTags(array($tag));
|
$new_pet->setTags(array($tag));
|
||||||
$new_pet->setCategory($category);
|
$new_pet->setCategory($category);
|
||||||
|
|
||||||
$pet_api = new Swagger\Client\Api\PetApi();
|
$pet_api = new Api\PetApi();
|
||||||
// add a new pet (model)
|
// add a new pet (model)
|
||||||
$add_response = $pet_api->addPet($new_pet);
|
$add_response = $pet_api->addPet($new_pet);
|
||||||
}
|
}
|
||||||
@ -52,15 +53,27 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testApiClient()
|
public function testApiClient()
|
||||||
{
|
{
|
||||||
// test selectHeaderAccept
|
// test selectHeaderAccept
|
||||||
$api_client = new Swagger\Client\ApiClient();
|
$api_client = new ApiClient();
|
||||||
$this->assertSame('application/json', $api_client->selectHeaderAccept(array('application/xml','application/json')));
|
$this->assertSame('application/json', $api_client->selectHeaderAccept(array(
|
||||||
$this->assertSame(NULL, $api_client->selectHeaderAccept(array()));
|
'application/xml',
|
||||||
$this->assertSame('application/yaml,application/xml', $api_client->selectHeaderAccept(array('application/yaml','application/xml')));
|
'application/json'
|
||||||
|
)));
|
||||||
|
$this->assertSame(null, $api_client->selectHeaderAccept(array()));
|
||||||
|
$this->assertSame('application/yaml,application/xml', $api_client->selectHeaderAccept(array(
|
||||||
|
'application/yaml',
|
||||||
|
'application/xml'
|
||||||
|
)));
|
||||||
|
|
||||||
// test selectHeaderContentType
|
// test selectHeaderContentType
|
||||||
$this->assertSame('application/json', $api_client->selectHeaderContentType(array('application/xml','application/json')));
|
$this->assertSame('application/json', $api_client->selectHeaderContentType(array(
|
||||||
|
'application/xml',
|
||||||
|
'application/json'
|
||||||
|
)));
|
||||||
$this->assertSame('application/json', $api_client->selectHeaderContentType(array()));
|
$this->assertSame('application/json', $api_client->selectHeaderContentType(array()));
|
||||||
$this->assertSame('application/yaml,application/xml', $api_client->selectHeaderContentType(array('application/yaml','application/xml')));
|
$this->assertSame('application/yaml,application/xml', $api_client->selectHeaderContentType(array(
|
||||||
|
'application/yaml',
|
||||||
|
'application/xml'
|
||||||
|
)));
|
||||||
|
|
||||||
// test addDefaultHeader and getDefaultHeader
|
// test addDefaultHeader and getDefaultHeader
|
||||||
$api_client->getConfig()->addDefaultHeader('test1', 'value1');
|
$api_client->getConfig()->addDefaultHeader('test1', 'value1');
|
||||||
@ -74,14 +87,14 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
$defaultHeader = $api_client->getConfig()->getDefaultHeaders();
|
$defaultHeader = $api_client->getConfig()->getDefaultHeaders();
|
||||||
$this->assertFalse(isset($defaultHeader['test2']));
|
$this->assertFalse(isset($defaultHeader['test2']));
|
||||||
|
|
||||||
$pet_api2 = new Swagger\Client\Api\PetApi();
|
$pet_api2 = new Api\PetApi();
|
||||||
$config3 = new Swagger\Client\Configuration();
|
$config3 = new Configuration();
|
||||||
$apiClient3 = new Swagger\Client\ApiClient($config3);
|
$apiClient3 = new ApiClient($config3);
|
||||||
$apiClient3->getConfig()->setUserAgent('api client 3');
|
$apiClient3->getConfig()->setUserAgent('api client 3');
|
||||||
$config4 = new Swagger\Client\Configuration();
|
$config4 = new Configuration();
|
||||||
$apiClient4 = new Swagger\Client\ApiClient($config4);
|
$apiClient4 = new ApiClient($config4);
|
||||||
$apiClient4->getConfig()->setUserAgent('api client 4');
|
$apiClient4->getConfig()->setUserAgent('api client 4');
|
||||||
$pet_api3 = new Swagger\Client\Api\PetApi($apiClient3);
|
$pet_api3 = new Api\PetApi($apiClient3);
|
||||||
|
|
||||||
// 2 different api clients are not the same
|
// 2 different api clients are not the same
|
||||||
$this->assertNotEquals($apiClient3, $apiClient4);
|
$this->assertNotEquals($apiClient3, $apiClient4);
|
||||||
@ -98,7 +111,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
// initialize the API client without host
|
// initialize the API client without host
|
||||||
$pet_id = 10005; // ID of pet that needs to be fetched
|
$pet_id = 10005; // ID of pet that needs to be fetched
|
||||||
$pet_api = new Swagger\Client\Api\PetApi();
|
$pet_api = new Api\PetApi();
|
||||||
$pet_api->getApiClient()->getConfig()->setApiKey('api_key', '111222333444555');
|
$pet_api->getApiClient()->getConfig()->setApiKey('api_key', '111222333444555');
|
||||||
// return Pet (model)
|
// return Pet (model)
|
||||||
$response = $pet_api->getPetById($pet_id);
|
$response = $pet_api->getPetById($pet_id);
|
||||||
@ -111,7 +124,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertSame($response->getTags()[0]->getName(), 'test php tag');
|
$this->assertSame($response->getTags()[0]->getName(), 'test php tag');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* comment out as we've removed invalid endpoints from the spec, we'll introduce something
|
* comment out as we've removed invalid endpoints from the spec, we'll introduce something
|
||||||
* similar in the future when we've time to update the petstore server
|
* similar in the future when we've time to update the petstore server
|
||||||
*
|
*
|
||||||
@ -120,7 +133,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
// initialize the API client without host
|
// initialize the API client without host
|
||||||
$pet_id = 10005; // ID of pet that needs to be fetched
|
$pet_id = 10005; // ID of pet that needs to be fetched
|
||||||
$pet_api = new Swagger\Client\Api\PetApi();
|
$pet_api = new Api\PetApi();
|
||||||
$pet_api->getApiClient()->getConfig()->setApiKey('api_key', '111222333444555');
|
$pet_api->getApiClient()->getConfig()->setApiKey('api_key', '111222333444555');
|
||||||
// return Pet (inline model)
|
// return Pet (inline model)
|
||||||
$response = $pet_api->getPetByIdInObject($pet_id);
|
$response = $pet_api->getPetByIdInObject($pet_id);
|
||||||
@ -144,7 +157,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
// initialize the API client without host
|
// initialize the API client without host
|
||||||
$pet_id = 10005; // ID of pet that needs to be fetched
|
$pet_id = 10005; // ID of pet that needs to be fetched
|
||||||
$pet_api = new Swagger\Client\Api\PetApi();
|
$pet_api = new Api\PetApi();
|
||||||
$pet_api->getApiClient()->getConfig()->setApiKey('api_key', '111222333444555');
|
$pet_api->getApiClient()->getConfig()->setApiKey('api_key', '111222333444555');
|
||||||
// return Pet (model)
|
// return Pet (model)
|
||||||
list($response, $status_code, $response_headers) = $pet_api->getPetByIdWithHttpInfo($pet_id);
|
list($response, $status_code, $response_headers) = $pet_api->getPetByIdWithHttpInfo($pet_id);
|
||||||
@ -162,9 +175,9 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testFindPetByStatus()
|
public function testFindPetByStatus()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// return Pet (model)
|
// return Pet (model)
|
||||||
$response = $pet_api->findPetsByStatus("available");
|
$response = $pet_api->findPetsByStatus("available");
|
||||||
$this->assertGreaterThan(0, count($response)); // at least one object returned
|
$this->assertGreaterThan(0, count($response)); // at least one object returned
|
||||||
@ -182,9 +195,9 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testFindPetsByTags()
|
public function testFindPetsByTags()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// return Pet (model)
|
// return Pet (model)
|
||||||
$response = $pet_api->findPetsByTags("test php tag");
|
$response = $pet_api->findPetsByTags("test php tag");
|
||||||
$this->assertGreaterThan(0, count($response)); // at least one object returned
|
$this->assertGreaterThan(0, count($response)); // at least one object returned
|
||||||
@ -202,19 +215,19 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testUpdatePet()
|
public function testUpdatePet()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$pet_id = 10001; // ID of pet that needs to be fetched
|
$pet_id = 10001; // ID of pet that needs to be fetched
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// create updated pet object
|
// create updated pet object
|
||||||
$updated_pet = new Swagger\Client\Model\Pet;
|
$updated_pet = new Model\Pet;
|
||||||
$updated_pet->setId($pet_id);
|
$updated_pet->setId($pet_id);
|
||||||
$updated_pet->setName('updatePet'); // new name
|
$updated_pet->setName('updatePet'); // new name
|
||||||
$updated_pet->setStatus('pending'); // new status
|
$updated_pet->setStatus('pending'); // new status
|
||||||
// update Pet (model/json)
|
// update Pet (model/json)
|
||||||
$update_response = $pet_api->updatePet($updated_pet);
|
$update_response = $pet_api->updatePet($updated_pet);
|
||||||
// return nothing (void)
|
// return nothing (void)
|
||||||
$this->assertSame($update_response, NULL);
|
$this->assertSame($update_response, null);
|
||||||
// verify updated Pet
|
// verify updated Pet
|
||||||
$response = $pet_api->getPetById($pet_id);
|
$response = $pet_api->getPetById($pet_id);
|
||||||
$this->assertSame($response->getId(), $pet_id);
|
$this->assertSame($response->getId(), $pet_id);
|
||||||
@ -226,12 +239,15 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testUpdatePetWithFormWithHttpInfo()
|
public function testUpdatePetWithFormWithHttpInfo()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$pet_id = 10001; // ID of pet that needs to be fetched
|
$pet_id = 10001; // ID of pet that needs to be fetched
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// update Pet (form)
|
// update Pet (form)
|
||||||
list($update_response, $status_code, $http_headers) = $pet_api->updatePetWithFormWithHttpInfo($pet_id, 'update pet with form with http info');
|
list($update_response, $status_code, $http_headers) = $pet_api->updatePetWithFormWithHttpInfo(
|
||||||
|
$pet_id,
|
||||||
|
'update pet with form with http info'
|
||||||
|
);
|
||||||
// return nothing (void)
|
// return nothing (void)
|
||||||
$this->assertNull($update_response);
|
$this->assertNull($update_response);
|
||||||
$this->assertSame($status_code, 200);
|
$this->assertSame($status_code, 200);
|
||||||
@ -245,14 +261,14 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testUpdatePetWithForm()
|
public function testUpdatePetWithForm()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$pet_id = 10001; // ID of pet that needs to be fetched
|
$pet_id = 10001; // ID of pet that needs to be fetched
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// update Pet (form)
|
// update Pet (form)
|
||||||
$update_response = $pet_api->updatePetWithForm($pet_id, 'update pet with form', 'sold');
|
$update_response = $pet_api->updatePetWithForm($pet_id, 'update pet with form', 'sold');
|
||||||
// return nothing (void)
|
// return nothing (void)
|
||||||
$this->assertSame($update_response, NULL);
|
$this->assertSame($update_response, null);
|
||||||
$response = $pet_api->getPetById($pet_id);
|
$response = $pet_api->getPetById($pet_id);
|
||||||
$this->assertSame($response->getId(), $pet_id);
|
$this->assertSame($response->getId(), $pet_id);
|
||||||
$this->assertSame($response->getName(), 'update pet with form');
|
$this->assertSame($response->getName(), 'update pet with form');
|
||||||
@ -263,17 +279,17 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testAddPet()
|
public function testAddPet()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$new_pet_id = 10005;
|
$new_pet_id = 10005;
|
||||||
$new_pet = new Swagger\Client\Model\Pet;
|
$new_pet = new Model\Pet;
|
||||||
$new_pet->setId($new_pet_id);
|
$new_pet->setId($new_pet_id);
|
||||||
$new_pet->setName("PHP Unit Test 2");
|
$new_pet->setName("PHP Unit Test 2");
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// add a new pet (model)
|
// add a new pet (model)
|
||||||
$add_response = $pet_api->addPet($new_pet);
|
$add_response = $pet_api->addPet($new_pet);
|
||||||
// return nothing (void)
|
// return nothing (void)
|
||||||
$this->assertSame($add_response, NULL);
|
$this->assertSame($add_response, null);
|
||||||
// verify added Pet
|
// verify added Pet
|
||||||
$response = $pet_api->getPetById($new_pet_id);
|
$response = $pet_api->getPetById($new_pet_id);
|
||||||
$this->assertSame($response->getId(), $new_pet_id);
|
$this->assertSame($response->getId(), $new_pet_id);
|
||||||
@ -288,28 +304,28 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testAddPetUsingByteArray()
|
public function testAddPetUsingByteArray()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
|
|
||||||
$new_pet_id = 10005;
|
$new_pet_id = 10005;
|
||||||
$new_pet = new Swagger\Client\Model\Pet;
|
$new_pet = new Model\Pet;
|
||||||
$new_pet->setId($new_pet_id);
|
$new_pet->setId($new_pet_id);
|
||||||
$new_pet->setName("PHP Unit Test 3");
|
$new_pet->setName("PHP Unit Test 3");
|
||||||
// new tag
|
// new tag
|
||||||
$tag= new Swagger\Client\Model\Tag;
|
$tag= new Model\Tag;
|
||||||
$tag->setId($new_pet_id); // use the same id as pet
|
$tag->setId($new_pet_id); // use the same id as pet
|
||||||
$tag->setName("test php tag");
|
$tag->setName("test php tag");
|
||||||
// new category
|
// new category
|
||||||
$category = new Swagger\Client\Model\Category;
|
$category = new Model\Category;
|
||||||
$category->setId($new_pet_id); // use the same id as pet
|
$category->setId($new_pet_id); // use the same id as pet
|
||||||
$category->setName("test php category");
|
$category->setName("test php category");
|
||||||
|
|
||||||
$new_pet->setTags(array($tag));
|
$new_pet->setTags(array($tag));
|
||||||
$new_pet->setCategory($category);
|
$new_pet->setCategory($category);
|
||||||
|
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// add a new pet (model)
|
// add a new pet (model)
|
||||||
$object_serializer = new Swagger\Client\ObjectSerializer();
|
$object_serializer = new ObjectSerializer();
|
||||||
$pet_json_string = json_encode($object_serializer->sanitizeForSerialization($new_pet));
|
$pet_json_string = json_encode($object_serializer->sanitizeForSerialization($new_pet));
|
||||||
$add_response = $pet_api->addPetUsingByteArray($pet_json_string);
|
$add_response = $pet_api->addPetUsingByteArray($pet_json_string);
|
||||||
// return nothing (void)
|
// return nothing (void)
|
||||||
@ -325,9 +341,9 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testUploadFile()
|
public function testUploadFile()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// upload file
|
// upload file
|
||||||
$pet_id = 10001;
|
$pet_id = 10001;
|
||||||
$response = $pet_api->uploadFile($pet_id, "test meta", "./composer.json");
|
$response = $pet_api->uploadFile($pet_id, "test meta", "./composer.json");
|
||||||
@ -340,10 +356,10 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testGetInventory()
|
public function testGetInventory()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = new Swagger\Client\Configuration();
|
$config = new Configuration();
|
||||||
$config->setHost('http://petstore.swagger.io/v2');
|
$config->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\APIClient($config);
|
$api_client = new APIClient($config);
|
||||||
$store_api = new Swagger\Client\Api\StoreApi($api_client);
|
$store_api = new Api\StoreApi($api_client);
|
||||||
// get inventory
|
// get inventory
|
||||||
$get_response = $store_api->getInventory();
|
$get_response = $store_api->getInventory();
|
||||||
|
|
||||||
@ -359,10 +375,10 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testGetPetByIdWithByteArray()
|
public function testGetPetByIdWithByteArray()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = new Swagger\Client\Configuration();
|
$config = new Configuration();
|
||||||
$config->setHost('http://petstore.swagger.io/v2');
|
$config->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\APIClient($config);
|
$api_client = new APIClient($config);
|
||||||
$pet_api = new Swagger\Client\Api\PetApi($api_client);
|
$pet_api = new Api\PetApi($api_client);
|
||||||
// test getPetByIdWithByteArray
|
// test getPetByIdWithByteArray
|
||||||
$pet_id = 10005;
|
$pet_id = 10005;
|
||||||
$bytes = $pet_api->petPetIdtestingByteArraytrueGet($pet_id);
|
$bytes = $pet_api->petPetIdtestingByteArraytrueGet($pet_id);
|
||||||
@ -383,7 +399,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
// test empty object serialization
|
// test empty object serialization
|
||||||
public function testEmptyPetSerialization()
|
public function testEmptyPetSerialization()
|
||||||
{
|
{
|
||||||
$new_pet = new Swagger\Client\Model\Pet;
|
$new_pet = new Model\Pet;
|
||||||
// the empty object should be serialised to {}
|
// the empty object should be serialised to {}
|
||||||
$this->assertSame("{}", "$new_pet");
|
$this->assertSame("{}", "$new_pet");
|
||||||
|
|
||||||
@ -392,7 +408,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
// test inheritance in the model
|
// test inheritance in the model
|
||||||
public function testInheritance()
|
public function testInheritance()
|
||||||
{
|
{
|
||||||
$new_dog = new Swagger\Client\Model\Dog;
|
$new_dog = new Model\Dog;
|
||||||
// the object should be an instance of the derived class
|
// the object should be an instance of the derived class
|
||||||
$this->assertInstanceOf('Swagger\Client\Model\Dog', $new_dog);
|
$this->assertInstanceOf('Swagger\Client\Model\Dog', $new_dog);
|
||||||
// the object should also be an instance of the parent class
|
// the object should also be an instance of the parent class
|
||||||
@ -408,7 +424,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
'class_name' => 'Dog',
|
'class_name' => 'Dog',
|
||||||
'breed' => 'Great Dane'
|
'breed' => 'Great Dane'
|
||||||
);
|
);
|
||||||
$new_dog = new Swagger\Client\Model\Dog($data);
|
$new_dog = new Model\Dog($data);
|
||||||
|
|
||||||
// the property on the derived class should be set
|
// the property on the derived class should be set
|
||||||
$this->assertSame('Great Dane', $new_dog->getBreed());
|
$this->assertSame('Great Dane', $new_dog->getBreed());
|
||||||
@ -419,7 +435,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
// test if discriminator is initialized automatically
|
// test if discriminator is initialized automatically
|
||||||
public function testDiscriminatorInitialization()
|
public function testDiscriminatorInitialization()
|
||||||
{
|
{
|
||||||
$new_dog = new Swagger\Client\Model\Dog();
|
$new_dog = new Model\Dog();
|
||||||
$this->assertSame('Dog', $new_dog->getClassName());
|
$this->assertSame('Dog', $new_dog->getClassName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,13 +444,13 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
// create an AnimalFarm which is an object implementing the
|
// create an AnimalFarm which is an object implementing the
|
||||||
// ArrayAccess interface
|
// ArrayAccess interface
|
||||||
$farm = new Swagger\Client\Model\AnimalFarm();
|
$farm = new Model\AnimalFarm();
|
||||||
|
|
||||||
// add some animals to the farm to make sure the ArrayAccess
|
// add some animals to the farm to make sure the ArrayAccess
|
||||||
// interface works
|
// interface works
|
||||||
$farm[] = new Swagger\Client\Model\Dog();
|
$farm[] = new Model\Dog();
|
||||||
$farm[] = new Swagger\Client\Model\Cat();
|
$farm[] = new Model\Cat();
|
||||||
$farm[] = new Swagger\Client\Model\Animal();
|
$farm[] = new Model\Animal();
|
||||||
|
|
||||||
// assert we can look up the animals in the farm by array
|
// assert we can look up the animals in the farm by array
|
||||||
// indices (let's try a random order)
|
// indices (let's try a random order)
|
||||||
@ -455,16 +471,12 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
// add some animals to the farm to make sure the ArrayAccess
|
// add some animals to the farm to make sure the ArrayAccess
|
||||||
// interface works
|
// interface works
|
||||||
$dog = new Swagger\Client\Model\Dog();
|
$dog = new Model\Dog();
|
||||||
$animal = new Swagger\Client\Model\Animal();
|
$animal = new Model\Animal();
|
||||||
|
|
||||||
// assert we can look up the animals in the farm by array
|
// assert we can look up the animals in the farm by array
|
||||||
// indices (let's try a random order)
|
// indices (let's try a random order)
|
||||||
$this->assertSame('red', $dog->getColor());
|
$this->assertSame('red', $dog->getColor());
|
||||||
$this->assertSame('red', $animal->getColor());
|
$this->assertSame('red', $animal->getColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
@ -1,34 +1,35 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('autoload.php');
|
namespace Swagger\Client;
|
||||||
|
|
||||||
class StoreApiTest extends \PHPUnit_Framework_TestCase
|
class StoreApiTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
// for error reporting (need to run with php5.3 to get no warning)
|
// for error reporting (need to run with php5.3 to get no warning)
|
||||||
//ini_set('display_errors', 1);
|
//ini_set('display_errors', 1);
|
||||||
//error_reporting(~0);
|
//error_reporting(~0);
|
||||||
// new pet
|
// new pet
|
||||||
$new_pet_id = 10005;
|
$new_pet_id = 10005;
|
||||||
$new_pet = new Swagger\Client\Model\Pet;
|
$new_pet = new Model\Pet;
|
||||||
$new_pet->setId($new_pet_id);
|
$new_pet->setId($new_pet_id);
|
||||||
$new_pet->setName("PHP Unit Test");
|
$new_pet->setName("PHP Unit Test");
|
||||||
$new_pet->setStatus("available");
|
$new_pet->setStatus("available");
|
||||||
// new tag
|
// new tag
|
||||||
$tag= new Swagger\Client\Model\Tag;
|
$tag= new Model\Tag;
|
||||||
$tag->setId($new_pet_id); // use the same id as pet
|
$tag->setId($new_pet_id); // use the same id as pet
|
||||||
$tag->setName("test php tag");
|
$tag->setName("test php tag");
|
||||||
// new category
|
// new category
|
||||||
$category = new Swagger\Client\Model\Category;
|
$category = new Model\Category;
|
||||||
$category->setId($new_pet_id); // use the same id as pet
|
$category->setId($new_pet_id); // use the same id as pet
|
||||||
$category->setName("test php category");
|
$category->setName("test php category");
|
||||||
|
|
||||||
$new_pet->setTags(array($tag));
|
$new_pet->setTags(array($tag));
|
||||||
$new_pet->setCategory($category);
|
$new_pet->setCategory($category);
|
||||||
|
|
||||||
$pet_api = new Swagger\Client\Api\PetAPI();
|
$pet_api = new Api\PetAPI();
|
||||||
// add a new pet (model)
|
// add a new pet (model)
|
||||||
$add_response = $pet_api->addPet($new_pet);
|
$add_response = $pet_api->addPet($new_pet);
|
||||||
}
|
}
|
||||||
@ -37,9 +38,9 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testGetInventory()
|
public function testGetInventory()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$store_api = new Swagger\Client\Api\StoreApi($api_client);
|
$store_api = new Api\StoreApi($api_client);
|
||||||
// get inventory
|
// get inventory
|
||||||
$get_response = $store_api->getInventory();
|
$get_response = $store_api->getInventory();
|
||||||
|
|
||||||
@ -55,9 +56,9 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testGetInventoryInObject()
|
public function testGetInventoryInObject()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
//$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
//$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient();
|
$api_client = new ApiClient();
|
||||||
$store_api = new Swagger\Client\Api\StoreApi($api_client);
|
$store_api = new Api\StoreApi($api_client);
|
||||||
// get inventory
|
// get inventory
|
||||||
$get_response = $store_api->getInventoryInObject();
|
$get_response = $store_api->getInventoryInObject();
|
||||||
|
|
||||||
@ -65,8 +66,4 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertInternalType("int", $get_response['available']);
|
$this->assertInternalType("int", $get_response['available']);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('autoload.php');
|
namespace Swagger\Client;
|
||||||
|
|
||||||
class UserApiTest extends \PHPUnit_Framework_TestCase
|
class UserApiTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
// add a new pet (id 10005) to ensure the pet object is available for all the tests
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass()
|
||||||
|
{
|
||||||
// for error reporting (need to run with php5.3 to get no warning)
|
// for error reporting (need to run with php5.3 to get no warning)
|
||||||
//ini_set('display_errors', 1);
|
//ini_set('display_errors', 1);
|
||||||
//error_reporting(~0);
|
//error_reporting(~0);
|
||||||
@ -16,18 +17,18 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testLoginUser()
|
public function testLoginUser()
|
||||||
{
|
{
|
||||||
// initialize the API client
|
// initialize the API client
|
||||||
$config = (new Swagger\Client\Configuration())->setHost('http://petstore.swagger.io/v2');
|
$config = (new Configuration())->setHost('http://petstore.swagger.io/v2');
|
||||||
$api_client = new Swagger\Client\ApiClient($config);
|
$api_client = new ApiClient($config);
|
||||||
$user_api = new Swagger\Client\Api\UserApi($api_client);
|
$user_api = new Api\UserApi($api_client);
|
||||||
// login
|
// login
|
||||||
$response = $user_api->loginUser("xxxxx", "yyyyyyyy");
|
$response = $user_api->loginUser("xxxxx", "yyyyyyyy");
|
||||||
|
|
||||||
$this->assertInternalType("string", $response);
|
$this->assertInternalType("string", $response);
|
||||||
$this->assertRegExp("/^logged in user session/", $response, "response string starts with 'logged in user session'");
|
$this->assertRegExp(
|
||||||
|
"/^logged in user session/",
|
||||||
|
$response,
|
||||||
|
"response string starts with 'logged in user session'"
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user