Update PHP samples with OAS2 before enabling CI test (#230)

* update php samples with oas2 before enabling ci test

* deleted unused php files
This commit is contained in:
William Cheng 2018-04-26 13:17:16 +08:00 committed by GitHub
parent e2d4f5b5ca
commit e1a0355398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
68 changed files with 75 additions and 2002 deletions

View File

@ -117,7 +117,6 @@ Class | Method | HTTP request | Description
- [AdditionalPropertiesClass](docs/Model/AdditionalPropertiesClass.md)
- [Animal](docs/Model/Animal.md)
- [AnimalFarm](docs/Model/AnimalFarm.md)
- [ApiResponse](docs/Model/ApiResponse.md)
- [ArrayOfArrayOfNumberOnly](docs/Model/ArrayOfArrayOfNumberOnly.md)
- [ArrayOfNumberOnly](docs/Model/ArrayOfNumberOnly.md)
@ -141,11 +140,8 @@ Class | Method | HTTP request | Description
- [Name](docs/Model/Name.md)
- [NumberOnly](docs/Model/NumberOnly.md)
- [Order](docs/Model/Order.md)
- [OuterBoolean](docs/Model/OuterBoolean.md)
- [OuterComposite](docs/Model/OuterComposite.md)
- [OuterEnum](docs/Model/OuterEnum.md)
- [OuterNumber](docs/Model/OuterNumber.md)
- [OuterString](docs/Model/OuterString.md)
- [Pet](docs/Model/Pet.md)
- [ReadOnlyFirst](docs/Model/ReadOnlyFirst.md)
- [SpecialModelName](docs/Model/SpecialModelName.md)

View File

@ -1,11 +0,0 @@
# Animal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **string** | |
**color** | **string** | | [optional] [default to 'red']
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,9 +0,0 @@
# AnimalFarm
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,57 +0,0 @@
# Swagger\Client\DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testBodyWithQueryParams**](DefaultApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
# **testBodyWithQueryParams**
> testBodyWithQueryParams($body, $query)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User |
$query = "query_example"; // string |
try {
$apiInstance->testBodyWithQueryParams($body, $query);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->testBodyWithQueryParams: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\User**](../Model/User.md)| |
**query** | **string**| |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

View File

@ -17,7 +17,7 @@ Method | HTTP request | Description
# **fakeOuterBooleanSerialize**
> \Swagger\Client\Model\OuterBoolean fakeOuterBooleanSerialize($boolean_post_body)
> bool fakeOuterBooleanSerialize($boolean_post_body)
@ -52,7 +52,7 @@ Name | Type | Description | Notes
### Return type
[**\Swagger\Client\Model\OuterBoolean**](../Model/OuterBoolean.md)
**bool**
### Authorization
@ -115,7 +115,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **fakeOuterNumberSerialize**
> \Swagger\Client\Model\OuterNumber fakeOuterNumberSerialize($body)
> float fakeOuterNumberSerialize($body)
@ -150,7 +150,7 @@ Name | Type | Description | Notes
### Return type
[**\Swagger\Client\Model\OuterNumber**](../Model/OuterNumber.md)
**float**
### Authorization
@ -164,7 +164,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **fakeOuterStringSerialize**
> \Swagger\Client\Model\OuterString fakeOuterStringSerialize($body)
> string fakeOuterStringSerialize($body)
@ -199,7 +199,7 @@ Name | Type | Description | Notes
### Return type
[**\Swagger\Client\Model\OuterString**](../Model/OuterString.md)
**string**
### Authorization

View File

@ -1,57 +0,0 @@
# Swagger\Client\Fake_classname_tags123Api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testClassname**](Fake_classname_tags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
# **testClassname**
> \Swagger\Client\Model\Client testClassname($body)
To test class name in snake case
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key_query
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key_query', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key_query', 'Bearer');
$api_instance = new Swagger\Client\Api\Fake_classname_tags123Api(new \Http\Adapter\Guzzle6\Client());
$body = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model
try {
$result = $api_instance->testClassname($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling Fake_classname_tags123Api->testClassname: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Client**](../Model/Client.md)| client model |
### Return type
[**\Swagger\Client\Model\Client**](../Model/Client.md)
### Authorization
[api_key_query](../../README.md#api_key_query)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

View File

@ -1,12 +0,0 @@
# ApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **int** | | [optional]
**type** | **string** | | [optional]
**message** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,10 +0,0 @@
# Cat
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **bool** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,11 +0,0 @@
# Category
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,10 +0,0 @@
# Dog
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,9 +0,0 @@
# EnumClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,12 +0,0 @@
# EnumTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enum_string** | **string** | | [optional]
**enum_integer** | **int** | | [optional]
**enum_number** | **double** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,22 +0,0 @@
# FormatTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **int** | | [optional]
**int32** | **int** | | [optional]
**int64** | **int** | | [optional]
**number** | **float** | |
**float** | **float** | | [optional]
**double** | **double** | | [optional]
**string** | **string** | | [optional]
**byte** | **string** | |
**binary** | **string** | | [optional]
**date** | [**\DateTime**](Date.md) | |
**date_time** | [**\DateTime**](\DateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,9 +0,0 @@
# AnimalFarm
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,11 +0,0 @@
# DefaultError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | **string** | | [optional]
**code** | **float** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,11 +0,0 @@
# Error
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | **string** | | [optional]
**code** | **float** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,9 +0,0 @@
# OuterBoolean
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**my_number** | [**\Swagger\Client\Model\OuterNumber**](OuterNumber.md) | | [optional]
**my_string** | [**\Swagger\Client\Model\OuterString**](OuterString.md) | | [optional]
**my_boolean** | [**\Swagger\Client\Model\OuterBoolean**](OuterBoolean.md) | | [optional]
**my_number** | **float** | | [optional]
**my_string** | **string** | | [optional]
**my_boolean** | **bool** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,9 +0,0 @@
# OuterNumber
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,9 +0,0 @@
# OuterString
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,10 +0,0 @@
# Model200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,10 +0,0 @@
# ModelReturn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**return** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,13 +0,0 @@
# Name
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | |
**snake_case** | **int** | | [optional]
**property** | **string** | | [optional]
**_123_number** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,15 +0,0 @@
# Order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**pet_id** | **int** | | [optional]
**quantity** | **int** | | [optional]
**ship_date** | [**\DateTime**](\DateTime.md) | | [optional]
**status** | **string** | Order Status | [optional]
**complete** | **bool** | | [optional] [default to false]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,15 +0,0 @@
# Pet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**category** | [**\Swagger\Client\Model\Category**](Category.md) | | [optional]
**name** | **string** | |
**photo_urls** | **string[]** | |
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**status** | **string** | pet status in the store | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,10 +0,0 @@
# SpecialModelName
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**special_property_name** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,11 +0,0 @@
# Tag
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,17 +0,0 @@
# User
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**username** | **string** | | [optional]
**first_name** | **string** | | [optional]
**last_name** | **string** | | [optional]
**email** | **string** | | [optional]
**password** | **string** | | [optional]
**phone** | **string** | | [optional]
**user_status** | **int** | User Status | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -94,7 +94,7 @@ class FakeApi
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Swagger\Client\Model\OuterBoolean
* @return bool
*/
public function fakeOuterBooleanSerialize($boolean_post_body = null)
{
@ -109,11 +109,11 @@ class FakeApi
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Swagger\Client\Model\OuterBoolean, HTTP status code, HTTP response headers (array of strings)
* @return array of bool, HTTP status code, HTTP response headers (array of strings)
*/
public function fakeOuterBooleanSerializeWithHttpInfo($boolean_post_body = null)
{
$returnType = '\Swagger\Client\Model\OuterBoolean';
$returnType = 'bool';
$request = $this->fakeOuterBooleanSerializeRequest($boolean_post_body);
try {
@ -165,7 +165,7 @@ class FakeApi
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\OuterBoolean',
'bool',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@ -207,7 +207,7 @@ class FakeApi
*/
public function fakeOuterBooleanSerializeAsyncWithHttpInfo($boolean_post_body = null)
{
$returnType = '\Swagger\Client\Model\OuterBoolean';
$returnType = 'bool';
$request = $this->fakeOuterBooleanSerializeRequest($boolean_post_body);
return $this->client
@ -588,7 +588,7 @@ class FakeApi
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Swagger\Client\Model\OuterNumber
* @return float
*/
public function fakeOuterNumberSerialize($body = null)
{
@ -603,11 +603,11 @@ class FakeApi
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Swagger\Client\Model\OuterNumber, HTTP status code, HTTP response headers (array of strings)
* @return array of float, HTTP status code, HTTP response headers (array of strings)
*/
public function fakeOuterNumberSerializeWithHttpInfo($body = null)
{
$returnType = '\Swagger\Client\Model\OuterNumber';
$returnType = 'float';
$request = $this->fakeOuterNumberSerializeRequest($body);
try {
@ -659,7 +659,7 @@ class FakeApi
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\OuterNumber',
'float',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@ -701,7 +701,7 @@ class FakeApi
*/
public function fakeOuterNumberSerializeAsyncWithHttpInfo($body = null)
{
$returnType = '\Swagger\Client\Model\OuterNumber';
$returnType = 'float';
$request = $this->fakeOuterNumberSerializeRequest($body);
return $this->client
@ -835,7 +835,7 @@ class FakeApi
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Swagger\Client\Model\OuterString
* @return string
*/
public function fakeOuterStringSerialize($body = null)
{
@ -850,11 +850,11 @@ class FakeApi
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Swagger\Client\Model\OuterString, HTTP status code, HTTP response headers (array of strings)
* @return array of string, HTTP status code, HTTP response headers (array of strings)
*/
public function fakeOuterStringSerializeWithHttpInfo($body = null)
{
$returnType = '\Swagger\Client\Model\OuterString';
$returnType = 'string';
$request = $this->fakeOuterStringSerializeRequest($body);
try {
@ -906,7 +906,7 @@ class FakeApi
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\OuterString',
'string',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@ -948,7 +948,7 @@ class FakeApi
*/
public function fakeOuterStringSerializeAsyncWithHttpInfo($body = null)
{
$returnType = '\Swagger\Client\Model\OuterString';
$returnType = 'string';
$request = $this->fakeOuterStringSerializeRequest($body);
return $this->client
@ -2152,6 +2152,9 @@ class FakeApi
$multipart = false;
// query params
if (is_array($enum_query_string_array)) {
$enum_query_string_array = ObjectSerializer::serializeCollection($enum_query_string_array, 'csv', true);
}
if ($enum_query_string_array !== null) {
$queryParams['enum_query_string_array'] = ObjectSerializer::toQueryValue($enum_query_string_array);
}
@ -2168,6 +2171,9 @@ class FakeApi
$queryParams['enum_query_double'] = ObjectSerializer::toQueryValue($enum_query_double);
}
// header params
if (is_array($enum_header_string_array)) {
$enum_header_string_array = ObjectSerializer::serializeCollection($enum_header_string_array, 'csv');
}
if ($enum_header_string_array !== null) {
$headerParams['enum_header_string_array'] = ObjectSerializer::toHeaderValue($enum_header_string_array);
}

View File

@ -738,6 +738,9 @@ class PetApi
$multipart = false;
// query params
if (is_array($status)) {
$status = ObjectSerializer::serializeCollection($status, 'csv', true);
}
if ($status !== null) {
$queryParams['status'] = ObjectSerializer::toQueryValue($status);
}
@ -1000,6 +1003,9 @@ class PetApi
$multipart = false;
// query params
if (is_array($tags)) {
$tags = ObjectSerializer::serializeCollection($tags, 'csv', true);
}
if ($tags !== null) {
$queryParams['tags'] = ObjectSerializer::toQueryValue($tags);
}

View File

@ -206,8 +206,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -213,11 +213,7 @@ class Animal implements ModelInterface, ArrayAccess
*/
public function valid()
{
if ($this->container['class_name'] === null) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -1,280 +0,0 @@
<?php
/**
* AnimalFarm
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* AnimalFarm Class Doc Comment
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AnimalFarm implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'AnimalFarm';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = parent::listInvalidProperties();
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
if (!parent::valid()) {
return false;
}
return true;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -212,8 +212,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -200,8 +200,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -200,8 +200,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -212,8 +212,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -230,8 +230,7 @@ class Capitalization implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -194,11 +194,7 @@ class Cat extends Animal
*/
public function valid()
{
if (!parent::valid()) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -206,8 +206,7 @@ class Category implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -201,8 +201,7 @@ class ClassModel implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -200,8 +200,7 @@ class Client implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -194,11 +194,7 @@ class Dog extends Animal
*/
public function valid()
{
if (!parent::valid()) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -244,12 +244,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
*/
public function valid()
{
$allowedValues = $this->getJustSymbolAllowableValues();
if (!is_null($this->container['just_symbol']) && !in_array($this->container['just_symbol'], $allowedValues, true)) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -323,27 +323,7 @@ class EnumTest implements ModelInterface, ArrayAccess
*/
public function valid()
{
$allowedValues = $this->getEnumStringAllowableValues();
if (!is_null($this->container['enum_string']) && !in_array($this->container['enum_string'], $allowedValues, true)) {
return false;
}
if ($this->container['enum_string_required'] === null) {
return false;
}
$allowedValues = $this->getEnumStringRequiredAllowableValues();
if (!is_null($this->container['enum_string_required']) && !in_array($this->container['enum_string_required'], $allowedValues, true)) {
return false;
}
$allowedValues = $this->getEnumIntegerAllowableValues();
if (!is_null($this->container['enum_integer']) && !in_array($this->container['enum_integer'], $allowedValues, true)) {
return false;
}
$allowedValues = $this->getEnumNumberAllowableValues();
if (!is_null($this->container['enum_number']) && !in_array($this->container['enum_number'], $allowedValues, true)) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -340,62 +340,7 @@ class FormatTest implements ModelInterface, ArrayAccess
*/
public function valid()
{
if ($this->container['integer'] > 100) {
return false;
}
if ($this->container['integer'] < 10) {
return false;
}
if ($this->container['int32'] > 200) {
return false;
}
if ($this->container['int32'] < 20) {
return false;
}
if ($this->container['number'] === null) {
return false;
}
if ($this->container['number'] > 543.2) {
return false;
}
if ($this->container['number'] < 32.1) {
return false;
}
if ($this->container['float'] > 987.6) {
return false;
}
if ($this->container['float'] < 54.3) {
return false;
}
if ($this->container['double'] > 123.4) {
return false;
}
if ($this->container['double'] < 67.8) {
return false;
}
if (!preg_match("/[a-z]/i", $this->container['string'])) {
return false;
}
if ($this->container['byte'] === null) {
return false;
}
if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['byte'])) {
return false;
}
if ($this->container['date'] === null) {
return false;
}
if ($this->container['password'] === null) {
return false;
}
if (mb_strlen($this->container['password']) > 64) {
return false;
}
if (mb_strlen($this->container['password']) < 10) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -206,8 +206,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -221,8 +221,7 @@ class MapTest implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -212,8 +212,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -207,8 +207,7 @@ class Model200Response implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -200,8 +200,7 @@ class ModelList implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -201,8 +201,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -222,11 +222,7 @@ class Name implements ModelInterface, ArrayAccess
*/
public function valid()
{
if ($this->container['name'] === null) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -200,8 +200,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -255,12 +255,7 @@ class Order implements ModelInterface, ArrayAccess
*/
public function valid()
{
$allowedValues = $this->getStatusAllowableValues();
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -1,277 +0,0 @@
<?php
/**
* OuterBoolean
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* OuterBoolean Class Doc Comment
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class OuterBoolean implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'OuterBoolean';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return true;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -57,9 +57,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
* @var string[]
*/
protected static $swaggerTypes = [
'my_number' => '\Swagger\Client\Model\OuterNumber',
'my_string' => '\Swagger\Client\Model\OuterString',
'my_boolean' => '\Swagger\Client\Model\OuterBoolean'
'my_number' => 'float',
'my_string' => 'string',
'my_boolean' => 'bool'
];
/**
@ -212,15 +212,14 @@ class OuterComposite implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets my_number
*
* @return \Swagger\Client\Model\OuterNumber
* @return float
*/
public function getMyNumber()
{
@ -230,7 +229,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_number
*
* @param \Swagger\Client\Model\OuterNumber $my_number my_number
* @param float $my_number my_number
*
* @return $this
*/
@ -244,7 +243,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Gets my_string
*
* @return \Swagger\Client\Model\OuterString
* @return string
*/
public function getMyString()
{
@ -254,7 +253,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_string
*
* @param \Swagger\Client\Model\OuterString $my_string my_string
* @param string $my_string my_string
*
* @return $this
*/
@ -268,7 +267,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Gets my_boolean
*
* @return \Swagger\Client\Model\OuterBoolean
* @return bool
*/
public function getMyBoolean()
{
@ -278,7 +277,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_boolean
*
* @param \Swagger\Client\Model\OuterBoolean $my_boolean my_boolean
* @param bool $my_boolean my_boolean
*
* @return $this
*/

View File

@ -1,277 +0,0 @@
<?php
/**
* OuterNumber
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* OuterNumber Class Doc Comment
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class OuterNumber implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'OuterNumber';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return true;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -1,277 +0,0 @@
<?php
/**
* OuterString
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Swagger\Client\Model;
use \ArrayAccess;
use \Swagger\Client\ObjectSerializer;
/**
* OuterString Class Doc Comment
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class OuterString implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'OuterString';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return true;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -261,18 +261,7 @@ class Pet implements ModelInterface, ArrayAccess
*/
public function valid()
{
if ($this->container['name'] === null) {
return false;
}
if ($this->container['photo_urls'] === null) {
return false;
}
$allowedValues = $this->getStatusAllowableValues();
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
return false;
}
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -206,8 +206,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -200,8 +200,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -206,8 +206,7 @@ class Tag implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -242,8 +242,7 @@ class User implements ModelInterface, ArrayAccess
*/
public function valid()
{
return true;
return count($this->listInvalidProperties()) === 0;
}

View File

@ -1,78 +0,0 @@
<?php
/**
* AnimalFarmTest
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* 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;
/**
* AnimalFarmTest Class Doc Comment
*
* @category Class
* @description AnimalFarm
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AnimalFarmTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "AnimalFarm"
*/
public function testAnimalFarm()
{
}
}

View File

@ -1,78 +0,0 @@
<?php
/**
* OuterBooleanTest
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* 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;
/**
* OuterBooleanTest Class Doc Comment
*
* @category Class
* @description OuterBoolean
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class OuterBooleanTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "OuterBoolean"
*/
public function testOuterBoolean()
{
}
}

View File

@ -1,78 +0,0 @@
<?php
/**
* OuterNumberTest
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* 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;
/**
* OuterNumberTest Class Doc Comment
*
* @category Class
* @description OuterNumber
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class OuterNumberTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "OuterNumber"
*/
public function testOuterNumber()
{
}
}

View File

@ -1,78 +0,0 @@
<?php
/**
* OuterStringTest
*
* PHP version 5
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.0-SNAPSHOT
*/
/**
* 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;
/**
* OuterStringTest Class Doc Comment
*
* @category Class
* @description OuterString
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class OuterStringTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
{
}
/**
* Setup before running each test case
*/
public function setUp()
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
{
}
/**
* Test "OuterString"
*/
public function testOuterString()
{
}
}