use parameter name as description if not defined (#6557)

This commit is contained in:
wing328 2017-09-24 21:18:49 +08:00 committed by GitHub
parent c501103540
commit 2d44d7f291
41 changed files with 185 additions and 148 deletions

View File

@ -84,7 +84,7 @@ use {{invokerPackage}}\ObjectSerializer;
*
{{/description}}
{{#allParams}}
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
{{/allParams}}
*
* @throws \{{invokerPackage}}\ApiException on non-2xx response

View File

@ -335,7 +335,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
/**
* Sets {{name}}
*
* @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}
* @param {{datatype}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
*
* @return $this
*/

View File

@ -56,14 +56,14 @@ Please follow the [installation procedure](#installation--usage) and then run th
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi();
$body = new \Swagger\Client\Model\OuterBoolean(); // \Swagger\Client\Model\OuterBoolean | Input boolean as post body
$api_instance = new Swagger\Client\Api\AnotherFakeApi();
$body = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model
try {
$result = $api_instance->fakeOuterBooleanSerialize($body);
$result = $api_instance->testSpecialTags($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FakeApi->fakeOuterBooleanSerialize: ', $e->getMessage(), PHP_EOL;
echo 'Exception when calling AnotherFakeApi->testSpecialTags: ', $e->getMessage(), PHP_EOL;
}
?>
@ -75,6 +75,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AnotherFakeApi* | [**testSpecialTags**](docs/Api/AnotherFakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/Api/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/Api/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
*FakeApi* | [**fakeOuterNumberSerialize**](docs/Api/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
@ -83,7 +84,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**testEnumParameters**](docs/Api/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
*FakeApi* | [**testJsonFormData**](docs/Api/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
*Fake_classname_tags123Api* | [**testClassname**](docs/Api/Fake_classname_tags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
*FakeClassnameTags123Api* | [**testClassname**](docs/Api/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
*PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**deletePet**](docs/Api/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/Api/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
@ -104,7 +105,6 @@ Class | Method | HTTP request | Description
*UserApi* | [**loginUser**](docs/Api/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
*UserApi* | [**logoutUser**](docs/Api/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**updateUser**](docs/Api/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
*AnotherfakeApi* | [**testSpecialTags**](docs/Api/AnotherfakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
## Documentation For Models

View File

@ -1,10 +1,10 @@
# Swagger\Client\AnotherfakeApi
# Swagger\Client\AnotherFakeApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testSpecialTags**](AnotherfakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
# **testSpecialTags**
@ -19,14 +19,14 @@ To test special tags
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\AnotherfakeApi(new \Http\Adapter\Guzzle6\Client());
$api_instance = new Swagger\Client\Api\AnotherFakeApi(new \Http\Adapter\Guzzle6\Client());
$body = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model
try {
$result = $api_instance->testSpecialTags($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnotherfakeApi->testSpecialTags: ', $e->getMessage(), PHP_EOL;
echo 'Exception when calling AnotherFakeApi->testSpecialTags: ', $e->getMessage(), PHP_EOL;
}
?>
```

View File

@ -259,7 +259,7 @@ $api_instance = new Swagger\Client\Api\FakeApi(new \Http\Adapter\Guzzle6\Client(
$number = 3.4; // float | None
$double = 1.2; // double | None
$pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None
$byte = "B"; // string | None
$byte = "byte_example"; // string | None
$integer = 56; // int | None
$int32 = 56; // int | None
$int64 = 789; // int | None

View File

@ -87,7 +87,7 @@ This endpoint does not need any parameter.
### Return type
[**map[string,int]**](../Model/map.md)
**map[string,int]**
### Authorization

View File

@ -1,6 +1,6 @@
<?php
/**
* AnotherfakeApi
* AnotherFakeApi
* PHP version 5
*
* @category Class
@ -17,7 +17,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**
@ -39,14 +38,14 @@ use Swagger\Client\HeaderSelector;
use Swagger\Client\ObjectSerializer;
/**
* AnotherfakeApi Class Doc Comment
* AnotherFakeApi Class Doc Comment
*
* @category Class
* @package Swagger\Client
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AnotherfakeApi
class AnotherFakeApi
{
/**
* @var ClientInterface

View File

@ -1533,8 +1533,8 @@ class FakeApi
'Missing the required parameter $pattern_without_delimiter when calling testEndpointParameters'
);
}
if (!preg_match("/^[A-Z].*_/", $pattern_without_delimiter)) {
throw new \InvalidArgumentException("invalid value for \"pattern_without_delimiter\" when calling FakeApi.testEndpointParameters, must conform to the pattern /^[A-Z].*_/.");
if (!preg_match("/^[A-Z].*/", $pattern_without_delimiter)) {
throw new \InvalidArgumentException("invalid value for \"pattern_without_delimiter\" when calling FakeApi.testEndpointParameters, must conform to the pattern /^[A-Z].*/.");
}
// verify the required parameter 'byte' is set

View File

@ -59,8 +59,8 @@ class FakeClassnameTags123Api
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(
ClientInterface $client = null,
@ -85,7 +85,8 @@ class FakeClassnameTags123Api
*
* To test class name in snake case
*
* @param \Swagger\Client\Model\Client $body client model (required)
* @param \Swagger\Client\Model\Client $body client model (required)
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Swagger\Client\Model\Client
@ -101,7 +102,8 @@ class FakeClassnameTags123Api
*
* To test class name in snake case
*
* @param \Swagger\Client\Model\Client $body client model (required)
* @param \Swagger\Client\Model\Client $body client model (required)
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Swagger\Client\Model\Client, HTTP status code, HTTP response headers (array of strings)
@ -127,7 +129,11 @@ class FakeClassnameTags123Api
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
"[$statusCode] Error connecting to the API ({$request->getUri()})",
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
@ -153,7 +159,11 @@ class FakeClassnameTags123Api
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\Client', $e->getResponseHeaders());
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Swagger\Client\Model\Client',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
@ -166,15 +176,19 @@ class FakeClassnameTags123Api
*
* To test class name in snake case
*
* @param \Swagger\Client\Model\Client $body client model (required)
* @param \Swagger\Client\Model\Client $body client model (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function testClassnameAsync($body)
{
return $this->testClassnameAsyncWithHttpInfo($body)->then(function ($response) {
return $response[0];
});
return $this->testClassnameAsyncWithHttpInfo($body)
->then(
function ($response) {
return $response[0];
}
);
}
/**
@ -182,7 +196,8 @@ class FakeClassnameTags123Api
*
* To test class name in snake case
*
* @param \Swagger\Client\Model\Client $body client model (required)
* @param \Swagger\Client\Model\Client $body client model (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
@ -191,38 +206,48 @@ class FakeClassnameTags123Api
$returnType = '\Swagger\Client\Model\Client';
$request = $this->testClassnameRequest($body);
return $this->client->sendAsync($request)->then(function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return $this->client
->sendAsync($request)
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
if ($returnType !== 'string') {
$content = json_decode($content);
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
}, function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
"[$statusCode] Error connecting to the API ({$exception->getRequest()->getUri()})",
$statusCode,
$response->getHeaders(),
$response->getBody()
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
});
}
/**
* Create request for operation 'testClassname'
*
* @param \Swagger\Client\Model\Client $body client model (required)
* @param \Swagger\Client\Model\Client $body client model (required)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
@ -230,7 +255,9 @@ class FakeClassnameTags123Api
{
// verify the required parameter 'body' is set
if ($body === null) {
throw new \InvalidArgumentException('Missing the required parameter $body when calling testClassname');
throw new \InvalidArgumentException(
'Missing the required parameter $body when calling testClassname'
);
}
$resourcePath = '/fake_classname_test';
@ -272,13 +299,15 @@ class FakeClassnameTags123Api
'contents' => $formParamValue
];
}
$httpBody = new MultipartStream($multipartContents); // for HTTP post (form)
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
$httpBody = \GuzzleHttp\Psr7\build_query($formParams); // for HTTP post (form)
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
@ -288,9 +317,6 @@ class FakeClassnameTags123Api
$queryParams['api_key_query'] = $apiKey;
}
$query = \GuzzleHttp\Psr7\build_query($queryParams);
$url = $this->config->getHost() . $resourcePath . ($query ? '?' . $query : '');
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
@ -302,9 +328,10 @@ class FakeClassnameTags123Api
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'PATCH',
$url,
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);

View File

@ -305,7 +305,7 @@ class PetApi
* Deletes a pet
*
* @param int $pet_id Pet id to delete (required)
* @param string $api_key (optional)
* @param string $api_key api_key (optional)
*
* @throws \Swagger\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException

View File

@ -223,7 +223,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Sets map_property
*
* @param map[string,string] $map_property
* @param map[string,string] $map_property map_property
*
* @return $this
*/
@ -247,7 +247,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
/**
* Sets map_of_map_property
*
* @param map[string,map[string,string]] $map_of_map_property
* @param map[string,map[string,string]] $map_of_map_property map_of_map_property
*
* @return $this
*/

View File

@ -233,7 +233,7 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Sets class_name
*
* @param string $class_name
* @param string $class_name class_name
*
* @return $this
*/
@ -257,7 +257,7 @@ class Animal implements ModelInterface, ArrayAccess
/**
* Sets color
*
* @param string $color
* @param string $color color
*
* @return $this
*/

View File

@ -229,7 +229,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Sets code
*
* @param int $code
* @param int $code code
*
* @return $this
*/
@ -253,7 +253,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Sets type
*
* @param string $type
* @param string $type type
*
* @return $this
*/
@ -277,7 +277,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
/**
* Sets message
*
* @param string $message
* @param string $message message
*
* @return $this
*/

View File

@ -217,7 +217,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Sets array_array_number
*
* @param float[][] $array_array_number
* @param float[][] $array_array_number array_array_number
*
* @return $this
*/

View File

@ -217,7 +217,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
/**
* Sets array_number
*
* @param float[] $array_number
* @param float[] $array_number array_number
*
* @return $this
*/

View File

@ -229,7 +229,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Sets array_of_string
*
* @param string[] $array_of_string
* @param string[] $array_of_string array_of_string
*
* @return $this
*/
@ -253,7 +253,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Sets array_array_of_integer
*
* @param int[][] $array_array_of_integer
* @param int[][] $array_array_of_integer array_array_of_integer
*
* @return $this
*/
@ -277,7 +277,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
/**
* Sets array_array_of_model
*
* @param \Swagger\Client\Model\ReadOnlyFirst[][] $array_array_of_model
* @param \Swagger\Client\Model\ReadOnlyFirst[][] $array_array_of_model array_array_of_model
*
* @return $this
*/

View File

@ -247,7 +247,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets small_camel
*
* @param string $small_camel
* @param string $small_camel small_camel
*
* @return $this
*/
@ -271,7 +271,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets capital_camel
*
* @param string $capital_camel
* @param string $capital_camel capital_camel
*
* @return $this
*/
@ -295,7 +295,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets small_snake
*
* @param string $small_snake
* @param string $small_snake small_snake
*
* @return $this
*/
@ -319,7 +319,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets capital_snake
*
* @param string $capital_snake
* @param string $capital_snake capital_snake
*
* @return $this
*/
@ -343,7 +343,7 @@ class Capitalization implements ModelInterface, ArrayAccess
/**
* Sets sca_eth_flow_points
*
* @param string $sca_eth_flow_points
* @param string $sca_eth_flow_points sca_eth_flow_points
*
* @return $this
*/

View File

@ -214,7 +214,7 @@ class Cat extends Animal
/**
* Sets declawed
*
* @param bool $declawed
* @param bool $declawed declawed
*
* @return $this
*/

View File

@ -223,7 +223,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
* @param int $id id
*
* @return $this
*/
@ -247,7 +247,7 @@ class Category implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param string $name
* @param string $name name
*
* @return $this
*/

View File

@ -218,7 +218,7 @@ class ClassModel implements ModelInterface, ArrayAccess
/**
* Sets _class
*
* @param string $_class
* @param string $_class _class
*
* @return $this
*/

View File

@ -217,7 +217,7 @@ class Client implements ModelInterface, ArrayAccess
/**
* Sets client
*
* @param string $client
* @param string $client client
*
* @return $this
*/

View File

@ -214,7 +214,7 @@ class Dog extends Animal
/**
* Sets breed
*
* @param string $breed
* @param string $breed breed
*
* @return $this
*/

View File

@ -265,7 +265,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Sets just_symbol
*
* @param string $just_symbol
* @param string $just_symbol just_symbol
*
* @return $this
*/
@ -298,7 +298,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
/**
* Sets array_enum
*
* @param string[] $array_enum
* @param string[] $array_enum array_enum
*
* @return $this
*/

View File

@ -318,7 +318,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets enum_string
*
* @param string $enum_string
* @param string $enum_string enum_string
*
* @return $this
*/
@ -351,7 +351,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets enum_integer
*
* @param int $enum_integer
* @param int $enum_integer enum_integer
*
* @return $this
*/
@ -384,7 +384,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets enum_number
*
* @param double $enum_number
* @param double $enum_number enum_number
*
* @return $this
*/
@ -417,7 +417,7 @@ class EnumTest implements ModelInterface, ArrayAccess
/**
* Sets outer_enum
*
* @param \Swagger\Client\Model\OuterEnum $outer_enum
* @param \Swagger\Client\Model\OuterEnum $outer_enum outer_enum
*
* @return $this
*/

View File

@ -310,6 +310,10 @@ class FormatTest implements ModelInterface, ArrayAccess
if ($this->container['byte'] === null) {
$invalidProperties[] = "'byte' can't be null";
}
if (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $this->container['byte'])) {
$invalidProperties[] = "invalid value for 'byte', must be conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.";
}
if ($this->container['date'] === null) {
$invalidProperties[] = "'date' can't be null";
}
@ -375,6 +379,9 @@ class FormatTest implements ModelInterface, ArrayAccess
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;
}
@ -404,7 +411,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets integer
*
* @param int $integer
* @param int $integer integer
*
* @return $this
*/
@ -436,7 +443,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets int32
*
* @param int $int32
* @param int $int32 int32
*
* @return $this
*/
@ -468,7 +475,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets int64
*
* @param int $int64
* @param int $int64 int64
*
* @return $this
*/
@ -492,7 +499,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets number
*
* @param float $number
* @param float $number number
*
* @return $this
*/
@ -524,7 +531,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets float
*
* @param float $float
* @param float $float float
*
* @return $this
*/
@ -556,7 +563,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets double
*
* @param double $double
* @param double $double double
*
* @return $this
*/
@ -588,7 +595,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets string
*
* @param string $string
* @param string $string string
*
* @return $this
*/
@ -617,12 +624,17 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets byte
*
* @param string $byte
* @param string $byte byte
*
* @return $this
*/
public function setByte($byte)
{
if ((!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $byte))) {
throw new \InvalidArgumentException("invalid value for $byte when calling FormatTest., must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.");
}
$this->container['byte'] = $byte;
return $this;
@ -641,7 +653,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets binary
*
* @param string $binary
* @param string $binary binary
*
* @return $this
*/
@ -665,7 +677,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets date
*
* @param \DateTime $date
* @param \DateTime $date date
*
* @return $this
*/
@ -689,7 +701,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets date_time
*
* @param \DateTime $date_time
* @param \DateTime $date_time date_time
*
* @return $this
*/
@ -713,7 +725,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets uuid
*
* @param string $uuid
* @param string $uuid uuid
*
* @return $this
*/
@ -737,7 +749,7 @@ class FormatTest implements ModelInterface, ArrayAccess
/**
* Sets password
*
* @param string $password
* @param string $password password
*
* @return $this
*/

View File

@ -223,7 +223,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Sets bar
*
* @param string $bar
* @param string $bar bar
*
* @return $this
*/
@ -247,7 +247,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
/**
* Sets foo
*
* @param string $foo
* @param string $foo foo
*
* @return $this
*/

View File

@ -238,7 +238,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Sets map_map_of_string
*
* @param map[string,map[string,string]] $map_map_of_string
* @param map[string,map[string,string]] $map_map_of_string map_map_of_string
*
* @return $this
*/
@ -262,7 +262,7 @@ class MapTest implements ModelInterface, ArrayAccess
/**
* Sets map_of_enum_string
*
* @param map[string,string] $map_of_enum_string
* @param map[string,string] $map_of_enum_string map_of_enum_string
*
* @return $this
*/

View File

@ -229,7 +229,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Sets uuid
*
* @param string $uuid
* @param string $uuid uuid
*
* @return $this
*/
@ -253,7 +253,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Sets date_time
*
* @param \DateTime $date_time
* @param \DateTime $date_time date_time
*
* @return $this
*/
@ -277,7 +277,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
/**
* Sets map
*
* @param map[string,\Swagger\Client\Model\Animal] $map
* @param map[string,\Swagger\Client\Model\Animal] $map map
*
* @return $this
*/

View File

@ -224,7 +224,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param int $name
* @param int $name name
*
* @return $this
*/
@ -248,7 +248,7 @@ class Model200Response implements ModelInterface, ArrayAccess
/**
* Sets class
*
* @param string $class
* @param string $class class
*
* @return $this
*/

View File

@ -18,7 +18,6 @@
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/
/**

View File

@ -217,7 +217,7 @@ class ModelList implements ModelInterface, ArrayAccess
/**
* Sets _123_list
*
* @param string $_123_list
* @param string $_123_list _123_list
*
* @return $this
*/

View File

@ -218,7 +218,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
/**
* Sets return
*
* @param int $return
* @param int $return return
*
* @return $this
*/

View File

@ -242,7 +242,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param int $name
* @param int $name name
*
* @return $this
*/
@ -266,7 +266,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets snake_case
*
* @param int $snake_case
* @param int $snake_case snake_case
*
* @return $this
*/
@ -290,7 +290,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets property
*
* @param string $property
* @param string $property property
*
* @return $this
*/
@ -314,7 +314,7 @@ class Name implements ModelInterface, ArrayAccess
/**
* Sets _123_number
*
* @param int $_123_number
* @param int $_123_number _123_number
*
* @return $this
*/

View File

@ -217,7 +217,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
/**
* Sets just_number
*
* @param float $just_number
* @param float $just_number just_number
*
* @return $this
*/

View File

@ -276,7 +276,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
* @param int $id id
*
* @return $this
*/
@ -300,7 +300,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets pet_id
*
* @param int $pet_id
* @param int $pet_id pet_id
*
* @return $this
*/
@ -324,7 +324,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets quantity
*
* @param int $quantity
* @param int $quantity quantity
*
* @return $this
*/
@ -348,7 +348,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets ship_date
*
* @param \DateTime $ship_date
* @param \DateTime $ship_date ship_date
*
* @return $this
*/
@ -405,7 +405,7 @@ class Order implements ModelInterface, ArrayAccess
/**
* Sets complete
*
* @param bool $complete
* @param bool $complete complete
*
* @return $this
*/

View File

@ -229,7 +229,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_number
*
* @param \Swagger\Client\Model\OuterNumber $my_number
* @param \Swagger\Client\Model\OuterNumber $my_number my_number
*
* @return $this
*/
@ -253,7 +253,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_string
*
* @param \Swagger\Client\Model\OuterString $my_string
* @param \Swagger\Client\Model\OuterString $my_string my_string
*
* @return $this
*/
@ -277,7 +277,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
/**
* Sets my_boolean
*
* @param \Swagger\Client\Model\OuterBoolean $my_boolean
* @param \Swagger\Client\Model\OuterBoolean $my_boolean my_boolean
*
* @return $this
*/

View File

@ -288,7 +288,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
* @param int $id id
*
* @return $this
*/
@ -312,7 +312,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets category
*
* @param \Swagger\Client\Model\Category $category
* @param \Swagger\Client\Model\Category $category category
*
* @return $this
*/
@ -336,7 +336,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param string $name
* @param string $name name
*
* @return $this
*/
@ -360,7 +360,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets photo_urls
*
* @param string[] $photo_urls
* @param string[] $photo_urls photo_urls
*
* @return $this
*/
@ -384,7 +384,7 @@ class Pet implements ModelInterface, ArrayAccess
/**
* Sets tags
*
* @param \Swagger\Client\Model\Tag[] $tags
* @param \Swagger\Client\Model\Tag[] $tags tags
*
* @return $this
*/

View File

@ -223,7 +223,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Sets bar
*
* @param string $bar
* @param string $bar bar
*
* @return $this
*/
@ -247,7 +247,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
/**
* Sets baz
*
* @param string $baz
* @param string $baz baz
*
* @return $this
*/

View File

@ -217,7 +217,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
/**
* Sets special_property_name
*
* @param int $special_property_name
* @param int $special_property_name special_property_name
*
* @return $this
*/

View File

@ -223,7 +223,7 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
* @param int $id id
*
* @return $this
*/
@ -247,7 +247,7 @@ class Tag implements ModelInterface, ArrayAccess
/**
* Sets name
*
* @param string $name
* @param string $name name
*
* @return $this
*/

View File

@ -259,7 +259,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets id
*
* @param int $id
* @param int $id id
*
* @return $this
*/
@ -283,7 +283,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets username
*
* @param string $username
* @param string $username username
*
* @return $this
*/
@ -307,7 +307,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets first_name
*
* @param string $first_name
* @param string $first_name first_name
*
* @return $this
*/
@ -331,7 +331,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets last_name
*
* @param string $last_name
* @param string $last_name last_name
*
* @return $this
*/
@ -355,7 +355,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets email
*
* @param string $email
* @param string $email email
*
* @return $this
*/
@ -379,7 +379,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets password
*
* @param string $password
* @param string $password password
*
* @return $this
*/
@ -403,7 +403,7 @@ class User implements ModelInterface, ArrayAccess
/**
* Sets phone
*
* @param string $phone
* @param string $phone phone
*
* @return $this
*/