[PHP] Validate parent's model first, if any (#4659)

* if model has parent, valid() & listInvalidProperties() will check the parents' first

* Run the ./bin/security/php-petstore.sh
This commit is contained in:
Ainun Nazieb
2017-01-26 21:49:38 +07:00
committed by wing328
parent c0fb30d491
commit 05eea2436c
42 changed files with 846 additions and 141 deletions

View File

@@ -5,8 +5,7 @@
*
* @category Class
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
@@ -19,17 +18,6 @@
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* 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.
*/
/**
@@ -46,8 +34,7 @@ namespace Swagger\Client;
*
* @category Class
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Configuration
@@ -110,6 +97,13 @@ class Configuration
*/
protected $curlTimeout = 0;
/**
* Timeout (second) of the HTTP connection, by default set to 0, no timeout
*
* @var string
*/
protected $curlConnectTimeout = 0;
/**
* User agent of the HTTP request, set to "PHP-Swagger" by default
*
@@ -147,6 +141,42 @@ class Configuration
*/
protected $sslVerification = true;
/**
* Curl proxy host
*
* @var string
*/
protected $proxyHost;
/**
* Curl proxy port
*
* @var integer
*/
protected $proxyPort;
/**
* Curl proxy type, e.g. CURLPROXY_HTTP or CURLPROXY_SOCKS5
*
* @see https://secure.php.net/manual/en/function.curl-setopt.php
* @var integer
*/
protected $proxyType;
/**
* Curl proxy username
*
* @var string
*/
protected $proxyUser;
/**
* Curl proxy password
*
* @var string
*/
protected $proxyPassword;
/**
* Constructor
*/
@@ -393,6 +423,149 @@ class Configuration
return $this->curlTimeout;
}
/**
* Sets the HTTP connect timeout value
*
* @param integer $seconds Number of seconds before connection times out [set to 0 for no timeout]
*
* @return Configuration
*/
public function setCurlConnectTimeout($seconds)
{
if (!is_numeric($seconds) || $seconds < 0) {
throw new \InvalidArgumentException('Connect timeout value must be numeric and a non-negative number.');
}
$this->curlConnectTimeout = $seconds;
return $this;
}
/**
* Gets the HTTP connect timeout value
*
* @return string HTTP connect timeout value
*/
public function getCurlConnectTimeout()
{
return $this->curlConnectTimeout;
}
/**
* Sets the HTTP Proxy Host
*
* @param string $proxyHost HTTP Proxy URL
*
* @return ApiClient
*/
public function setCurlProxyHost($proxyHost)
{
$this->proxyHost = $proxyHost;
return $this;
}
/**
* Gets the HTTP Proxy Host
*
* @return string
*/
public function getCurlProxyHost()
{
return $this->proxyHost;
}
/**
* Sets the HTTP Proxy Port
*
* @param integer $proxyPort HTTP Proxy Port
*
* @return ApiClient
*/
public function setCurlProxyPort($proxyPort)
{
$this->proxyPort = $proxyPort;
return $this;
}
/**
* Gets the HTTP Proxy Port
*
* @return integer
*/
public function getCurlProxyPort()
{
return $this->proxyPort;
}
/**
* Sets the HTTP Proxy Type
*
* @param integer $proxyType HTTP Proxy Type
*
* @return ApiClient
*/
public function setCurlProxyType($proxyType)
{
$this->proxyType = $proxyType;
return $this;
}
/**
* Gets the HTTP Proxy Type
*
* @return integer
*/
public function getCurlProxyType()
{
return $this->proxyType;
}
/**
* Sets the HTTP Proxy User
*
* @param string $proxyUser HTTP Proxy User
*
* @return ApiClient
*/
public function setCurlProxyUser($proxyUser)
{
$this->proxyUser = $proxyUser;
return $this;
}
/**
* Gets the HTTP Proxy User
*
* @return string
*/
public function getCurlProxyUser()
{
return $this->proxyUser;
}
/**
* Sets the HTTP Proxy Password
*
* @param string $proxyPassword HTTP Proxy Password
*
* @return ApiClient
*/
public function setCurlProxyPassword($proxyPassword)
{
$this->proxyPassword = $proxyPassword;
return $this;
}
/**
* Gets the HTTP Proxy Password
*
* @return string
*/
public function getCurlProxyPassword()
{
return $this->proxyPassword;
}
/**
* Sets debug flag
*