forked from loafle/openapi-generator-original
Add "servers" support to the operation, path in PHP API client (#2072)
* add servers support to path, operation in php client * remove servers from spec * update based on feedback
This commit is contained in:
committed by
Akihito Nakano
parent
ef7b28de00
commit
e0ed6719a0
@@ -54,19 +54,47 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,6 +121,15 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#servers}}
|
||||
{{#-first}}
|
||||
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
|
||||
{{/-first}}
|
||||
* URL: {{{url}}}
|
||||
{{#-last}}
|
||||
*
|
||||
{{/-last}}
|
||||
{{/servers}}
|
||||
{{#allParams}}
|
||||
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||
{{/allParams}}
|
||||
@@ -119,9 +156,18 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
*
|
||||
{{/description}}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#servers}}
|
||||
{{#-first}}
|
||||
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
|
||||
{{/-first}}
|
||||
* URL: {{{url}}}
|
||||
{{#-last}}
|
||||
*
|
||||
{{/-last}}
|
||||
{{/servers}}
|
||||
{{#allParams}}
|
||||
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||
{{/allParams}}
|
||||
@@ -235,9 +281,18 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
*
|
||||
{{/description}}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#servers}}
|
||||
{{#-first}}
|
||||
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
|
||||
{{/-first}}
|
||||
* URL: {{{url}}}
|
||||
{{#-last}}
|
||||
*
|
||||
{{/-last}}
|
||||
{{/servers}}
|
||||
{{#allParams}}
|
||||
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||
{{/allParams}}
|
||||
@@ -265,9 +320,18 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
*
|
||||
{{/description}}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#servers}}
|
||||
{{#-first}}
|
||||
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
|
||||
{{/-first}}
|
||||
* URL: {{{url}}}
|
||||
{{#-last}}
|
||||
*
|
||||
{{/-last}}
|
||||
{{/servers}}
|
||||
{{#allParams}}
|
||||
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||
{{/allParams}}
|
||||
@@ -326,6 +390,15 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#servers}}
|
||||
{{#-first}}
|
||||
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
|
||||
{{/-first}}
|
||||
* URL: {{{url}}}
|
||||
{{#-last}}
|
||||
*
|
||||
{{/-last}}
|
||||
{{/servers}}
|
||||
{{#allParams}}
|
||||
* @param {{dataType}} ${{paramName}}{{#description}} {{description}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||
{{/allParams}}
|
||||
@@ -538,10 +611,18 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
$headers
|
||||
);
|
||||
|
||||
{{#servers.0}}
|
||||
$operationHosts = [{{#servers}}"{{{url}}}"{{^-last}}, {{/-last}}{{/servers}}];
|
||||
if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) {
|
||||
throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts));
|
||||
}
|
||||
$operationHost = $operationHosts[$this->hostIndex];
|
||||
|
||||
{{/servers.0}}
|
||||
$query = \GuzzleHttp\Psr7\build_query($queryParams);
|
||||
return new Request(
|
||||
'{{httpMethod}}',
|
||||
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
{{^servers.0}}$this->config->getHost(){{/servers.0}}{{#servers.0}}$operationHost{{/servers.0}} . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
$headers,
|
||||
$httpBody
|
||||
);
|
||||
|
||||
@@ -64,19 +64,47 @@ class AnotherFakeApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class FakeApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2764,7 +2792,7 @@ class FakeApi
|
||||
*
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
* @param int $required_string_group Required String in group parameters (required)
|
||||
* @param bool $required_boolean_group Required Boolean in group parameters (required)
|
||||
@@ -2823,7 +2851,7 @@ class FakeApi
|
||||
*
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
* @param int $required_string_group Required String in group parameters (required)
|
||||
* @param bool $required_boolean_group Required Boolean in group parameters (required)
|
||||
@@ -2850,7 +2878,7 @@ class FakeApi
|
||||
*
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
* @param int $required_string_group Required String in group parameters (required)
|
||||
* @param bool $required_boolean_group Required Boolean in group parameters (required)
|
||||
|
||||
@@ -64,19 +64,47 @@ class FakeClassnameTags123Api
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class PetApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class StoreApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class UserApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class AnotherFakeApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class DefaultApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class FakeApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2545,7 +2573,7 @@ class FakeApi
|
||||
*
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
* @param int $required_string_group Required String in group parameters (required)
|
||||
* @param bool $required_boolean_group Required Boolean in group parameters (required)
|
||||
@@ -2604,7 +2632,7 @@ class FakeApi
|
||||
*
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
* @param int $required_string_group Required String in group parameters (required)
|
||||
* @param bool $required_boolean_group Required Boolean in group parameters (required)
|
||||
@@ -2631,7 +2659,7 @@ class FakeApi
|
||||
*
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* Note: the inpput parameter is an associative array with the keys listed as the parameter name below
|
||||
* Note: the input parameter is an associative array with the keys listed as the parameter name below
|
||||
*
|
||||
* @param int $required_string_group Required String in group parameters (required)
|
||||
* @param bool $required_boolean_group Required Boolean in group parameters (required)
|
||||
|
||||
+29
-1
@@ -64,19 +64,47 @@ class FakeClassnameTags123Api
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class PetApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class StoreApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,19 +64,47 @@ class UserApi
|
||||
*/
|
||||
protected $headerSelector;
|
||||
|
||||
/**
|
||||
* @var int Host index
|
||||
*/
|
||||
protected $hostIndex;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param Configuration $config
|
||||
* @param HeaderSelector $selector
|
||||
* @param int $host_index (Optional) host index to select the list of hosts if defined in the OpenAPI spec
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client = null,
|
||||
Configuration $config = null,
|
||||
HeaderSelector $selector = null
|
||||
HeaderSelector $selector = null,
|
||||
$host_index = 0
|
||||
) {
|
||||
$this->client = $client ?: new Client();
|
||||
$this->config = $config ?: new Configuration();
|
||||
$this->headerSelector = $selector ?: new HeaderSelector();
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the host index
|
||||
*
|
||||
* @param int Host index (required)
|
||||
*/
|
||||
public function setHostIndex($host_index)
|
||||
{
|
||||
$this->hostIndex = $host_index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the host index
|
||||
*
|
||||
* @return Host index
|
||||
*/
|
||||
public function getHostIndex()
|
||||
{
|
||||
return $this->hostIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user