From 1e3a39b460ce383cf93c83969e6ce1ded4bb0c56 Mon Sep 17 00:00:00 2001 From: Thomas Hansen Date: Wed, 3 Aug 2022 18:15:51 +0200 Subject: [PATCH] [PHP] Add support for server variables in operations (#12982) * [FEATURE] Support for server variables in operations * [AUTOGENERATED] update samples * [PHP] Added tests for server variables in operations --- .../main/resources/php/Configuration.mustache | 37 +- .../src/main/resources/php/api.mustache | 181 +++++++-- .../src/main/resources/php/api_doc.mustache | 56 ++- ...ith-fake-endpoints-models-for-testing.yaml | 15 + .../petstore/java/feign/api/openapi.yaml | 15 + .../petstore/java/webclient/api/openapi.yaml | 15 + .../docs/Api/AnotherFakeApi.md | 14 +- .../OpenAPIClient-php/docs/Api/DefaultApi.md | 8 +- .../php/OpenAPIClient-php/docs/Api/FakeApi.md | 225 ++++++------ .../docs/Api/FakeClassnameTags123Api.md | 14 +- .../php/OpenAPIClient-php/docs/Api/PetApi.md | 142 +++++--- .../OpenAPIClient-php/docs/Api/StoreApi.md | 32 +- .../php/OpenAPIClient-php/docs/Api/UserApi.md | 68 ++-- .../lib/Api/AnotherFakeApi.php | 4 +- .../OpenAPIClient-php/lib/Api/DefaultApi.php | 3 +- .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 102 +++++- .../lib/Api/FakeClassnameTags123Api.php | 4 +- .../php/OpenAPIClient-php/lib/Api/PetApi.php | 343 +++++++++++++++--- .../OpenAPIClient-php/lib/Api/StoreApi.php | 15 +- .../php/OpenAPIClient-php/lib/Api/UserApi.php | 33 +- .../OpenAPIClient-php/lib/Configuration.php | 37 +- .../lib/Model/InlineResponseDefault.php | 320 ---------------- .../test/Api/AnotherFakeApiTest.php | 9 +- .../test/Api/DefaultApiTest.php | 9 +- .../test/Api/FakeApiTest.php | 61 +++- .../test/Api/FakeClassnameTags123ApiTest.php | 9 +- .../OpenAPIClient-php/test/Api/PetApiTest.php | 25 +- .../test/Api/StoreApiTest.php | 15 +- .../test/Api/UserApiTest.php | 23 +- .../Model/AdditionalPropertiesAnyTypeTest.php | 87 ----- .../Model/AdditionalPropertiesArrayTest.php | 87 ----- .../Model/AdditionalPropertiesBooleanTest.php | 87 ----- .../Model/AdditionalPropertiesClassTest.php | 13 +- .../Model/AdditionalPropertiesIntegerTest.php | 87 ----- .../Model/AdditionalPropertiesNumberTest.php | 87 ----- .../Model/AdditionalPropertiesObjectTest.php | 87 ----- .../Model/AdditionalPropertiesStringTest.php | 87 ----- .../test/Model/AllOfWithSingleRefTest.php | 4 +- .../test/Model/AnimalTest.php | 13 +- .../test/Model/ApiResponseTest.php | 15 +- .../Model/ArrayOfArrayOfNumberOnlyTest.php | 11 +- .../test/Model/ArrayOfNumberOnlyTest.php | 11 +- .../test/Model/ArrayTestTest.php | 15 +- .../test/Model/BigCatAllOfTest.php | 87 ----- .../test/Model/BigCatTest.php | 87 ----- .../test/Model/CapitalizationTest.php | 21 +- .../test/Model/CatAllOfTest.php | 11 +- .../OpenAPIClient-php/test/Model/CatTest.php | 11 +- .../test/Model/CategoryTest.php | 13 +- .../test/Model/ClassModelTest.php | 11 +- .../test/Model/ClientTest.php | 11 +- .../test/Model/DeprecatedObjectTest.php | 4 +- .../test/Model/DogAllOfTest.php | 11 +- .../OpenAPIClient-php/test/Model/DogTest.php | 11 +- .../test/Model/EnumArraysTest.php | 13 +- .../test/Model/EnumClassTest.php | 9 +- .../test/Model/EnumTestTest.php | 25 +- .../test/Model/FileSchemaTestClassTest.php | 13 +- .../OpenAPIClient-php/test/Model/FileTest.php | 11 +- .../test/Model/FooGetDefaultResponseTest.php | 4 +- .../OpenAPIClient-php/test/Model/FooTest.php | 11 +- .../test/Model/FormatTestTest.php | 48 ++- .../test/Model/HasOnlyReadOnlyTest.php | 13 +- .../test/Model/HealthCheckResultTest.php | 11 +- .../test/Model/InlineObject1Test.php | 94 ----- .../test/Model/InlineObject2Test.php | 94 ----- .../test/Model/InlineObject3Test.php | 178 --------- .../test/Model/InlineObject4Test.php | 94 ----- .../test/Model/InlineObject5Test.php | 94 ----- .../test/Model/InlineObjectTest.php | 94 ----- .../test/Model/InlineResponseDefaultTest.php | 87 ----- .../test/Model/MapTestTest.php | 17 +- ...ertiesAndAdditionalPropertiesClassTest.php | 15 +- .../test/Model/Model200ResponseTest.php | 13 +- .../test/Model/ModelListTest.php | 11 +- .../test/Model/ModelReturnTest.php | 11 +- .../OpenAPIClient-php/test/Model/NameTest.php | 17 +- .../test/Model/NullableClassTest.php | 33 +- .../test/Model/NumberOnlyTest.php | 11 +- .../Model/ObjectWithDeprecatedFieldsTest.php | 4 +- .../test/Model/OrderTest.php | 21 +- .../test/Model/OuterCompositeTest.php | 15 +- .../test/Model/OuterEnumDefaultValueTest.php | 9 +- .../OuterEnumIntegerDefaultValueTest.php | 9 +- .../test/Model/OuterEnumIntegerTest.php | 9 +- .../test/Model/OuterEnumTest.php | 9 +- .../Model/OuterObjectWithEnumPropertyTest.php | 5 +- .../OpenAPIClient-php/test/Model/PetTest.php | 21 +- .../test/Model/ReadOnlyFirstTest.php | 13 +- .../test/Model/SingleRefTypeTest.php | 4 +- .../test/Model/SpecialModelNameTest.php | 11 +- .../OpenAPIClient-php/test/Model/TagTest.php | 13 +- .../test/Model/TypeHolderDefaultTest.php | 115 ------ .../test/Model/TypeHolderExampleTest.php | 122 ------- .../OpenAPIClient-php/test/Model/UserTest.php | 25 +- .../test/Model/XmlItemTest.php | 283 --------------- .../tests/ServerVariablesInOperationTest.php | 58 +++ .../lib/petstore/configuration.rb | 46 +++ .../ruby/lib/petstore/configuration.rb | 46 +++ .../python-legacy/petstore_api/api/pet_api.py | 6 +- 100 files changed, 1732 insertions(+), 2936 deletions(-) delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesArrayTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesBooleanTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesNumberTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesObjectTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesStringTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject2Test.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject3Test.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject4Test.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject5Test.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObjectTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineResponseDefaultTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderExampleTest.php delete mode 100644 samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php create mode 100644 samples/client/petstore/php/OpenAPIClient-php/tests/ServerVariablesInOperationTest.php diff --git a/modules/openapi-generator/src/main/resources/php/Configuration.mustache b/modules/openapi-generator/src/main/resources/php/Configuration.mustache index 88799976593..60c040a1340 100644 --- a/modules/openapi-generator/src/main/resources/php/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/php/Configuration.mustache @@ -496,32 +496,31 @@ class Configuration } /** - * Returns URL based on the index and variables - * - * @param int $index index of the host settings - * @param array|null $variables hash of variable and the corresponding value (optional) - * @return string URL based on host settings - */ - public function getHostFromSettings($index, $variables = null) + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public static function getHostString(array $hostsSettings, $hostIndex, array $variables = null) { if (null === $variables) { $variables = []; } - $hosts = $this->getHostSettings(); - // check array index out of bound - if ($index < 0 || $index >= sizeof($hosts)) { - throw new \InvalidArgumentException("Invalid index $index when selecting the host. Must be less than ".sizeof($hosts)); + if ($hostIndex < 0 || $hostIndex >= count($hostsSettings)) { + throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostsSettings)); } - $host = $hosts[$index]; + $host = $hostsSettings[$hostIndex]; $url = $host["url"]; // go through variable and assign a value foreach ($host["variables"] ?? [] as $name => $variable) { if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user - if (in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum + if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum $url = str_replace("{".$name."}", $variables[$name], $url); } else { throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); @@ -534,4 +533,16 @@ class Configuration return $url; } + + /** + * Returns URL based on the index and variables + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public function getHostFromSettings($index, $variables = null) + { + return self::getHostString($this->getHostSettings(), $index, $variables); + } } diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index bfab1fa8644..77bc8165e59 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -124,9 +124,20 @@ use {{invokerPackage}}\ObjectSerializer; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. {{/-first}} * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} {{#-last}} * {{/-last}} @@ -134,6 +145,12 @@ use {{invokerPackage}}\ObjectSerializer; {{#allParams}} * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}}{{^description}} {{paramName}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} * * @throws \{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -142,9 +159,9 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}?int $hostIndex = null, array $variables = []{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { - {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} + {{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} return $response;{{/returnType}} } @@ -165,9 +182,20 @@ use {{invokerPackage}}\ObjectSerializer; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. {{/-first}} * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} {{#-last}} * {{/-last}} @@ -175,6 +203,12 @@ use {{invokerPackage}}\ObjectSerializer; {{#allParams}} * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} * * @throws \{{invokerPackage}}\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -183,9 +217,9 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}?int $hostIndex = null, array $variables = []{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { - $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); + $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); try { $options = $this->createHttpClientOption(); @@ -306,9 +340,20 @@ use {{invokerPackage}}\ObjectSerializer; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. {{/-first}} * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} {{#-last}} * {{/-last}} @@ -316,6 +361,12 @@ use {{invokerPackage}}\ObjectSerializer; {{#allParams}} * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -323,9 +374,9 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}Async({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Async({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}?int $hostIndex = null, array $variables = []{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { - return $this->{{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + return $this->{{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) ->then( function ($response) { return $response[0]; @@ -350,9 +401,20 @@ use {{invokerPackage}}\ObjectSerializer; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. {{/-first}} * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} {{#-last}} * {{/-last}} @@ -360,6 +422,12 @@ use {{invokerPackage}}\ObjectSerializer; {{#allParams}} * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -367,10 +435,10 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}AsyncWithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}?int $hostIndex = null, array $variables = []{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { $returnType = '{{{returnType}}}'; - $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); + $request = $this->{{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -422,9 +490,20 @@ use {{invokerPackage}}\ObjectSerializer; {{/vendorExtensions.x-group-parameters}} {{#servers}} {{#-first}} - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. {{/-first}} * URL: {{{url}}} +{{#variables}} +{{#-first}} + * Variables: +{{/-first}} + * - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + * Allowed values: +{{/-first}} + * - {{{.}}}{{/enumValues}} +{{/variables}} {{#-last}} * {{/-last}} @@ -432,6 +511,12 @@ use {{invokerPackage}}\ObjectSerializer; {{#allParams}} * @param {{{dataType}}} ${{paramName}}{{#description}} {{.}}{{/description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} +{{#servers}} +{{#-first}} + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. +{{/-first}} +{{/servers}} * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -439,16 +524,16 @@ use {{invokerPackage}}\ObjectSerializer; * @deprecated {{/isDeprecated}} */ - public function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}?int $hostIndex = null, array $variables = []{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { {{#vendorExtensions.x-group-parameters}} // unbox the parameters from the associative array - {{#allParams}} +{{#allParams}} ${{paramName}} = array_key_exists('{{paramName}}', $associative_array) ? $associative_array['{{paramName}}'] : {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}; - {{/allParams}} - - {{/vendorExtensions.x-group-parameters}} - {{#allParams}} +{{/allParams}}{{#servers.0}} + $hostIndex = $associative_array['hostIndex']; + $variables = array_key_exists('variables', $associative_array) ? $associative_array['variables'] : []; +{{/servers.0}}{{/vendorExtensions.x-group-parameters}}{{#allParams}} {{#required}} // verify the required parameter '{{paramName}}' is set if (${{paramName}} === null || (is_array(${{paramName}}) && count(${{paramName}}) === 0)) { @@ -653,22 +738,70 @@ use {{invokerPackage}}\ObjectSerializer; ); {{#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)); + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; } - $operationHost = $operationHosts[$this->hostIndex]; + $hostSettings = $this->getHostSettingsFor{{operationId}}(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + {{/servers.0}} + {{^servers.0}} + $operationHost = $this->config->getHost(); {{/servers.0}} $query = ObjectSerializer::buildQuery($queryParams); return new Request( '{{httpMethod}}', - {{^servers.0}}$this->config->getHost(){{/servers.0}}{{#servers.0}}$operationHost{{/servers.0}} . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); } + {{#servers.0}} + /** + * Returns an array of host settings for Operation {{operationId}} + * + * @return array an array of host settings + */ + protected function getHostSettingsFor{{operationId}}(): array + { + return [ + {{#servers}} + [ + "url" => "{{{url}}}", + "description" => "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + "variables" => [ + {{/-first}} + "{{{name}}}" => [ + "description" => "{{{description}}}{{^description}}No description provided{{/description}}", + "default_value" => "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + "enum_values" => [ + {{/-first}} + "{{{.}}}", + {{#-last}} + ] + {{/-last}} + {{/enumValues}} + ]{{^-last}},{{/-last}} + {{#-last}} + ] + {{/-last}} + {{/variables}} + ]{{^-last}},{{/-last}} + {{/servers}} + ]; + } + + {{/servers.0}} {{/operation}} /** * Create http client option diff --git a/modules/openapi-generator/src/main/resources/php/api_doc.mustache b/modules/openapi-generator/src/main/resources/php/api_doc.mustache index 7c8460fe480..db04fa56ce4 100644 --- a/modules/openapi-generator/src/main/resources/php/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/php/api_doc.mustache @@ -2,11 +2,11 @@ {{.}}{{/description}} -All URIs are relative to {{basePath}}. +All URIs are relative to {{basePath}}, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}()**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +{{#operations}}{{#operation}}| [**{{operationId}}()**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | {{/operation}}{{/operations}}{{#operations}}{{#operation}} ## `{{{operationId}}}()` @@ -14,7 +14,21 @@ Method | HTTP request | Description ```php {{{operationId}}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: {{{.}}}{{/returnType}} ``` - +{{#servers}} +{{#-first}} +### URI(s): +{{/-first}} +- {{{url}}} {{#description}}{{.}}{{/description}}{{#variables}} +{{#-first}} + - Variables: +{{/-first}} + - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} +{{#-first}} + - Allowed values: +{{/-first}} + - {{{.}}}{{/enumValues}}{{#defaultValue}} + - Default value: {{{.}}} +{{/defaultValue}}{{/variables}}{{/servers}} {{{summary}}}{{#notes}} {{{.}}}{{/notes}} @@ -34,15 +48,25 @@ $apiInstance = new {{invokerPackage}}\Api\{{classname}}( ); {{^vendorExtensions.x-group-parameters}} {{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} +{{/allParams}}{{#servers}}{{#-first}} +$hostIndex = 0; +$variables = [{{#variables}} + '{{{name}}}' => '{{{default}}}{{^default}}YOUR_VALUE{{/default}}',{{/variables}} +]; +{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} +$associative_array = [ +{{#allParams}} '{{paramName}}' => {{{example}}}, // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} {{/allParams}} -{{/vendorExtensions.x-group-parameters}} -{{#vendorExtensions.x-group-parameters}} -{{#allParams}}$associate_array['{{paramName}}'] = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} -{{/allParams}} +{{#servers}}{{#-first}} + 'hostIndex' => 0, + $variables = [{{#variables}} + '{{{name}}}' => '{{{default}}}{{^default}}YOUR_VALUE{{/default}}',{{/variables}} + ], +{{/-first}}{{/servers}}]; {{/vendorExtensions.x-group-parameters}} try { - {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associate_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} + {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associate_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} print_r($result);{{/returnType}} } catch (Exception $e) { echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; @@ -52,13 +76,15 @@ try { ### Parameters {{#vendorExtensions.x-group-parameters}} -Note: the input 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 names below. {{/vendorExtensions.x-group-parameters}} -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}} -{{/allParams}} +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- |{{/-last}}{{/allParams}} +{{#allParams}}| **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}} | +{{/allParams}}{{#servers}}{{#-first}}| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] |{{/-first}} +{{/servers}} ### Return type diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 4a0777e930d..4ff88061222 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -33,6 +33,21 @@ paths: servers: - url: 'http://petstore.swagger.io/v2' - url: 'http://path-server-test.petstore.local/v2' + - url: 'http://{server}.swagger.io:{port}/v2' + description: test server with variables + variables: + server: + description: target server + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 post: tags: - pet diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index ccf94d1ff50..6715cdabc8f 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -98,6 +98,21 @@ paths: servers: - url: http://petstore.swagger.io/v2 - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index ccf94d1ff50..6715cdabc8f 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -98,6 +98,21 @@ paths: servers: - url: http://petstore.swagger.io/v2 - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/AnotherFakeApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/AnotherFakeApi.md index 20ee44a4bf0..ef6fa331bd8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/AnotherFakeApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/AnotherFakeApi.md @@ -1,10 +1,10 @@ # OpenAPI\Client\AnotherFakeApi -All URIs are relative to http://petstore.swagger.io:80/v2. +All URIs are relative to http://petstore.swagger.io:80/v2, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call123TestSpecialTags()**](AnotherFakeApi.md#call123TestSpecialTags) | **PATCH** /another-fake/dummy | To test special tags +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**call123TestSpecialTags()**](AnotherFakeApi.md#call123TestSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | ## `call123TestSpecialTags()` @@ -42,9 +42,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**\OpenAPI\Client\Model\Client**](../Model/Client.md)| client model | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **client** | [**\OpenAPI\Client\Model\Client**](../Model/Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/DefaultApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/DefaultApi.md index 6de004c507f..d603956cfaf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/DefaultApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/DefaultApi.md @@ -1,10 +1,10 @@ # OpenAPI\Client\DefaultApi -All URIs are relative to http://petstore.swagger.io:80/v2. +All URIs are relative to http://petstore.swagger.io:80/v2, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fooGet()**](DefaultApi.md#fooGet) | **GET** /foo | +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**fooGet()**](DefaultApi.md#fooGet) | **GET** /foo | | ## `fooGet()` diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index d511a482a17..0755aa7e2f8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -1,26 +1,26 @@ # OpenAPI\Client\FakeApi -All URIs are relative to http://petstore.swagger.io:80/v2. +All URIs are relative to http://petstore.swagger.io:80/v2, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**fakeHealthGet()**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint -[**fakeHttpSignatureTest()**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication -[**fakeOuterBooleanSerialize()**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -[**fakeOuterCompositeSerialize()**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -[**fakeOuterNumberSerialize()**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -[**fakeOuterStringSerialize()**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -[**fakePropertyEnumIntegerSerialize()**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | -[**testBodyWithBinary()**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | -[**testBodyWithFileSchema()**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -[**testBodyWithQueryParams()**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -[**testClientModel()**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters()**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**testEnumParameters()**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -[**testGroupParameters()**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**testInlineAdditionalProperties()**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**testJsonFormData()**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -[**testQueryParameterCollectionFormat()**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**fakeHealthGet()**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest()**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | +| [**fakeOuterBooleanSerialize()**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | +| [**fakeOuterCompositeSerialize()**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | +| [**fakeOuterNumberSerialize()**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | +| [**fakeOuterStringSerialize()**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize()**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary()**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | +| [**testBodyWithFileSchema()**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | +| [**testBodyWithQueryParams()**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | +| [**testClientModel()**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | +| [**testEndpointParameters()**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEnumParameters()**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | +| [**testGroupParameters()**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | +| [**testInlineAdditionalProperties()**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | +| [**testJsonFormData()**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | +| [**testQueryParameterCollectionFormat()**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | ## `fakeHealthGet()` @@ -110,11 +110,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | - **query_1** | **string**| query parameter | [optional] - **header_1** | **string**| header parameter | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | | +| **query_1** | **string**| query parameter | [optional] | +| **header_1** | **string**| header parameter | [optional] | ### Return type @@ -168,9 +168,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool**| Input boolean as post body | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **body** | **bool**| Input boolean as post body | [optional] | ### Return type @@ -224,9 +224,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outer_composite** | [**\OpenAPI\Client\Model\OuterComposite**](../Model/OuterComposite.md)| Input composite as post body | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **outer_composite** | [**\OpenAPI\Client\Model\OuterComposite**](../Model/OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -280,9 +280,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **float**| Input number as post body | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **body** | **float**| Input number as post body | [optional] | ### Return type @@ -336,9 +336,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **string**| Input string as post body | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **body** | **string**| Input string as post body | [optional] | ### Return type @@ -392,9 +392,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outer_object_with_enum_property** | [**\OpenAPI\Client\Model\OuterObjectWithEnumProperty**](../Model/OuterObjectWithEnumProperty.md)| Input enum (int) as post body | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **outer_object_with_enum_property** | [**\OpenAPI\Client\Model\OuterObjectWithEnumProperty**](../Model/OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | ### Return type @@ -447,9 +447,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **\SplFileObject****\SplFileObject**| image to upload | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **body** | **\SplFileObject****\SplFileObject**| image to upload | | ### Return type @@ -502,9 +502,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **file_schema_test_class** | [**\OpenAPI\Client\Model\FileSchemaTestClass**](../Model/FileSchemaTestClass.md)| | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **file_schema_test_class** | [**\OpenAPI\Client\Model\FileSchemaTestClass**](../Model/FileSchemaTestClass.md)| | | ### Return type @@ -556,10 +556,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **string**| | - **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **query** | **string**| | | +| **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| | | ### Return type @@ -613,9 +613,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**\OpenAPI\Client\Model\Client**](../Model/Client.md)| client model | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **client** | [**\OpenAPI\Client\Model\Client**](../Model/Client.md)| client model | | ### Return type @@ -687,22 +687,22 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **float**| None | - **double** | **double**| None | - **pattern_without_delimiter** | **string**| None | - **byte** | **string**| None | - **integer** | **int**| None | [optional] - **int32** | **int**| None | [optional] - **int64** | **int**| None | [optional] - **float** | **float**| None | [optional] - **string** | **string**| None | [optional] - **binary** | **\SplFileObject****\SplFileObject**| None | [optional] - **date** | **\DateTime**| None | [optional] - **date_time** | **\DateTime**| None | [optional] - **password** | **string**| None | [optional] - **callback** | **string**| None | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **number** | **float**| None | | +| **double** | **double**| None | | +| **pattern_without_delimiter** | **string**| None | | +| **byte** | **string**| None | | +| **integer** | **int**| None | [optional] | +| **int32** | **int**| None | [optional] | +| **int64** | **int**| None | [optional] | +| **float** | **float**| None | [optional] | +| **string** | **string**| None | [optional] | +| **binary** | **\SplFileObject****\SplFileObject**| None | [optional] | +| **date** | **\DateTime**| None | [optional] | +| **date_time** | **\DateTime**| None | [optional] | +| **password** | **string**| None | [optional] | +| **callback** | **string**| None | [optional] | ### Return type @@ -763,17 +763,17 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enum_header_string_array** | [**string[]**](../Model/string.md)| Header parameter enum test (string array) | [optional] - **enum_header_string** | **string**| Header parameter enum test (string) | [optional] [default to '-efg'] - **enum_query_string_array** | [**string[]**](../Model/string.md)| Query parameter enum test (string array) | [optional] - **enum_query_string** | **string**| Query parameter enum test (string) | [optional] [default to '-efg'] - **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] - **enum_query_double** | **double**| Query parameter enum test (double) | [optional] - **enum_query_model_array** | [**\OpenAPI\Client\Model\EnumClass[]**](../Model/\OpenAPI\Client\Model\EnumClass.md)| | [optional] - **enum_form_string_array** | [**string[]**](../Model/string.md)| Form parameter enum test (string array) | [optional] [default to '$'] - **enum_form_string** | **string**| Form parameter enum test (string) | [optional] [default to '-efg'] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **enum_header_string_array** | [**string[]**](../Model/string.md)| Header parameter enum test (string array) | [optional] | +| **enum_header_string** | **string**| Header parameter enum test (string) | [optional] [default to '-efg'] | +| **enum_query_string_array** | [**string[]**](../Model/string.md)| Query parameter enum test (string array) | [optional] | +| **enum_query_string** | **string**| Query parameter enum test (string) | [optional] [default to '-efg'] | +| **enum_query_integer** | **int**| Query parameter enum test (double) | [optional] | +| **enum_query_double** | **double**| Query parameter enum test (double) | [optional] | +| **enum_query_model_array** | [**\OpenAPI\Client\Model\EnumClass[]**](../Model/\OpenAPI\Client\Model\EnumClass.md)| | [optional] | +| **enum_form_string_array** | [**string[]**](../Model/string.md)| Form parameter enum test (string array) | [optional] [default to '$'] | +| **enum_form_string** | **string**| Form parameter enum test (string) | [optional] [default to '-efg'] | ### Return type @@ -819,12 +819,15 @@ $apiInstance = new OpenAPI\Client\Api\FakeApi( new GuzzleHttp\Client(), $config ); -$associate_array['required_string_group'] = 56; // int | Required String in group parameters -$associate_array['required_boolean_group'] = True; // bool | Required Boolean in group parameters -$associate_array['required_int64_group'] = 56; // int | Required Integer in group parameters -$associate_array['string_group'] = 56; // int | String in group parameters -$associate_array['boolean_group'] = True; // bool | Boolean in group parameters -$associate_array['int64_group'] = 56; // int | Integer in group parameters + +$associative_array = [ + 'required_string_group' => 56, // int | Required String in group parameters + 'required_boolean_group' => True, // bool | Required Boolean in group parameters + 'required_int64_group' => 56, // int | Required Integer in group parameters + 'string_group' => 56, // int | String in group parameters + 'boolean_group' => True, // bool | Boolean in group parameters + 'int64_group' => 56, // int | Integer in group parameters +]; try { $apiInstance->testGroupParameters($associate_array); @@ -835,16 +838,16 @@ try { ### Parameters -Note: the input 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 names below. -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **required_string_group** | **int**| Required String in group parameters | - **required_boolean_group** | **bool**| Required Boolean in group parameters | - **required_int64_group** | **int**| Required Integer in group parameters | - **string_group** | **int**| String in group parameters | [optional] - **boolean_group** | **bool**| Boolean in group parameters | [optional] - **int64_group** | **int**| Integer in group parameters | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **required_string_group** | **int**| Required String in group parameters | | +| **required_boolean_group** | **bool**| Required Boolean in group parameters | | +| **required_int64_group** | **int**| Required Integer in group parameters | | +| **string_group** | **int**| String in group parameters | [optional] | +| **boolean_group** | **bool**| Boolean in group parameters | [optional] | +| **int64_group** | **int**| Integer in group parameters | [optional] | ### Return type @@ -897,9 +900,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_body** | [**array**](../Model/string.md)| request body | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **request_body** | [**array**](../Model/string.md)| request body | | ### Return type @@ -953,10 +956,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **string**| field1 | - **param2** | **string**| field2 | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **param** | **string**| field1 | | +| **param2** | **string**| field2 | | ### Return type @@ -1015,15 +1018,15 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**string[]**](../Model/string.md)| | - **ioutil** | [**string[]**](../Model/string.md)| | - **http** | [**string[]**](../Model/string.md)| | - **url** | [**string[]**](../Model/string.md)| | - **context** | [**string[]**](../Model/string.md)| | - **allow_empty** | **string**| | - **language** | [**array**](../Model/string.md)| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pipe** | [**string[]**](../Model/string.md)| | | +| **ioutil** | [**string[]**](../Model/string.md)| | | +| **http** | [**string[]**](../Model/string.md)| | | +| **url** | [**string[]**](../Model/string.md)| | | +| **context** | [**string[]**](../Model/string.md)| | | +| **allow_empty** | **string**| | | +| **language** | [**array**](../Model/string.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeClassnameTags123Api.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeClassnameTags123Api.md index 58088ff9def..7519d7924b4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeClassnameTags123Api.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeClassnameTags123Api.md @@ -1,10 +1,10 @@ # OpenAPI\Client\FakeClassnameTags123Api -All URIs are relative to http://petstore.swagger.io:80/v2. +All URIs are relative to http://petstore.swagger.io:80/v2, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**testClassname()**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**testClassname()**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | ## `testClassname()` @@ -48,9 +48,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client** | [**\OpenAPI\Client\Model\Client**](../Model/Client.md)| client model | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **client** | [**\OpenAPI\Client\Model\Client**](../Model/Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md index eb814406b5f..527942413c6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md @@ -1,18 +1,18 @@ # OpenAPI\Client\PetApi -All URIs are relative to http://petstore.swagger.io:80/v2. +All URIs are relative to http://petstore.swagger.io:80/v2, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**addPet()**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store -[**deletePet()**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet -[**findPetsByStatus()**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status -[**findPetsByTags()**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags -[**getPetById()**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID -[**updatePet()**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet -[**updatePetWithForm()**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**uploadFile()**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**uploadFileWithRequiredFile()**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**addPet()**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | +| [**deletePet()**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | +| [**findPetsByStatus()**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | +| [**findPetsByTags()**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | +| [**getPetById()**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | +| [**updatePet()**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | +| [**updatePetWithForm()**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | +| [**uploadFile()**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | +| [**uploadFileWithRequiredFile()**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) | ## `addPet()` @@ -20,6 +20,21 @@ Method | HTTP request | Description ```php addPet($pet) ``` +### URI(s): +- http://petstore.swagger.io/v2 - http://path-server-test.petstore.local/v2 - http://{server}.swagger.io:{port}/v2 test server with variables + - Variables: + - server: target server + - Allowed values: + - petstore + - qa-petstore + - dev-petstore + - Default value: petstore + + - port: No description provided + - Allowed values: + - 80 + - 8080 + - Default value: 80 Add a new pet to the store @@ -44,8 +59,12 @@ $apiInstance = new OpenAPI\Client\Api\PetApi( ); $pet = new \OpenAPI\Client\Model\Pet(); // \OpenAPI\Client\Model\Pet | Pet object that needs to be added to the store +$hostIndex = 0; +$variables = [ +]; + try { - $apiInstance->addPet($pet); + $apiInstance->addPet($pet, $hostIndex, $variables); } catch (Exception $e) { echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), PHP_EOL; } @@ -53,9 +72,13 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + + ### Return type @@ -113,10 +136,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| Pet id to delete | - **api_key** | **string**| | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet_id** | **int**| Pet id to delete | | +| **api_key** | **string**| | [optional] | ### Return type @@ -174,9 +197,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**string[]**](../Model/string.md)| Status values that need to be considered for filter | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **status** | [**string[]**](../Model/string.md)| Status values that need to be considered for filter | | ### Return type @@ -234,9 +257,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**string[]**](../Model/string.md)| Tags to filter by | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **tags** | [**string[]**](../Model/string.md)| Tags to filter by | | ### Return type @@ -296,9 +319,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to return | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet_id** | **int**| ID of pet to return | | ### Return type @@ -322,6 +345,21 @@ Name | Type | Description | Notes ```php updatePet($pet) ``` +### URI(s): +- http://petstore.swagger.io/v2 - http://path-server-test.petstore.local/v2 - http://{server}.swagger.io:{port}/v2 test server with variables + - Variables: + - server: target server + - Allowed values: + - petstore + - qa-petstore + - dev-petstore + - Default value: petstore + + - port: No description provided + - Allowed values: + - 80 + - 8080 + - Default value: 80 Update an existing pet @@ -346,8 +384,12 @@ $apiInstance = new OpenAPI\Client\Api\PetApi( ); $pet = new \OpenAPI\Client\Model\Pet(); // \OpenAPI\Client\Model\Pet | Pet object that needs to be added to the store +$hostIndex = 0; +$variables = [ +]; + try { - $apiInstance->updatePet($pet); + $apiInstance->updatePet($pet, $hostIndex, $variables); } catch (Exception $e) { echo 'Exception when calling PetApi->updatePet: ', $e->getMessage(), PHP_EOL; } @@ -355,9 +397,13 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet** | [**\OpenAPI\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + + ### Return type @@ -416,11 +462,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet_id** | **int**| ID of pet that needs to be updated | | +| **name** | **string**| Updated name of the pet | [optional] | +| **status** | **string**| Updated status of the pet | [optional] | ### Return type @@ -480,11 +526,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to update | - **additional_metadata** | **string**| Additional data to pass to server | [optional] - **file** | **\SplFileObject****\SplFileObject**| file to upload | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet_id** | **int**| ID of pet to update | | +| **additional_metadata** | **string**| Additional data to pass to server | [optional] | +| **file** | **\SplFileObject****\SplFileObject**| file to upload | [optional] | ### Return type @@ -544,11 +590,11 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet_id** | **int**| ID of pet to update | - **required_file** | **\SplFileObject****\SplFileObject**| file to upload | - **additional_metadata** | **string**| Additional data to pass to server | [optional] +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **pet_id** | **int**| ID of pet to update | | +| **required_file** | **\SplFileObject****\SplFileObject**| file to upload | | +| **additional_metadata** | **string**| Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md index f863861fe7d..9e88ae63e31 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md @@ -1,13 +1,13 @@ # OpenAPI\Client\StoreApi -All URIs are relative to http://petstore.swagger.io:80/v2. +All URIs are relative to http://petstore.swagger.io:80/v2, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**deleteOrder()**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**getInventory()**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -[**getOrderById()**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID -[**placeOrder()**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**deleteOrder()**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID | +| [**getInventory()**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | +| [**getOrderById()**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID | +| [**placeOrder()**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | ## `deleteOrder()` @@ -44,9 +44,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **string**| ID of the order that needs to be deleted | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **order_id** | **string**| ID of the order that needs to be deleted | | ### Return type @@ -159,9 +159,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order_id** | **int**| ID of pet that needs to be fetched | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **order_id** | **int**| ID of pet that needs to be fetched | | ### Return type @@ -215,9 +215,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**\OpenAPI\Client\Model\Order**](../Model/Order.md)| order placed for purchasing the pet | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **order** | [**\OpenAPI\Client\Model\Order**](../Model/Order.md)| order placed for purchasing the pet | | ### Return type diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md index d821635f875..c5ff23c66a9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/UserApi.md @@ -1,17 +1,17 @@ # OpenAPI\Client\UserApi -All URIs are relative to http://petstore.swagger.io:80/v2. +All URIs are relative to http://petstore.swagger.io:80/v2, except if the operation defines another base path. -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createUser()**](UserApi.md#createUser) | **POST** /user | Create user -[**createUsersWithArrayInput()**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array -[**createUsersWithListInput()**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array -[**deleteUser()**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -[**getUserByName()**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -[**loginUser()**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -[**logoutUser()**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -[**updateUser()**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createUser()**](UserApi.md#createUser) | **POST** /user | Create user | +| [**createUsersWithArrayInput()**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | +| [**createUsersWithListInput()**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array | +| [**deleteUser()**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | +| [**getUserByName()**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | +| [**loginUser()**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | +| [**logoutUser()**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | +| [**updateUser()**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | ## `createUser()` @@ -48,9 +48,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| Created user object | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| Created user object | | ### Return type @@ -103,9 +103,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | | ### Return type @@ -158,9 +158,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object | | ### Return type @@ -213,9 +213,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **username** | **string**| The name that needs to be deleted | | ### Return type @@ -269,9 +269,9 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **username** | **string**| The name that needs to be fetched. Use user1 for testing. | | ### Return type @@ -326,10 +326,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **username** | **string**| The user name for login | | +| **password** | **string**| The password for login in clear text | | ### Return type @@ -435,10 +435,10 @@ try { ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| Updated user object | +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **username** | **string**| name that need to be deleted | | +| **user** | [**\OpenAPI\Client\Model\User**](../Model/User.md)| Updated user object | | ### Return type diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 222974c7603..895c789b4e9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -312,6 +312,7 @@ class AnotherFakeApi */ public function call123TestSpecialTagsRequest($client) { + // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { throw new \InvalidArgumentException( @@ -384,10 +385,11 @@ class AnotherFakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index 71367095d67..16f38d6c929 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -359,10 +359,11 @@ class DefaultApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 0542874ee0e..46620577caf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -367,10 +367,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -529,6 +530,7 @@ class FakeApi */ public function fakeHttpSignatureTestRequest($pet, $query_1 = null, $header_1 = null) { + // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new \InvalidArgumentException( @@ -536,6 +538,8 @@ class FakeApi ); } + + $resourcePath = '/fake/http-signature-test'; $formParams = []; $queryParams = []; @@ -614,10 +618,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -813,6 +818,7 @@ class FakeApi public function fakeOuterBooleanSerializeRequest($body = null) { + $resourcePath = '/fake/outer/boolean'; $formParams = []; $queryParams = []; @@ -878,10 +884,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1077,6 +1084,7 @@ class FakeApi public function fakeOuterCompositeSerializeRequest($outer_composite = null) { + $resourcePath = '/fake/outer/composite'; $formParams = []; $queryParams = []; @@ -1142,10 +1150,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1341,6 +1350,7 @@ class FakeApi public function fakeOuterNumberSerializeRequest($body = null) { + $resourcePath = '/fake/outer/number'; $formParams = []; $queryParams = []; @@ -1406,10 +1416,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1605,6 +1616,7 @@ class FakeApi public function fakeOuterStringSerializeRequest($body = null) { + $resourcePath = '/fake/outer/string'; $formParams = []; $queryParams = []; @@ -1670,10 +1682,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1868,6 +1881,7 @@ class FakeApi */ public function fakePropertyEnumIntegerSerializeRequest($outer_object_with_enum_property) { + // verify the required parameter 'outer_object_with_enum_property' is set if ($outer_object_with_enum_property === null || (is_array($outer_object_with_enum_property) && count($outer_object_with_enum_property) === 0)) { throw new \InvalidArgumentException( @@ -1940,10 +1954,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2084,6 +2099,7 @@ class FakeApi */ public function testBodyWithBinaryRequest($body) { + // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( @@ -2156,10 +2172,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2300,6 +2317,7 @@ class FakeApi */ public function testBodyWithFileSchemaRequest($file_schema_test_class) { + // verify the required parameter 'file_schema_test_class' is set if ($file_schema_test_class === null || (is_array($file_schema_test_class) && count($file_schema_test_class) === 0)) { throw new \InvalidArgumentException( @@ -2372,10 +2390,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2521,12 +2540,14 @@ class FakeApi */ public function testBodyWithQueryParamsRequest($query, $user) { + // verify the required parameter 'query' is set if ($query === null || (is_array($query) && count($query) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $query when calling testBodyWithQueryParams' ); } + // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new \InvalidArgumentException( @@ -2608,10 +2629,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2814,6 +2836,7 @@ class FakeApi */ public function testClientModelRequest($client) { + // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { throw new \InvalidArgumentException( @@ -2886,10 +2909,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -3103,6 +3127,7 @@ class FakeApi */ public function testEndpointParametersRequest($number, $double, $pattern_without_delimiter, $byte, $integer = null, $int32 = null, $int64 = null, $float = null, $string = null, $binary = null, $date = null, $date_time = null, $password = null, $callback = null) { + // verify the required parameter 'number' is set if ($number === null || (is_array($number) && count($number) === 0)) { throw new \InvalidArgumentException( @@ -3116,6 +3141,7 @@ class FakeApi throw new \InvalidArgumentException('invalid value for "$number" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 32.1.'); } + // verify the required parameter 'double' is set if ($double === null || (is_array($double) && count($double) === 0)) { throw new \InvalidArgumentException( @@ -3129,6 +3155,7 @@ class FakeApi throw new \InvalidArgumentException('invalid value for "$double" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 67.8.'); } + // verify the required parameter 'pattern_without_delimiter' is set if ($pattern_without_delimiter === null || (is_array($pattern_without_delimiter) && count($pattern_without_delimiter) === 0)) { throw new \InvalidArgumentException( @@ -3139,12 +3166,14 @@ class FakeApi 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 if ($byte === null || (is_array($byte) && count($byte) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $byte when calling testEndpointParameters' ); } + if ($integer !== null && $integer > 100) { throw new \InvalidArgumentException('invalid value for "$integer" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 100.'); } @@ -3152,6 +3181,7 @@ class FakeApi throw new \InvalidArgumentException('invalid value for "$integer" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.'); } + if ($int32 !== null && $int32 > 200) { throw new \InvalidArgumentException('invalid value for "$int32" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 200.'); } @@ -3159,14 +3189,21 @@ class FakeApi throw new \InvalidArgumentException('invalid value for "$int32" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 20.'); } + + if ($float !== null && $float > 987.6) { throw new \InvalidArgumentException('invalid value for "$float" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 987.6.'); } + if ($string !== null && !preg_match("/[a-z]/i", $string)) { throw new \InvalidArgumentException("invalid value for \"string\" when calling FakeApi.testEndpointParameters, must conform to the pattern /[a-z]/i."); } + + + + if ($password !== null && strlen($password) > 64) { throw new \InvalidArgumentException('invalid length for "$password" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 64.'); } @@ -3175,6 +3212,7 @@ class FakeApi } + $resourcePath = '/fake'; $formParams = []; $queryParams = []; @@ -3302,10 +3340,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -3495,6 +3534,15 @@ class FakeApi public function testEnumParametersRequest($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_query_model_array = null, $enum_form_string_array = '$', $enum_form_string = '-efg') { + + + + + + + + + $resourcePath = '/fake'; $formParams = []; $queryParams = []; @@ -3618,10 +3666,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -3819,12 +3868,14 @@ class FakeApi 'Missing the required parameter $required_string_group when calling testGroupParameters' ); } + // verify the required parameter 'required_boolean_group' is set if ($required_boolean_group === null || (is_array($required_boolean_group) && count($required_boolean_group) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $required_boolean_group when calling testGroupParameters' ); } + // verify the required parameter 'required_int64_group' is set if ($required_int64_group === null || (is_array($required_int64_group) && count($required_int64_group) === 0)) { throw new \InvalidArgumentException( @@ -3832,6 +3883,9 @@ class FakeApi ); } + + + $resourcePath = '/fake'; $formParams = []; $queryParams = []; @@ -3939,10 +3993,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -4091,6 +4146,7 @@ class FakeApi */ public function testInlineAdditionalPropertiesRequest($request_body) { + // verify the required parameter 'request_body' is set if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { throw new \InvalidArgumentException( @@ -4163,10 +4219,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -4320,12 +4377,14 @@ class FakeApi */ public function testJsonFormDataRequest($param, $param2) { + // verify the required parameter 'param' is set if ($param === null || (is_array($param) && count($param) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $param when calling testJsonFormData' ); } + // verify the required parameter 'param2' is set if ($param2 === null || (is_array($param2) && count($param2) === 0)) { throw new \InvalidArgumentException( @@ -4400,10 +4459,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -4574,36 +4634,42 @@ class FakeApi */ public function testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, $url, $context, $allow_empty, $language = null) { + // verify the required parameter 'pipe' is set if ($pipe === null || (is_array($pipe) && count($pipe) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $pipe when calling testQueryParameterCollectionFormat' ); } + // verify the required parameter 'ioutil' is set if ($ioutil === null || (is_array($ioutil) && count($ioutil) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $ioutil when calling testQueryParameterCollectionFormat' ); } + // verify the required parameter 'http' is set if ($http === null || (is_array($http) && count($http) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $http when calling testQueryParameterCollectionFormat' ); } + // verify the required parameter 'url' is set if ($url === null || (is_array($url) && count($url) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $url when calling testQueryParameterCollectionFormat' ); } + // verify the required parameter 'context' is set if ($context === null || (is_array($context) && count($context) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $context when calling testQueryParameterCollectionFormat' ); } + // verify the required parameter 'allow_empty' is set if ($allow_empty === null || (is_array($allow_empty) && count($allow_empty) === 0)) { throw new \InvalidArgumentException( @@ -4611,6 +4677,7 @@ class FakeApi ); } + $resourcePath = '/fake/test-query-parameters'; $formParams = []; $queryParams = []; @@ -4733,10 +4800,11 @@ class FakeApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index c1ae3d59a2c..eee434e2dd2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -312,6 +312,7 @@ class FakeClassnameTags123Api */ public function testClassnameRequest($client) { + // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { throw new \InvalidArgumentException( @@ -389,10 +390,11 @@ class FakeClassnameTags123Api $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PATCH', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index 5709bb26da3..84a0ab3930c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -120,19 +120,33 @@ class PetApi * * Add a new pet to the store * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \OpenAPI\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function addPet($pet) + public function addPet($pet, ?int $hostIndex = null, array $variables = []) { - $this->addPetWithHttpInfo($pet); + $this->addPetWithHttpInfo($pet, $hostIndex, $variables); } /** @@ -140,19 +154,33 @@ class PetApi * * Add a new pet to the store * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \OpenAPI\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function addPetWithHttpInfo($pet) + public function addPetWithHttpInfo($pet, ?int $hostIndex = null, array $variables = []) { - $request = $this->addPetRequest($pet); + $request = $this->addPetRequest($pet, $hostIndex, $variables); try { $options = $this->createHttpClientOption(); @@ -203,18 +231,32 @@ class PetApi * * Add a new pet to the store * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addPetAsync($pet) + public function addPetAsync($pet, ?int $hostIndex = null, array $variables = []) { - return $this->addPetAsyncWithHttpInfo($pet) + return $this->addPetAsyncWithHttpInfo($pet, $hostIndex, $variables) ->then( function ($response) { return $response[0]; @@ -227,19 +269,33 @@ class PetApi * * Add a new pet to the store * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addPetAsyncWithHttpInfo($pet) + public function addPetAsyncWithHttpInfo($pet, ?int $hostIndex = null, array $variables = []) { $returnType = ''; - $request = $this->addPetRequest($pet); + $request = $this->addPetRequest($pet, $hostIndex, $variables); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -267,17 +323,32 @@ class PetApi /** * Create request for operation 'addPet' * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addPetRequest($pet) + public function addPetRequest($pet, ?int $hostIndex = null, array $variables = []) { + // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new \InvalidArgumentException( @@ -354,12 +425,17 @@ class PetApi $headers ); - $operationHosts = ["http://petstore.swagger.io/v2", "http://path-server-test.petstore.local/v2"]; - 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)); + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; } - $operationHost = $operationHosts[$this->hostIndex]; + $hostSettings = $this->getHostSettingsForaddPet(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -369,6 +445,48 @@ class PetApi ); } + /** + * Returns an array of host settings for Operation addPet + * + * @return array an array of host settings + */ + protected function getHostSettingsForaddPet(): array + { + return [ + [ + "url" => "http://petstore.swagger.io/v2", + "description" => "No description provided", + ], + [ + "url" => "http://path-server-test.petstore.local/v2", + "description" => "No description provided", + ], + [ + "url" => "http://{server}.swagger.io:{port}/v2", + "description" => "test server with variables", + "variables" => [ + "server" => [ + "description" => "target server", + "default_value" => "petstore", + "enum_values" => [ + "petstore", + "qa-petstore", + "dev-petstore", + ] + ], + "port" => [ + "description" => "No description provided", + "default_value" => "80", + "enum_values" => [ + "80", + "8080", + ] + ] + ] + ] + ]; + } + /** * Operation deletePet * @@ -517,6 +635,7 @@ class PetApi */ public function deletePetRequest($pet_id, $api_key = null) { + // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new \InvalidArgumentException( @@ -524,6 +643,7 @@ class PetApi ); } + $resourcePath = '/pet/{petId}'; $formParams = []; $queryParams = []; @@ -599,10 +719,11 @@ class PetApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -805,6 +926,7 @@ class PetApi */ public function findPetsByStatusRequest($status) { + // verify the required parameter 'status' is set if ($status === null || (is_array($status) && count($status) === 0)) { throw new \InvalidArgumentException( @@ -884,10 +1006,11 @@ class PetApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1095,6 +1218,7 @@ class PetApi */ public function findPetsByTagsRequest($tags) { + // verify the required parameter 'tags' is set if ($tags === null || (is_array($tags) && count($tags) === 0)) { throw new \InvalidArgumentException( @@ -1175,10 +1299,11 @@ class PetApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1381,6 +1506,7 @@ class PetApi */ public function getPetByIdRequest($pet_id) { + // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new \InvalidArgumentException( @@ -1460,10 +1586,11 @@ class PetApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1474,19 +1601,33 @@ class PetApi * * Update an existing pet * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \OpenAPI\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function updatePet($pet) + public function updatePet($pet, ?int $hostIndex = null, array $variables = []) { - $this->updatePetWithHttpInfo($pet); + $this->updatePetWithHttpInfo($pet, $hostIndex, $variables); } /** @@ -1494,19 +1635,33 @@ class PetApi * * Update an existing pet * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \OpenAPI\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updatePetWithHttpInfo($pet) + public function updatePetWithHttpInfo($pet, ?int $hostIndex = null, array $variables = []) { - $request = $this->updatePetRequest($pet); + $request = $this->updatePetRequest($pet, $hostIndex, $variables); try { $options = $this->createHttpClientOption(); @@ -1557,18 +1712,32 @@ class PetApi * * Update an existing pet * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updatePetAsync($pet) + public function updatePetAsync($pet, ?int $hostIndex = null, array $variables = []) { - return $this->updatePetAsyncWithHttpInfo($pet) + return $this->updatePetAsyncWithHttpInfo($pet, $hostIndex, $variables) ->then( function ($response) { return $response[0]; @@ -1581,19 +1750,33 @@ class PetApi * * Update an existing pet * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updatePetAsyncWithHttpInfo($pet) + public function updatePetAsyncWithHttpInfo($pet, ?int $hostIndex = null, array $variables = []) { $returnType = ''; - $request = $this->updatePetRequest($pet); + $request = $this->updatePetRequest($pet, $hostIndex, $variables); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1621,17 +1804,32 @@ class PetApi /** * Create request for operation 'updatePet' * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. * URL: http://petstore.swagger.io/v2 * URL: http://path-server-test.petstore.local/v2 + * URL: http://{server}.swagger.io:{port}/v2 + * Variables: + * - server: target server + * Allowed values: + * - petstore + * - qa-petstore + * - dev-petstore + * - port: No description provided + * Allowed values: + * - 80 + * - 8080 * * @param \OpenAPI\Client\Model\Pet $pet Pet object that needs to be added to the store (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updatePetRequest($pet) + public function updatePetRequest($pet, ?int $hostIndex = null, array $variables = []) { + // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new \InvalidArgumentException( @@ -1708,12 +1906,17 @@ class PetApi $headers ); - $operationHosts = ["http://petstore.swagger.io/v2", "http://path-server-test.petstore.local/v2"]; - 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)); + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; } - $operationHost = $operationHosts[$this->hostIndex]; + $hostSettings = $this->getHostSettingsForupdatePet(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', @@ -1723,6 +1926,48 @@ class PetApi ); } + /** + * Returns an array of host settings for Operation updatePet + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdatePet(): array + { + return [ + [ + "url" => "http://petstore.swagger.io/v2", + "description" => "No description provided", + ], + [ + "url" => "http://path-server-test.petstore.local/v2", + "description" => "No description provided", + ], + [ + "url" => "http://{server}.swagger.io:{port}/v2", + "description" => "test server with variables", + "variables" => [ + "server" => [ + "description" => "target server", + "default_value" => "petstore", + "enum_values" => [ + "petstore", + "qa-petstore", + "dev-petstore", + ] + ], + "port" => [ + "description" => "No description provided", + "default_value" => "80", + "enum_values" => [ + "80", + "8080", + ] + ] + ] + ] + ]; + } + /** * Operation updatePetWithForm * @@ -1876,6 +2121,7 @@ class PetApi */ public function updatePetWithFormRequest($pet_id, $name = null, $status = null) { + // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new \InvalidArgumentException( @@ -1883,6 +2129,8 @@ class PetApi ); } + + $resourcePath = '/pet/{petId}'; $formParams = []; $queryParams = []; @@ -1962,10 +2210,11 @@ class PetApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2178,6 +2427,7 @@ class PetApi */ public function uploadFileRequest($pet_id, $additional_metadata = null, $file = null) { + // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new \InvalidArgumentException( @@ -2185,6 +2435,8 @@ class PetApi ); } + + $resourcePath = '/pet/{petId}/uploadImage'; $formParams = []; $queryParams = []; @@ -2272,10 +2524,11 @@ class PetApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -2488,12 +2741,14 @@ class PetApi */ public function uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata = null) { + // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile' ); } + // verify the required parameter 'required_file' is set if ($required_file === null || (is_array($required_file) && count($required_file) === 0)) { throw new \InvalidArgumentException( @@ -2501,6 +2756,7 @@ class PetApi ); } + $resourcePath = '/fake/{petId}/uploadImageWithRequiredFile'; $formParams = []; $queryParams = []; @@ -2588,10 +2844,11 @@ class PetApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index 19a0faf690f..d7b8ce5442c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -258,6 +258,7 @@ class StoreApi */ public function deleteOrderRequest($order_id) { + // verify the required parameter 'order_id' is set if ($order_id === null || (is_array($order_id) && count($order_id) === 0)) { throw new \InvalidArgumentException( @@ -332,10 +333,11 @@ class StoreApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -598,10 +600,11 @@ class StoreApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -804,6 +807,7 @@ class StoreApi */ public function getOrderByIdRequest($order_id) { + // verify the required parameter 'order_id' is set if ($order_id === null || (is_array($order_id) && count($order_id) === 0)) { throw new \InvalidArgumentException( @@ -885,10 +889,11 @@ class StoreApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1091,6 +1096,7 @@ class StoreApi */ public function placeOrderRequest($order) { + // verify the required parameter 'order' is set if ($order === null || (is_array($order) && count($order) === 0)) { throw new \InvalidArgumentException( @@ -1163,10 +1169,11 @@ class StoreApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 407260a091e..b2a2f73e85d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -258,6 +258,7 @@ class UserApi */ public function createUserRequest($user) { + // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new \InvalidArgumentException( @@ -330,10 +331,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -482,6 +484,7 @@ class UserApi */ public function createUsersWithArrayInputRequest($user) { + // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new \InvalidArgumentException( @@ -554,10 +557,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -706,6 +710,7 @@ class UserApi */ public function createUsersWithListInputRequest($user) { + // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new \InvalidArgumentException( @@ -778,10 +783,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -930,6 +936,7 @@ class UserApi */ public function deleteUserRequest($username) { + // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new \InvalidArgumentException( @@ -1004,10 +1011,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1210,6 +1218,7 @@ class UserApi */ public function getUserByNameRequest($username) { + // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new \InvalidArgumentException( @@ -1284,10 +1293,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1495,12 +1505,14 @@ class UserApi */ public function loginUserRequest($username, $password) { + // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $username when calling loginUser' ); } + // verify the required parameter 'password' is set if ($password === null || (is_array($password) && count($password) === 0)) { throw new \InvalidArgumentException( @@ -1585,10 +1597,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1792,10 +1805,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); @@ -1949,12 +1963,14 @@ class UserApi */ public function updateUserRequest($username, $user) { + // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $username when calling updateUser' ); } + // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new \InvalidArgumentException( @@ -2035,10 +2051,11 @@ class UserApi $headers ); + $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody ); diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index ce6abdf25e3..e82c65e63d4 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -516,32 +516,31 @@ class Configuration } /** - * Returns URL based on the index and variables - * - * @param int $index index of the host settings - * @param array|null $variables hash of variable and the corresponding value (optional) - * @return string URL based on host settings - */ - public function getHostFromSettings($index, $variables = null) + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public static function getHostString(array $hostsSettings, $hostIndex, array $variables = null) { if (null === $variables) { $variables = []; } - $hosts = $this->getHostSettings(); - // check array index out of bound - if ($index < 0 || $index >= sizeof($hosts)) { - throw new \InvalidArgumentException("Invalid index $index when selecting the host. Must be less than ".sizeof($hosts)); + if ($hostIndex < 0 || $hostIndex >= count($hostsSettings)) { + throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostsSettings)); } - $host = $hosts[$index]; + $host = $hostsSettings[$hostIndex]; $url = $host["url"]; // go through variable and assign a value foreach ($host["variables"] ?? [] as $name => $variable) { if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user - if (in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum + if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum $url = str_replace("{".$name."}", $variables[$name], $url); } else { throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); @@ -554,4 +553,16 @@ class Configuration return $url; } + + /** + * Returns URL based on the index and variables + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public function getHostFromSettings($index, $variables = null) + { + return self::getHostString($this->getHostSettings(), $index, $variables); + } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php deleted file mode 100644 index cdc77c805ed..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php +++ /dev/null @@ -1,320 +0,0 @@ - - */ -class InlineResponseDefault implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'inline_response_default'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'string' => '\OpenAPI\Client\Model\Foo' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'string' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'string' => 'string' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'string' => 'setString' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'string' => 'getString' - ]; - - /** - * 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::$openAPIModelName; - } - - - /** - * 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) - { - $this->container['string'] = $data['string'] ?? 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 count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets string - * - * @return \OpenAPI\Client\Model\Foo|null - */ - public function getString() - { - return $this->container['string']; - } - - /** - * Sets string - * - * @param \OpenAPI\Client\Model\Foo|null $string string - * - * @return self - */ - public function setString($string) - { - $this->container['string'] = $string; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php index e27cb94acc0..6cee5185883 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/AnotherFakeApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php index cc8d162dade..44ca443399e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/DefaultApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index fbd7182acd4..953145478b6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); } /** @@ -90,6 +91,8 @@ class FakeApiTest extends TestCase */ public function testFakeHttpSignatureTest() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -100,6 +103,8 @@ class FakeApiTest extends TestCase */ public function testFakeOuterBooleanSerialize() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -110,6 +115,8 @@ class FakeApiTest extends TestCase */ public function testFakeOuterCompositeSerialize() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -120,6 +127,8 @@ class FakeApiTest extends TestCase */ public function testFakeOuterNumberSerialize() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -130,6 +139,32 @@ class FakeApiTest extends TestCase */ public function testFakeOuterStringSerialize() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for fakePropertyEnumIntegerSerialize + * + * . + * + */ + public function testFakePropertyEnumIntegerSerialize() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for testBodyWithBinary + * + * . + * + */ + public function testTestBodyWithBinary() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -140,6 +175,8 @@ class FakeApiTest extends TestCase */ public function testTestBodyWithFileSchema() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -150,6 +187,8 @@ class FakeApiTest extends TestCase */ public function testTestBodyWithQueryParams() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -160,6 +199,8 @@ class FakeApiTest extends TestCase */ public function testTestClientModel() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -170,6 +211,8 @@ class FakeApiTest extends TestCase */ public function testTestEndpointParameters() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -180,6 +223,8 @@ class FakeApiTest extends TestCase */ public function testTestEnumParameters() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -190,6 +235,8 @@ class FakeApiTest extends TestCase */ public function testTestGroupParameters() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -200,6 +247,8 @@ class FakeApiTest extends TestCase */ public function testTestInlineAdditionalProperties() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -210,6 +259,8 @@ class FakeApiTest extends TestCase */ public function testTestJsonFormData() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -220,5 +271,7 @@ class FakeApiTest extends TestCase */ public function testTestQueryParameterCollectionFormat() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php index da81da6bb3f..6ea65e4d6ea 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeClassnameTags123ApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php index eb4cdb92bf8..06d61a51b72 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); } /** @@ -90,6 +91,8 @@ class PetApiTest extends TestCase */ public function testDeletePet() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -100,6 +103,8 @@ class PetApiTest extends TestCase */ public function testFindPetsByStatus() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -110,6 +115,8 @@ class PetApiTest extends TestCase */ public function testFindPetsByTags() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -120,6 +127,8 @@ class PetApiTest extends TestCase */ public function testGetPetById() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -130,6 +139,8 @@ class PetApiTest extends TestCase */ public function testUpdatePet() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -140,6 +151,8 @@ class PetApiTest extends TestCase */ public function testUpdatePetWithForm() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -150,6 +163,8 @@ class PetApiTest extends TestCase */ public function testUploadFile() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -160,5 +175,7 @@ class PetApiTest extends TestCase */ public function testUploadFileWithRequiredFile() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php index 2259f61d7ab..cf2e8b9d1ef 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/StoreApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); } /** @@ -90,6 +91,8 @@ class StoreApiTest extends TestCase */ public function testGetInventory() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -100,6 +103,8 @@ class StoreApiTest extends TestCase */ public function testGetOrderById() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -110,5 +115,7 @@ class StoreApiTest extends TestCase */ public function testPlaceOrder() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php index ede511de41d..43c14fe8483 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/UserApiTest.php @@ -1,7 +1,7 @@ markTestIncomplete('Not implemented'); } /** @@ -90,6 +91,8 @@ class UserApiTest extends TestCase */ public function testCreateUsersWithArrayInput() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -100,6 +103,8 @@ class UserApiTest extends TestCase */ public function testCreateUsersWithListInput() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -110,6 +115,8 @@ class UserApiTest extends TestCase */ public function testDeleteUser() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -120,6 +127,8 @@ class UserApiTest extends TestCase */ public function testGetUserByName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -130,6 +139,8 @@ class UserApiTest extends TestCase */ public function testLoginUser() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -140,6 +151,8 @@ class UserApiTest extends TestCase */ public function testLogoutUser() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -150,5 +163,7 @@ class UserApiTest extends TestCase */ public function testUpdateUser() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php deleted file mode 100644 index c818b85c9f3..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesAnyTypeTest.php +++ /dev/null @@ -1,87 +0,0 @@ -markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class AdditionalPropertiesClassTest extends TestCase */ public function testPropertyMapProperty() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class AdditionalPropertiesClassTest extends TestCase */ public function testPropertyMapOfMapProperty() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php deleted file mode 100644 index a8effc06061..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AdditionalPropertiesIntegerTest.php +++ /dev/null @@ -1,87 +0,0 @@ -markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class AnimalTest extends TestCase */ public function testPropertyClassName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class AnimalTest extends TestCase */ public function testPropertyColor() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php index 21e716d1872..71ffed81618 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ApiResponseTest.php @@ -2,7 +2,7 @@ /** * ApiResponseTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ApiResponseTest extends TestCase */ public function testApiResponse() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class ApiResponseTest extends TestCase */ public function testPropertyCode() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class ApiResponseTest extends TestCase */ public function testPropertyType() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,5 +102,7 @@ class ApiResponseTest extends TestCase */ public function testPropertyMessage() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php index edb49953d1d..ff497f4ee5f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfArrayOfNumberOnlyTest.php @@ -2,7 +2,7 @@ /** * ArrayOfArrayOfNumberOnlyTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ArrayOfArrayOfNumberOnlyTest extends TestCase */ public function testArrayOfArrayOfNumberOnly() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class ArrayOfArrayOfNumberOnlyTest extends TestCase */ public function testPropertyArrayArrayNumber() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php index 4b2059689c5..244c3ba6c13 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayOfNumberOnlyTest.php @@ -2,7 +2,7 @@ /** * ArrayOfNumberOnlyTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ArrayOfNumberOnlyTest extends TestCase */ public function testArrayOfNumberOnly() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class ArrayOfNumberOnlyTest extends TestCase */ public function testPropertyArrayNumber() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php index 498ba99a1e6..ced0c668079 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ArrayTestTest.php @@ -2,7 +2,7 @@ /** * ArrayTestTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ArrayTestTest extends TestCase */ public function testArrayTest() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class ArrayTestTest extends TestCase */ public function testPropertyArrayOfString() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class ArrayTestTest extends TestCase */ public function testPropertyArrayArrayOfInteger() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,5 +102,7 @@ class ArrayTestTest extends TestCase */ public function testPropertyArrayArrayOfModel() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php deleted file mode 100644 index af0dad92c19..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/BigCatAllOfTest.php +++ /dev/null @@ -1,87 +0,0 @@ -markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class CapitalizationTest extends TestCase */ public function testPropertySmallCamel() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class CapitalizationTest extends TestCase */ public function testPropertyCapitalCamel() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class CapitalizationTest extends TestCase */ public function testPropertySmallSnake() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,6 +111,8 @@ class CapitalizationTest extends TestCase */ public function testPropertyCapitalSnake() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -111,6 +120,8 @@ class CapitalizationTest extends TestCase */ public function testPropertyScaEthFlowPoints() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -118,5 +129,7 @@ class CapitalizationTest extends TestCase */ public function testPropertyAttName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php index 17db0e90059..469a2cbe3e7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php @@ -2,7 +2,7 @@ /** * CatAllOfTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class CatAllOfTest extends TestCase */ public function testCatAllOf() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class CatAllOfTest extends TestCase */ public function testPropertyDeclawed() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php index c0f8d545892..000182efc6c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatTest.php @@ -2,7 +2,7 @@ /** * CatTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class CatTest extends TestCase */ public function testCat() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class CatTest extends TestCase */ public function testPropertyDeclawed() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php index 116dc3a2425..1ae2588a267 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CategoryTest.php @@ -2,7 +2,7 @@ /** * CategoryTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class CategoryTest extends TestCase */ public function testCategory() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class CategoryTest extends TestCase */ public function testPropertyId() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class CategoryTest extends TestCase */ public function testPropertyName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php index 661706de45e..9258531c897 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClassModelTest.php @@ -2,7 +2,7 @@ /** * ClassModelTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ClassModelTest extends TestCase */ public function testClassModel() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class ClassModelTest extends TestCase */ public function testPropertyClass() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php index b68aedcc37b..a975446ae46 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ClientTest.php @@ -2,7 +2,7 @@ /** * ClientTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ClientTest extends TestCase */ public function testClient() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class ClientTest extends TestCase */ public function testPropertyClient() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DeprecatedObjectTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DeprecatedObjectTest.php index a32076925fb..e958e258614 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DeprecatedObjectTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DeprecatedObjectTest.php @@ -2,7 +2,7 @@ /** * DeprecatedObjectTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.2.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php index cd22f758c9d..efd7ae0ec4a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php @@ -2,7 +2,7 @@ /** * DogAllOfTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class DogAllOfTest extends TestCase */ public function testDogAllOf() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class DogAllOfTest extends TestCase */ public function testPropertyBreed() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php index 5618d4907a6..154ec078230 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogTest.php @@ -2,7 +2,7 @@ /** * DogTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class DogTest extends TestCase */ public function testDog() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class DogTest extends TestCase */ public function testPropertyBreed() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php index b49ea71c299..144730c7f15 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumArraysTest.php @@ -2,7 +2,7 @@ /** * EnumArraysTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class EnumArraysTest extends TestCase */ public function testEnumArrays() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class EnumArraysTest extends TestCase */ public function testPropertyJustSymbol() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class EnumArraysTest extends TestCase */ public function testPropertyArrayEnum() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php index a2ef8ea3e27..10b045d0ef1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumClassTest.php @@ -2,7 +2,7 @@ /** * EnumClassTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,5 +75,7 @@ class EnumClassTest extends TestCase */ public function testEnumClass() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php index 479fc3e598c..5df99d7540d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/EnumTestTest.php @@ -2,7 +2,7 @@ /** * EnumTestTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class EnumTestTest extends TestCase */ public function testEnumTest() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class EnumTestTest extends TestCase */ public function testPropertyEnumString() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class EnumTestTest extends TestCase */ public function testPropertyEnumStringRequired() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class EnumTestTest extends TestCase */ public function testPropertyEnumInteger() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,6 +111,8 @@ class EnumTestTest extends TestCase */ public function testPropertyEnumNumber() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -111,6 +120,8 @@ class EnumTestTest extends TestCase */ public function testPropertyOuterEnum() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -118,6 +129,8 @@ class EnumTestTest extends TestCase */ public function testPropertyOuterEnumInteger() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -125,6 +138,8 @@ class EnumTestTest extends TestCase */ public function testPropertyOuterEnumDefaultValue() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -132,5 +147,7 @@ class EnumTestTest extends TestCase */ public function testPropertyOuterEnumIntegerDefaultValue() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php index aec72c16026..8a0e5a83569 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileSchemaTestClassTest.php @@ -2,7 +2,7 @@ /** * FileSchemaTestClassTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class FileSchemaTestClassTest extends TestCase */ public function testFileSchemaTestClass() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class FileSchemaTestClassTest extends TestCase */ public function testPropertyFile() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class FileSchemaTestClassTest extends TestCase */ public function testPropertyFiles() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php index dc76d50a167..6c7460efbcc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FileTest.php @@ -2,7 +2,7 @@ /** * FileTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class FileTest extends TestCase */ public function testFile() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class FileTest extends TestCase */ public function testPropertySourceUri() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooGetDefaultResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooGetDefaultResponseTest.php index b7e0e6e21fc..ec9536c8a6d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooGetDefaultResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooGetDefaultResponseTest.php @@ -2,7 +2,7 @@ /** * FooGetDefaultResponseTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php index 2626d017d62..f357e067277 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FooTest.php @@ -2,7 +2,7 @@ /** * FooTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class FooTest extends TestCase */ public function testFoo() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class FooTest extends TestCase */ public function testPropertyBar() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php index 5514496b67e..7d43c0d165d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/FormatTestTest.php @@ -2,7 +2,7 @@ /** * FormatTestTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class FormatTestTest extends TestCase */ public function testFormatTest() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class FormatTestTest extends TestCase */ public function testPropertyInteger() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class FormatTestTest extends TestCase */ public function testPropertyInt32() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class FormatTestTest extends TestCase */ public function testPropertyInt64() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,6 +111,8 @@ class FormatTestTest extends TestCase */ public function testPropertyNumber() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -111,6 +120,8 @@ class FormatTestTest extends TestCase */ public function testPropertyFloat() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -118,6 +129,17 @@ class FormatTestTest extends TestCase */ public function testPropertyDouble() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "decimal" + */ + public function testPropertyDecimal() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -125,6 +147,8 @@ class FormatTestTest extends TestCase */ public function testPropertyString() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -132,6 +156,8 @@ class FormatTestTest extends TestCase */ public function testPropertyByte() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -139,6 +165,8 @@ class FormatTestTest extends TestCase */ public function testPropertyBinary() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -146,6 +174,8 @@ class FormatTestTest extends TestCase */ public function testPropertyDate() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -153,6 +183,8 @@ class FormatTestTest extends TestCase */ public function testPropertyDateTime() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -160,6 +192,8 @@ class FormatTestTest extends TestCase */ public function testPropertyUuid() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -167,6 +201,8 @@ class FormatTestTest extends TestCase */ public function testPropertyPassword() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -174,6 +210,8 @@ class FormatTestTest extends TestCase */ public function testPropertyPatternWithDigits() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -181,5 +219,7 @@ class FormatTestTest extends TestCase */ public function testPropertyPatternWithDigitsAndDelimiter() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php index 0782a49d64d..42f3977270b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HasOnlyReadOnlyTest.php @@ -2,7 +2,7 @@ /** * HasOnlyReadOnlyTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class HasOnlyReadOnlyTest extends TestCase */ public function testHasOnlyReadOnly() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class HasOnlyReadOnlyTest extends TestCase */ public function testPropertyBar() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class HasOnlyReadOnlyTest extends TestCase */ public function testPropertyFoo() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php index 44b75f893a1..55ae06c184d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/HealthCheckResultTest.php @@ -2,7 +2,7 @@ /** * HealthCheckResultTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class HealthCheckResultTest extends TestCase */ public function testHealthCheckResult() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class HealthCheckResultTest extends TestCase */ public function testPropertyNullableMessage() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php deleted file mode 100644 index 805c82a0daa..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/InlineObject1Test.php +++ /dev/null @@ -1,94 +0,0 @@ -markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class MapTestTest extends TestCase */ public function testPropertyMapMapOfString() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class MapTestTest extends TestCase */ public function testPropertyMapOfEnumString() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class MapTestTest extends TestCase */ public function testPropertyDirectMap() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,5 +111,7 @@ class MapTestTest extends TestCase */ public function testPropertyIndirectMap() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php index 73dd17f1a65..842e1271c3c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php @@ -2,7 +2,7 @@ /** * MixedPropertiesAndAdditionalPropertiesClassTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class MixedPropertiesAndAdditionalPropertiesClassTest extends TestCase */ public function testMixedPropertiesAndAdditionalPropertiesClass() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class MixedPropertiesAndAdditionalPropertiesClassTest extends TestCase */ public function testPropertyUuid() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class MixedPropertiesAndAdditionalPropertiesClassTest extends TestCase */ public function testPropertyDateTime() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,5 +102,7 @@ class MixedPropertiesAndAdditionalPropertiesClassTest extends TestCase */ public function testPropertyMap() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php index 625b13c5c34..d6d5f0c62a7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/Model200ResponseTest.php @@ -2,7 +2,7 @@ /** * Model200ResponseTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class Model200ResponseTest extends TestCase */ public function testModel200Response() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class Model200ResponseTest extends TestCase */ public function testPropertyName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class Model200ResponseTest extends TestCase */ public function testPropertyClass() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php index 8c8eb959f95..fed517cfe11 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelListTest.php @@ -2,7 +2,7 @@ /** * ModelListTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ModelListTest extends TestCase */ public function testModelList() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class ModelListTest extends TestCase */ public function testProperty123List() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php index a8169b7d751..aa50dc1e138 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ModelReturnTest.php @@ -2,7 +2,7 @@ /** * ModelReturnTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ModelReturnTest extends TestCase */ public function testModelReturn() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class ModelReturnTest extends TestCase */ public function testPropertyReturn() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php index 1a2af802b22..857c84bae00 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NameTest.php @@ -2,7 +2,7 @@ /** * NameTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class NameTest extends TestCase */ public function testName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class NameTest extends TestCase */ public function testPropertyName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class NameTest extends TestCase */ public function testPropertySnakeCase() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class NameTest extends TestCase */ public function testPropertyProperty() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,5 +111,7 @@ class NameTest extends TestCase */ public function testProperty123Number() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php index 32bc5a67fa4..0f6a26a1a25 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NullableClassTest.php @@ -2,7 +2,7 @@ /** * NullableClassTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class NullableClassTest extends TestCase */ public function testNullableClass() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class NullableClassTest extends TestCase */ public function testPropertyIntegerProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class NullableClassTest extends TestCase */ public function testPropertyNumberProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class NullableClassTest extends TestCase */ public function testPropertyBooleanProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,6 +111,8 @@ class NullableClassTest extends TestCase */ public function testPropertyStringProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -111,6 +120,8 @@ class NullableClassTest extends TestCase */ public function testPropertyDateProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -118,6 +129,8 @@ class NullableClassTest extends TestCase */ public function testPropertyDatetimeProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -125,6 +138,8 @@ class NullableClassTest extends TestCase */ public function testPropertyArrayNullableProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -132,6 +147,8 @@ class NullableClassTest extends TestCase */ public function testPropertyArrayAndItemsNullableProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -139,6 +156,8 @@ class NullableClassTest extends TestCase */ public function testPropertyArrayItemsNullable() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -146,6 +165,8 @@ class NullableClassTest extends TestCase */ public function testPropertyObjectNullableProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -153,6 +174,8 @@ class NullableClassTest extends TestCase */ public function testPropertyObjectAndItemsNullableProp() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -160,5 +183,7 @@ class NullableClassTest extends TestCase */ public function testPropertyObjectItemsNullable() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php index 1cfc7081816..44a972197da 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/NumberOnlyTest.php @@ -2,7 +2,7 @@ /** * NumberOnlyTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class NumberOnlyTest extends TestCase */ public function testNumberOnly() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class NumberOnlyTest extends TestCase */ public function testPropertyJustNumber() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ObjectWithDeprecatedFieldsTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ObjectWithDeprecatedFieldsTest.php index 2dde49a6822..d890e8e7c7d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ObjectWithDeprecatedFieldsTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ObjectWithDeprecatedFieldsTest.php @@ -2,7 +2,7 @@ /** * ObjectWithDeprecatedFieldsTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.2.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php index 836503bd762..deee1790826 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OrderTest.php @@ -2,7 +2,7 @@ /** * OrderTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class OrderTest extends TestCase */ public function testOrder() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class OrderTest extends TestCase */ public function testPropertyId() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class OrderTest extends TestCase */ public function testPropertyPetId() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class OrderTest extends TestCase */ public function testPropertyQuantity() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,6 +111,8 @@ class OrderTest extends TestCase */ public function testPropertyShipDate() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -111,6 +120,8 @@ class OrderTest extends TestCase */ public function testPropertyStatus() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -118,5 +129,7 @@ class OrderTest extends TestCase */ public function testPropertyComplete() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php index 135abe5783e..fe406c33f9a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterCompositeTest.php @@ -2,7 +2,7 @@ /** * OuterCompositeTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class OuterCompositeTest extends TestCase */ public function testOuterComposite() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class OuterCompositeTest extends TestCase */ public function testPropertyMyNumber() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class OuterCompositeTest extends TestCase */ public function testPropertyMyString() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,5 +102,7 @@ class OuterCompositeTest extends TestCase */ public function testPropertyMyBoolean() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php index 42de969dc39..7e4008ee3e6 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumDefaultValueTest.php @@ -2,7 +2,7 @@ /** * OuterEnumDefaultValueTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,5 +75,7 @@ class OuterEnumDefaultValueTest extends TestCase */ public function testOuterEnumDefaultValue() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php index cb423e0452a..4749175262c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerDefaultValueTest.php @@ -2,7 +2,7 @@ /** * OuterEnumIntegerDefaultValueTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,5 +75,7 @@ class OuterEnumIntegerDefaultValueTest extends TestCase */ public function testOuterEnumIntegerDefaultValue() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php index f6a6c33beac..9e5d201f957 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumIntegerTest.php @@ -2,7 +2,7 @@ /** * OuterEnumIntegerTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,5 +75,7 @@ class OuterEnumIntegerTest extends TestCase */ public function testOuterEnumInteger() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php index 37875f308b6..fd0e9515800 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterEnumTest.php @@ -2,7 +2,7 @@ /** * OuterEnumTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,5 +75,7 @@ class OuterEnumTest extends TestCase */ public function testOuterEnum() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterObjectWithEnumPropertyTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterObjectWithEnumPropertyTest.php index 9b186f93f6c..e00c4a1781d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterObjectWithEnumPropertyTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/OuterObjectWithEnumPropertyTest.php @@ -2,7 +2,7 @@ /** * OuterObjectWithEnumPropertyTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.1.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php index c096b6cfec3..f19f26d014c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/PetTest.php @@ -2,7 +2,7 @@ /** * PetTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class PetTest extends TestCase */ public function testPet() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class PetTest extends TestCase */ public function testPropertyId() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class PetTest extends TestCase */ public function testPropertyCategory() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class PetTest extends TestCase */ public function testPropertyName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,6 +111,8 @@ class PetTest extends TestCase */ public function testPropertyPhotoUrls() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -111,6 +120,8 @@ class PetTest extends TestCase */ public function testPropertyTags() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -118,5 +129,7 @@ class PetTest extends TestCase */ public function testPropertyStatus() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php index 3cdf837b8f4..e9ca89bc41a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/ReadOnlyFirstTest.php @@ -2,7 +2,7 @@ /** * ReadOnlyFirstTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class ReadOnlyFirstTest extends TestCase */ public function testReadOnlyFirst() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class ReadOnlyFirstTest extends TestCase */ public function testPropertyBar() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class ReadOnlyFirstTest extends TestCase */ public function testPropertyBaz() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SingleRefTypeTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SingleRefTypeTest.php index 721ac183ec3..6d2b5953da1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SingleRefTypeTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SingleRefTypeTest.php @@ -2,7 +2,7 @@ /** * SingleRefTypeTest * - * PHP version 7.3 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php index 04c7034330d..589e5af215c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/SpecialModelNameTest.php @@ -2,7 +2,7 @@ /** * SpecialModelNameTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class SpecialModelNameTest extends TestCase */ public function testSpecialModelName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,5 +84,7 @@ class SpecialModelNameTest extends TestCase */ public function testPropertySpecialPropertyName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php index d3b2e925986..74baa57984c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TagTest.php @@ -2,7 +2,7 @@ /** * TagTest * - * PHP version 7.2 + * PHP version 7.4 * * @category Class * @package OpenAPI\Client @@ -16,9 +16,8 @@ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * * The version of the OpenAPI document: 1.0.0 - * * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 5.0.0-SNAPSHOT + * OpenAPI Generator version: 6.1.0-SNAPSHOT */ /** @@ -27,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client; +namespace OpenAPI\Client\Test\Model; use PHPUnit\Framework\TestCase; @@ -76,6 +75,8 @@ class TagTest extends TestCase */ public function testTag() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class TagTest extends TestCase */ public function testPropertyId() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,5 +93,7 @@ class TagTest extends TestCase */ public function testPropertyName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php deleted file mode 100644 index 75ea9e66f55..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/TypeHolderDefaultTest.php +++ /dev/null @@ -1,115 +0,0 @@ -markTestIncomplete('Not implemented'); } /** @@ -83,6 +84,8 @@ class UserTest extends TestCase */ public function testPropertyId() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -90,6 +93,8 @@ class UserTest extends TestCase */ public function testPropertyUsername() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -97,6 +102,8 @@ class UserTest extends TestCase */ public function testPropertyFirstName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -104,6 +111,8 @@ class UserTest extends TestCase */ public function testPropertyLastName() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -111,6 +120,8 @@ class UserTest extends TestCase */ public function testPropertyEmail() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -118,6 +129,8 @@ class UserTest extends TestCase */ public function testPropertyPassword() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -125,6 +138,8 @@ class UserTest extends TestCase */ public function testPropertyPhone() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } /** @@ -132,5 +147,7 @@ class UserTest extends TestCase */ public function testPropertyUserStatus() { + // TODO: implement + $this->markTestIncomplete('Not implemented'); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php deleted file mode 100644 index 4dc01deb482..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/XmlItemTest.php +++ /dev/null @@ -1,283 +0,0 @@ -fakeHttpClient = new FakeHttpClient(); + $this->api = new Api\PetApi($this->fakeHttpClient); + $this->pet = new Model\Pet(); + } + + public function testServerVariablesInOperation(): void + { + # Test default values (if no variables are set) + $this->api->addPet($this->pet, 2); + $request = $this->fakeHttpClient->getLastRequest(); + + $this->assertEquals('petstore.swagger.io', $request->getUri()->getHost(), 'Server variable set to default value.'); + + # Test variables substitution + $this->api->addPet($this->pet, 2, [ 'server' => 'qa-petstore', 'port' => '8080']); + $request = $this->fakeHttpClient->getLastRequest(); + + $this->assertEquals('qa-petstore.swagger.io', $request->getUri()->getHost(), 'Server set to "qa-petstore"'); + $this->assertEquals(8080, $request->getUri()->getPort(), 'Port set to 8080'); + } + + public function testLegacyServerChoiceInOperation(): void + { + # Test legacy behavior (set server using api->setHostIndex() + $this->api->setHostIndex(1); + $this->api->addPet($this->pet); + $request = $this->fakeHttpClient->getLastRequest(); + + $this->assertEquals('path-server-test.petstore.local', $request->getUri()->getHost(), 'Server set using legacy behavior'); + } + + public function testInvalidVariableValueInOperation(): void + { + $this->expectException(InvalidArgumentException::class); + $this->api->addPet($this->pet, 2,['server' => 'invalid-value']); + } +} diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb index a84ea63b3e9..f78e641bea9 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb @@ -315,6 +315,29 @@ module Petstore { url: "http://path-server-test.petstore.local/v2", description: "No description provided", + }, + { + url: "http://{server}.swagger.io:{port}/v2", + description: "test server with variables", + variables: { + server: { + description: "target server", + default_value: "petstore", + enum_values: [ + "petstore", + "qa-petstore", + "dev-petstore" + ] + }, + port: { + description: "No description provided", + default_value: "80", + enum_values: [ + "80", + "8080" + ] + } + } } ], "PetApi.update_pet": [ @@ -325,6 +348,29 @@ module Petstore { url: "http://path-server-test.petstore.local/v2", description: "No description provided", + }, + { + url: "http://{server}.swagger.io:{port}/v2", + description: "test server with variables", + variables: { + server: { + description: "target server", + default_value: "petstore", + enum_values: [ + "petstore", + "qa-petstore", + "dev-petstore" + ] + }, + port: { + description: "No description provided", + default_value: "80", + enum_values: [ + "80", + "8080" + ] + } + } } ], } diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index ad9cbbf0b9e..5c647db7d68 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -312,6 +312,29 @@ module Petstore { url: "http://path-server-test.petstore.local/v2", description: "No description provided", + }, + { + url: "http://{server}.swagger.io:{port}/v2", + description: "test server with variables", + variables: { + server: { + description: "target server", + default_value: "petstore", + enum_values: [ + "petstore", + "qa-petstore", + "dev-petstore" + ] + }, + port: { + description: "No description provided", + default_value: "80", + enum_values: [ + "80", + "8080" + ] + } + } } ], "PetApi.update_pet": [ @@ -322,6 +345,29 @@ module Petstore { url: "http://path-server-test.petstore.local/v2", description: "No description provided", + }, + { + url: "http://{server}.swagger.io:{port}/v2", + description: "test server with variables", + variables: { + server: { + description: "target server", + default_value: "petstore", + enum_values: [ + "petstore", + "qa-petstore", + "dev-petstore" + ] + }, + port: { + description: "No description provided", + default_value: "80", + enum_values: [ + "80", + "8080" + ] + } + } } ], } diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py index ed1d8d6c504..14cf58697c0 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/pet_api.py @@ -104,7 +104,8 @@ class PetApi(object): local_var_hosts = [ 'http://petstore.swagger.io/v2', - 'http://path-server-test.petstore.local/v2' + 'http://path-server-test.petstore.local/v2', + 'http://{server}.swagger.io:{port}/v2' ] local_var_host = local_var_hosts[0] if kwargs.get('_host_index'): @@ -812,7 +813,8 @@ class PetApi(object): local_var_hosts = [ 'http://petstore.swagger.io/v2', - 'http://path-server-test.petstore.local/v2' + 'http://path-server-test.petstore.local/v2', + 'http://{server}.swagger.io:{port}/v2' ] local_var_host = local_var_hosts[0] if kwargs.get('_host_index'):