forked from loafle/openapi-generator-original
Fix default value (#260)
* Fix missing default value of form param * Update php sample with OAS2 * Update php sample with OAS3 * Delete quotes as default value may have integer * Update php samples with OAS2 * use toDefaultValue() in order to apply the decoration rules of generator * Update php samples with OAS2 * Tweak: add quotes only if example is null * Update php sample with OAS2 * Update php sample with OAS3
This commit is contained in:
committed by
William Cheng
parent
aa5719e008
commit
be19724849
@@ -2514,7 +2514,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
// set default value
|
||||
if (parameterSchema.getDefault() != null) {
|
||||
codegenParameter.defaultValue = String.valueOf(parameterSchema.getDefault());
|
||||
codegenParameter.defaultValue = toDefaultValue(parameterSchema);
|
||||
}
|
||||
// TDOO revise collectionFormat
|
||||
String collectionFormat = null;
|
||||
|
||||
@@ -586,9 +586,9 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
|
||||
if ("String".equalsIgnoreCase(type) || p.isString) {
|
||||
if (example == null) {
|
||||
example = p.paramName + "_example";
|
||||
example = "'" + p.paramName + "_example'";
|
||||
}
|
||||
example = "\"" + escapeText(example) + "\"";
|
||||
example = escapeText(example);
|
||||
} else if ("Integer".equals(type) || "int".equals(type)) {
|
||||
if (example == null) {
|
||||
example = "56";
|
||||
|
||||
@@ -97,7 +97,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* @throws \InvalidArgumentException
|
||||
* @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
*/
|
||||
public function {{operationId}}({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
public function {{operationId}}({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
{
|
||||
{{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
return $response;{{/returnType}}
|
||||
@@ -122,7 +122,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function {{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
public function {{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
{
|
||||
$returnType = '{{returnType}}';
|
||||
$request = $this->{{operationId}}Request({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
@@ -211,7 +211,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function {{operationId}}Async({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
public function {{operationId}}Async({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
{
|
||||
return $this->{{operationId}}AsyncWithHttpInfo({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
->then(
|
||||
@@ -237,7 +237,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function {{operationId}}AsyncWithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
public function {{operationId}}AsyncWithHttpInfo({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
{
|
||||
$returnType = '{{returnType}}';
|
||||
$request = $this->{{operationId}}Request({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
@@ -294,7 +294,7 @@ use {{invokerPackage}}\ObjectSerializer;
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function {{operationId}}Request({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
protected function {{operationId}}Request({{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
{
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
|
||||
@@ -180,7 +180,7 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$body = "body_example"; // string | Input string as post body
|
||||
$body = 'body_example'; // string | Input string as post body
|
||||
|
||||
try {
|
||||
$result = $apiInstance->fakeOuterStringSerialize($body);
|
||||
@@ -227,7 +227,7 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$query = "query_example"; // string |
|
||||
$query = 'query_example'; // string |
|
||||
$user = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User |
|
||||
|
||||
try {
|
||||
@@ -335,18 +335,18 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
);
|
||||
$number = 3.4; // float | None
|
||||
$double = 3.4; // double | None
|
||||
$pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None
|
||||
$byte = "byte_example"; // string | None
|
||||
$pattern_without_delimiter = 'pattern_without_delimiter_example'; // string | None
|
||||
$byte = 'byte_example'; // string | None
|
||||
$integer = 56; // int | None
|
||||
$int32 = 56; // int | None
|
||||
$int64 = 56; // int | None
|
||||
$float = 3.4; // float | None
|
||||
$string = "string_example"; // string | None
|
||||
$string = 'string_example'; // string | None
|
||||
$binary = "/path/to/file.txt"; // \SplFileObject | None
|
||||
$date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | None
|
||||
$date_time = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | None
|
||||
$password = "password_example"; // string | None
|
||||
$callback = "callback_example"; // string | None
|
||||
$password = 'password_example'; // string | None
|
||||
$callback = 'callback_example'; // string | None
|
||||
|
||||
try {
|
||||
$apiInstance->testEndpointParameters($number, $double, $pattern_without_delimiter, $byte, $integer, $int32, $int64, $float, $string, $binary, $date, $date_time, $password, $callback);
|
||||
@@ -407,14 +407,14 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$enum_header_string_array = array("enum_header_string_array_example"); // string[] | Header parameter enum test (string array)
|
||||
$enum_header_string = "-efg"; // string | Header parameter enum test (string)
|
||||
$enum_query_string_array = array("enum_query_string_array_example"); // string[] | Query parameter enum test (string array)
|
||||
$enum_query_string = "-efg"; // string | Query parameter enum test (string)
|
||||
$enum_header_string_array = array('enum_header_string_array_example'); // string[] | Header parameter enum test (string array)
|
||||
$enum_header_string = '-efg'; // string | Header parameter enum test (string)
|
||||
$enum_query_string_array = array('enum_query_string_array_example'); // string[] | Query parameter enum test (string array)
|
||||
$enum_query_string = '-efg'; // string | Query parameter enum test (string)
|
||||
$enum_query_integer = 56; // int | Query parameter enum test (double)
|
||||
$enum_query_double = 3.4; // double | Query parameter enum test (double)
|
||||
$enum_form_string_array = new \Swagger\Client\Model\array(); // string[] | Form parameter enum test (string array)
|
||||
$enum_form_string = "'-efg'"; // string | Form parameter enum test (string)
|
||||
$enum_form_string = '-efg'; // string | Form parameter enum test (string)
|
||||
|
||||
try {
|
||||
$apiInstance->testEnumParameters($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
@@ -429,9 +429,9 @@ try {
|
||||
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_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_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_form_string_array** | [**string[]**](../Model/array.md)| Form parameter enum test (string array) | [optional]
|
||||
@@ -467,7 +467,7 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$request_body = array('key' => "request_body_example"); // string | request body
|
||||
$request_body = array('key' => 'request_body_example'); // string | request body
|
||||
|
||||
try {
|
||||
$apiInstance->testInlineAdditionalProperties($request_body);
|
||||
@@ -513,8 +513,8 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$param = "param_example"; // string | field1
|
||||
$param2 = "param2_example"; // string | field2
|
||||
$param = 'param_example'; // string | field1
|
||||
$param2 = 'param2_example'; // string | field2
|
||||
|
||||
try {
|
||||
$apiInstance->testJsonFormData($param, $param2);
|
||||
|
||||
@@ -84,7 +84,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | Pet id to delete
|
||||
$api_key = "api_key_example"; // string |
|
||||
$api_key = 'api_key_example'; // string |
|
||||
|
||||
try {
|
||||
$apiInstance->deletePet($pet_id, $api_key);
|
||||
@@ -137,7 +137,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$status = array("status_example"); // string[] | Status values that need to be considered for filter
|
||||
$status = array('status_example'); // string[] | Status values that need to be considered for filter
|
||||
|
||||
try {
|
||||
$result = $apiInstance->findPetsByStatus($status);
|
||||
@@ -190,7 +190,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$tags = array("tags_example"); // string[] | Tags to filter by
|
||||
$tags = array('tags_example'); // string[] | Tags to filter by
|
||||
|
||||
try {
|
||||
$result = $apiInstance->findPetsByTags($tags);
|
||||
@@ -347,8 +347,8 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | ID of pet that needs to be updated
|
||||
$name = "name_example"; // string | Updated name of the pet
|
||||
$status = "status_example"; // string | Updated status of the pet
|
||||
$name = 'name_example'; // string | Updated name of the pet
|
||||
$status = 'status_example'; // string | Updated status of the pet
|
||||
|
||||
try {
|
||||
$apiInstance->updatePetWithForm($pet_id, $name, $status);
|
||||
@@ -401,7 +401,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | ID of pet to update
|
||||
$additional_metadata = "additional_metadata_example"; // string | Additional data to pass to server
|
||||
$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server
|
||||
$file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
|
||||
try {
|
||||
|
||||
@@ -27,7 +27,7 @@ $apiInstance = new Swagger\Client\Api\StoreApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$order_id = "order_id_example"; // string | ID of the order that needs to be deleted
|
||||
$order_id = 'order_id_example'; // string | ID of the order that needs to be deleted
|
||||
|
||||
try {
|
||||
$apiInstance->deleteOrder($order_id);
|
||||
|
||||
@@ -171,7 +171,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | The name that needs to be deleted
|
||||
$username = 'username_example'; // string | The name that needs to be deleted
|
||||
|
||||
try {
|
||||
$apiInstance->deleteUser($username);
|
||||
@@ -217,7 +217,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
$username = 'username_example'; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getUserByName($username);
|
||||
@@ -264,8 +264,8 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | The user name for login
|
||||
$password = "password_example"; // string | The password for login in clear text
|
||||
$username = 'username_example'; // string | The user name for login
|
||||
$password = 'password_example'; // string | The password for login in clear text
|
||||
|
||||
try {
|
||||
$result = $apiInstance->loginUser($username, $password);
|
||||
@@ -357,7 +357,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | name that need to be deleted
|
||||
$username = 'username_example'; // string | name that need to be deleted
|
||||
$user = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User | Updated user object
|
||||
|
||||
try {
|
||||
|
||||
@@ -1977,9 +1977,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -1989,7 +1989,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return void
|
||||
*/
|
||||
public function testEnumParameters($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParameters($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
$this->testEnumParametersWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
}
|
||||
@@ -2000,9 +2000,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -2012,7 +2012,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function testEnumParametersWithHttpInfo($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParametersWithHttpInfo($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
@@ -2060,9 +2060,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -2071,7 +2071,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function testEnumParametersAsync($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParametersAsync($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
return $this->testEnumParametersAsyncWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string)
|
||||
->then(
|
||||
@@ -2087,9 +2087,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -2098,7 +2098,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function testEnumParametersAsyncWithHttpInfo($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParametersAsyncWithHttpInfo($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
@@ -2130,9 +2130,9 @@ class FakeApi
|
||||
* Create request for operation 'testEnumParameters'
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -2141,7 +2141,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected 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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
protected 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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
|
||||
$resourcePath = '/fake';
|
||||
|
||||
@@ -179,7 +179,7 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$body = "body_example"; // string | Input string as post body
|
||||
$body = 'body_example'; // string | Input string as post body
|
||||
|
||||
try {
|
||||
$result = $apiInstance->fakeOuterStringSerialize($body);
|
||||
@@ -286,18 +286,18 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
);
|
||||
$number = 3.4; // float | None
|
||||
$double = 3.4; // double | None
|
||||
$pattern_without_delimiter = "pattern_without_delimiter_example"; // string | None
|
||||
$byte = "byte_example"; // string | None
|
||||
$pattern_without_delimiter = 'pattern_without_delimiter_example'; // string | None
|
||||
$byte = 'byte_example'; // string | None
|
||||
$integer = 56; // int | None
|
||||
$int32 = 56; // int | None
|
||||
$int64 = 56; // int | None
|
||||
$float = 3.4; // float | None
|
||||
$string = "string_example"; // string | None
|
||||
$string = 'string_example'; // string | None
|
||||
$binary = "/path/to/file.txt"; // \SplFileObject | None
|
||||
$date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | None
|
||||
$date_time = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | None
|
||||
$password = "password_example"; // string | None
|
||||
$callback = "callback_example"; // string | None
|
||||
$password = 'password_example'; // string | None
|
||||
$callback = 'callback_example'; // string | None
|
||||
|
||||
try {
|
||||
$apiInstance->testEndpointParameters($number, $double, $pattern_without_delimiter, $byte, $integer, $int32, $int64, $float, $string, $binary, $date, $date_time, $password, $callback);
|
||||
@@ -358,14 +358,14 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$enum_header_string_array = array("enum_header_string_array_example"); // string[] | Header parameter enum test (string array)
|
||||
$enum_header_string = "-efg"; // string | Header parameter enum test (string)
|
||||
$enum_query_string_array = array("enum_query_string_array_example"); // string[] | Query parameter enum test (string array)
|
||||
$enum_query_string = "-efg"; // string | Query parameter enum test (string)
|
||||
$enum_header_string_array = array('enum_header_string_array_example'); // string[] | Header parameter enum test (string array)
|
||||
$enum_header_string = '-efg'; // string | Header parameter enum test (string)
|
||||
$enum_query_string_array = array('enum_query_string_array_example'); // string[] | Query parameter enum test (string array)
|
||||
$enum_query_string = '-efg'; // string | Query parameter enum test (string)
|
||||
$enum_query_integer = 56; // int | Query parameter enum test (double)
|
||||
$enum_query_double = 3.4; // double | Query parameter enum test (double)
|
||||
$enum_form_string_array = new \Swagger\Client\Model\array(); // string[] | Form parameter enum test (string array)
|
||||
$enum_form_string = "'-efg'"; // string | Form parameter enum test (string)
|
||||
$enum_form_string = '-efg'; // string | Form parameter enum test (string)
|
||||
|
||||
try {
|
||||
$apiInstance->testEnumParameters($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
@@ -380,9 +380,9 @@ try {
|
||||
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_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_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_form_string_array** | [**string[]**](../Model/array.md)| Form parameter enum test (string array) | [optional]
|
||||
@@ -464,8 +464,8 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$param = "param_example"; // string | field1
|
||||
$param2 = "param2_example"; // string | field2
|
||||
$param = 'param_example'; // string | field1
|
||||
$param2 = 'param2_example'; // string | field2
|
||||
|
||||
try {
|
||||
$apiInstance->testJsonFormData($param, $param2);
|
||||
|
||||
@@ -84,7 +84,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | Pet id to delete
|
||||
$api_key = "api_key_example"; // string |
|
||||
$api_key = 'api_key_example'; // string |
|
||||
|
||||
try {
|
||||
$apiInstance->deletePet($pet_id, $api_key);
|
||||
@@ -137,7 +137,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$status = array("status_example"); // string[] | Status values that need to be considered for filter
|
||||
$status = array('status_example'); // string[] | Status values that need to be considered for filter
|
||||
|
||||
try {
|
||||
$result = $apiInstance->findPetsByStatus($status);
|
||||
@@ -190,7 +190,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$tags = array("tags_example"); // string[] | Tags to filter by
|
||||
$tags = array('tags_example'); // string[] | Tags to filter by
|
||||
|
||||
try {
|
||||
$result = $apiInstance->findPetsByTags($tags);
|
||||
@@ -347,8 +347,8 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | ID of pet that needs to be updated
|
||||
$name = "name_example"; // string | Updated name of the pet
|
||||
$status = "status_example"; // string | Updated status of the pet
|
||||
$name = 'name_example'; // string | Updated name of the pet
|
||||
$status = 'status_example'; // string | Updated status of the pet
|
||||
|
||||
try {
|
||||
$apiInstance->updatePetWithForm($pet_id, $name, $status);
|
||||
@@ -401,7 +401,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | ID of pet to update
|
||||
$additional_metadata = "additional_metadata_example"; // string | Additional data to pass to server
|
||||
$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server
|
||||
$file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
|
||||
try {
|
||||
|
||||
@@ -27,7 +27,7 @@ $apiInstance = new Swagger\Client\Api\StoreApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$order_id = "order_id_example"; // string | ID of the order that needs to be deleted
|
||||
$order_id = 'order_id_example'; // string | ID of the order that needs to be deleted
|
||||
|
||||
try {
|
||||
$apiInstance->deleteOrder($order_id);
|
||||
|
||||
@@ -171,7 +171,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | The name that needs to be deleted
|
||||
$username = 'username_example'; // string | The name that needs to be deleted
|
||||
|
||||
try {
|
||||
$apiInstance->deleteUser($username);
|
||||
@@ -217,7 +217,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
$username = 'username_example'; // string | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getUserByName($username);
|
||||
@@ -264,8 +264,8 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | The user name for login
|
||||
$password = "password_example"; // string | The password for login in clear text
|
||||
$username = 'username_example'; // string | The user name for login
|
||||
$password = 'password_example'; // string | The password for login in clear text
|
||||
|
||||
try {
|
||||
$result = $apiInstance->loginUser($username, $password);
|
||||
@@ -357,7 +357,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | name that need to be deleted
|
||||
$username = 'username_example'; // string | name that need to be deleted
|
||||
$user = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User | Updated user object
|
||||
|
||||
try {
|
||||
|
||||
@@ -1738,9 +1738,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -1750,7 +1750,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return void
|
||||
*/
|
||||
public function testEnumParameters($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParameters($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
$this->testEnumParametersWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
}
|
||||
@@ -1761,9 +1761,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -1773,7 +1773,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function testEnumParametersWithHttpInfo($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParametersWithHttpInfo($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
@@ -1821,9 +1821,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -1832,7 +1832,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function testEnumParametersAsync($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParametersAsync($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
return $this->testEnumParametersAsyncWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string)
|
||||
->then(
|
||||
@@ -1848,9 +1848,9 @@ class FakeApi
|
||||
* To test enum parameters
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -1859,7 +1859,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function testEnumParametersAsyncWithHttpInfo($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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
public function testEnumParametersAsyncWithHttpInfo($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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->testEnumParametersRequest($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_form_string_array, $enum_form_string);
|
||||
@@ -1891,9 +1891,9 @@ class FakeApi
|
||||
* Create request for operation 'testEnumParameters'
|
||||
*
|
||||
* @param string[] $enum_header_string_array Header parameter enum test (string array) (optional)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_header_string Header parameter enum test (string) (optional, default to '-efg')
|
||||
* @param string[] $enum_query_string_array Query parameter enum test (string array) (optional)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to '-efg')
|
||||
* @param int $enum_query_integer Query parameter enum test (double) (optional)
|
||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||
* @param string[] $enum_form_string_array Form parameter enum test (string array) (optional)
|
||||
@@ -1902,7 +1902,7 @@ class FakeApi
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected 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_form_string_array = null, $enum_form_string = ''-efg'')
|
||||
protected 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_form_string_array = null, $enum_form_string = '-efg')
|
||||
{
|
||||
|
||||
$resourcePath = '/fake';
|
||||
|
||||
Reference in New Issue
Block a user