forked from loafle/openapi-generator-original
Regenerated PHP petstore sample.
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -48,70 +48,70 @@ class Configuration
|
||||
{
|
||||
|
||||
private static $_defaultConfiguration = null;
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Associate array to store API key(s)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $apiKeys = array();
|
||||
|
||||
|
||||
/**
|
||||
* Associate array to store API prefix (e.g. Bearer)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $apiKeyPrefixes = array();
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Username for HTTP basic authentication
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $username = '';
|
||||
|
||||
|
||||
/**
|
||||
* Password for HTTP basic authentication
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $password = '';
|
||||
|
||||
|
||||
/**
|
||||
* The default instance of ApiClient
|
||||
*
|
||||
* @var \Swagger\Client\ApiClient
|
||||
*/
|
||||
protected $defaultHeaders = array();
|
||||
|
||||
|
||||
/**
|
||||
* The host
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $host = 'http://petstore.swagger.io/v2';
|
||||
|
||||
|
||||
/**
|
||||
* Timeout (second) of the HTTP request, by default set to 0, no timeout
|
||||
*
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
protected $curlTimeout = 0;
|
||||
|
||||
|
||||
/**
|
||||
* User agent of the HTTP request, set to "PHP-Swagger" by default
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $userAgent = "PHP-Swagger/1.0.0";
|
||||
|
||||
|
||||
/**
|
||||
* Debug switch (default set to false)
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $debug = false;
|
||||
|
||||
|
||||
/**
|
||||
* Debug file location (log to STDOUT by default)
|
||||
*
|
||||
@@ -126,6 +126,15 @@ class Configuration
|
||||
*/
|
||||
protected $tempFolderPath;
|
||||
|
||||
/**
|
||||
* Indicates if SSL verification should be enabled or disabled.
|
||||
*
|
||||
* This is useful if the host uses a self-signed SSL certificate.
|
||||
*
|
||||
* @var boolean True if the certificate should be validated, false otherwise.
|
||||
*/
|
||||
protected $sslVerification = true;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -133,7 +142,7 @@ class Configuration
|
||||
{
|
||||
$this->tempFolderPath = sys_get_temp_dir();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets API key
|
||||
*
|
||||
@@ -147,7 +156,7 @@ class Configuration
|
||||
$this->apiKeys[$apiKeyIdentifier] = $key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets API key
|
||||
*
|
||||
@@ -159,7 +168,7 @@ class Configuration
|
||||
{
|
||||
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the prefix for API key (e.g. Bearer)
|
||||
*
|
||||
@@ -173,7 +182,7 @@ class Configuration
|
||||
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets API key prefix
|
||||
*
|
||||
@@ -185,7 +194,7 @@ class Configuration
|
||||
{
|
||||
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the username for HTTP basic authentication
|
||||
*
|
||||
@@ -198,7 +207,7 @@ class Configuration
|
||||
$this->username = $username;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the username for HTTP basic authentication
|
||||
*
|
||||
@@ -208,7 +217,7 @@ class Configuration
|
||||
{
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the password for HTTP basic authentication
|
||||
*
|
||||
@@ -221,7 +230,7 @@ class Configuration
|
||||
$this->password = $password;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the password for HTTP basic authentication
|
||||
*
|
||||
@@ -231,7 +240,7 @@ class Configuration
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a default header
|
||||
*
|
||||
@@ -245,11 +254,11 @@ class Configuration
|
||||
if (!is_string($headerName)) {
|
||||
throw new \InvalidArgumentException('Header name must be a string.');
|
||||
}
|
||||
|
||||
|
||||
$this->defaultHeaders[$headerName] = $headerValue;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the default header
|
||||
*
|
||||
@@ -259,7 +268,7 @@ class Configuration
|
||||
{
|
||||
return $this->defaultHeaders;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a default header
|
||||
*
|
||||
@@ -271,7 +280,7 @@ class Configuration
|
||||
{
|
||||
unset($this->defaultHeaders[$headerName]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the host
|
||||
*
|
||||
@@ -284,7 +293,7 @@ class Configuration
|
||||
$this->host = $host;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the host
|
||||
*
|
||||
@@ -294,7 +303,7 @@ class Configuration
|
||||
{
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the user agent of the api client
|
||||
*
|
||||
@@ -307,11 +316,11 @@ class Configuration
|
||||
if (!is_string($userAgent)) {
|
||||
throw new \InvalidArgumentException('User-agent must be a string.');
|
||||
}
|
||||
|
||||
|
||||
$this->userAgent = $userAgent;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the user agent of the api client
|
||||
*
|
||||
@@ -321,7 +330,7 @@ class Configuration
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the HTTP timeout value
|
||||
*
|
||||
@@ -334,11 +343,11 @@ class Configuration
|
||||
if (!is_numeric($seconds) || $seconds < 0) {
|
||||
throw new \InvalidArgumentException('Timeout value must be numeric and a non-negative number.');
|
||||
}
|
||||
|
||||
|
||||
$this->curlTimeout = $seconds;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the HTTP timeout value
|
||||
*
|
||||
@@ -348,10 +357,10 @@ class Configuration
|
||||
{
|
||||
return $this->curlTimeout;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets debug flag
|
||||
*
|
||||
*
|
||||
* @param bool $debug Debug flag
|
||||
*
|
||||
* @return Configuration
|
||||
@@ -361,7 +370,7 @@ class Configuration
|
||||
$this->debug = $debug;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the debug flag
|
||||
*
|
||||
@@ -371,7 +380,7 @@ class Configuration
|
||||
{
|
||||
return $this->debug;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the debug file
|
||||
*
|
||||
@@ -384,7 +393,7 @@ class Configuration
|
||||
$this->debugFile = $debugFile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the debug file
|
||||
*
|
||||
@@ -394,7 +403,7 @@ class Configuration
|
||||
{
|
||||
return $this->debugFile;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the temp folder path
|
||||
*
|
||||
@@ -407,7 +416,7 @@ class Configuration
|
||||
$this->tempFolderPath = $tempFolderPath;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the temp folder path
|
||||
*
|
||||
@@ -417,7 +426,30 @@ class Configuration
|
||||
{
|
||||
return $this->tempFolderPath;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets if SSL verification should be enabled or disabled
|
||||
*
|
||||
* @param boolean $sslVerification True if the certificate should be validated, false otherwise
|
||||
*
|
||||
* @return Configuration
|
||||
*/
|
||||
public function setSSLVerification($sslVerification)
|
||||
{
|
||||
$this->sslVerification = $sslVerification;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets if SSL verification should be enabled or disabled
|
||||
*
|
||||
* @return boolean True if the certificate should be validated, false otherwise
|
||||
*/
|
||||
public function getSSLVerification()
|
||||
{
|
||||
return $this->sslVerification;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default configuration instance
|
||||
*
|
||||
@@ -428,10 +460,10 @@ class Configuration
|
||||
if (self::$_defaultConfiguration == null) {
|
||||
self::$_defaultConfiguration = new Configuration();
|
||||
}
|
||||
|
||||
|
||||
return self::$_defaultConfiguration;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the detault configuration instance
|
||||
*
|
||||
@@ -443,7 +475,7 @@ class Configuration
|
||||
{
|
||||
self::$_defaultConfiguration = $config;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the essential information for debugging
|
||||
*
|
||||
@@ -457,8 +489,8 @@ class Configuration
|
||||
$report .= " Swagger Spec Version: 1.0.0\n";
|
||||
$report .= " SDK Package Version: 1.0.0\n";
|
||||
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";
|
||||
|
||||
|
||||
return $report;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user