forked from loafle/openapi-generator-original
Fix content type (#179)
* Update php client with OAS3 * Fix content type the endpoint consumes 'application/x-www-form-urlencoded' * Regenerate php client from OAS3 * Update the test case according to the fix on spec
This commit is contained in:
committed by
William Cheng
parent
72ffc95d6e
commit
5e05638360
@@ -24,7 +24,7 @@ $apiInstance = new Swagger\Client\Api\AnotherFakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$client = new \Swagger\Client\Model\Client(); // Client | client model
|
||||
$client = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model
|
||||
|
||||
try {
|
||||
$result = $apiInstance->testSpecialTags($client);
|
||||
@@ -39,7 +39,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](../Model/Client.md)| client model |
|
||||
**client** | [**\Swagger\Client\Model\Client**](../Model/Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$outer_composite = new \Swagger\Client\Model\OuterComposite(); // OuterComposite | Input composite as post body
|
||||
$outer_composite = new \Swagger\Client\Model\OuterComposite(); // \Swagger\Client\Model\OuterComposite | Input composite as post body
|
||||
|
||||
try {
|
||||
$result = $apiInstance->fakeOuterCompositeSerialize($outer_composite);
|
||||
@@ -96,7 +96,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**outer_composite** | [**OuterComposite**](../Model/OuterComposite.md)| Input composite as post body | [optional]
|
||||
**outer_composite** | [**\Swagger\Client\Model\OuterComposite**](../Model/OuterComposite.md)| Input composite as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -228,7 +228,7 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$client = new \Swagger\Client\Model\Client(); // Client | client model
|
||||
$client = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model
|
||||
|
||||
try {
|
||||
$result = $apiInstance->testClientModel($client);
|
||||
@@ -243,7 +243,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](../Model/Client.md)| client model |
|
||||
**client** | [**\Swagger\Client\Model\Client**](../Model/Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -359,11 +359,11 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$enum_header_string_array = array("enum_header_string_array_example"); // string[] | Header parameter enum test (string array)
|
||||
$enum_header_string = "enum_header_string_example"; // string | Header parameter enum test (string)
|
||||
$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 = "enum_query_string_example"; // string | Query parameter enum test (string)
|
||||
$enum_query_string = "-efg"; // string | Query parameter enum test (string)
|
||||
$enum_query_integer = 56; // int | Query parameter enum test (double)
|
||||
$enum_query_double = 1.2; // double | 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 = "enum_form_string_example"; // string | Form parameter enum test (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]
|
||||
**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]
|
||||
**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]
|
||||
@@ -404,7 +404,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties($unknown_base_type)
|
||||
> testInlineAdditionalProperties($UNKNOWN_PARAM_NAME)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
@@ -418,10 +418,10 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$unknown_base_type = new \Swagger\Client\Model\UNKNOWN_BASE_TYPE(); // map[string,string] | request body
|
||||
$UNKNOWN_PARAM_NAME = new \Swagger\Client\Model\null(); // | request body
|
||||
|
||||
try {
|
||||
$apiInstance->testInlineAdditionalProperties($unknown_base_type);
|
||||
$apiInstance->testInlineAdditionalProperties($UNKNOWN_PARAM_NAME);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling FakeApi->testInlineAdditionalProperties: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
@@ -432,7 +432,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**unknown_base_type** | [**map[string,string]**](../Model/UNKNOWN_BASE_TYPE.md)| request body |
|
||||
**UNKNOWN_PARAM_NAME** | [****](../Model/.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -450,7 +450,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData($body4)
|
||||
> testJsonFormData($param, $param2)
|
||||
|
||||
test json serialization of form data
|
||||
|
||||
@@ -464,10 +464,11 @@ $apiInstance = new Swagger\Client\Api\FakeApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$body4 = new \Swagger\Client\Model\Body4(); // Body4 |
|
||||
$param = "param_example"; // string | field1
|
||||
$param2 = "param2_example"; // string | field2
|
||||
|
||||
try {
|
||||
$apiInstance->testJsonFormData($body4);
|
||||
$apiInstance->testJsonFormData($param, $param2);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling FakeApi->testJsonFormData: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
@@ -478,7 +479,8 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body4** | [**Body4**](../Model/Body4.md)| | [optional]
|
||||
**param** | **string**| field1 |
|
||||
**param2** | **string**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -490,7 +492,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
||||
@@ -30,7 +30,7 @@ $apiInstance = new Swagger\Client\Api\FakeClassnameTags123Api(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$client = new \Swagger\Client\Model\Client(); // Client | client model
|
||||
$client = new \Swagger\Client\Model\Client(); // \Swagger\Client\Model\Client | client model
|
||||
|
||||
try {
|
||||
$result = $apiInstance->testClassname($client);
|
||||
@@ -45,7 +45,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**client** | [**Client**](../Model/Client.md)| client model |
|
||||
**client** | [**\Swagger\Client\Model\Client**](../Model/Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$pet = new \Swagger\Client\Model\Pet(); // Pet | Pet object that needs to be added to the store
|
||||
$pet = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
$apiInstance->addPet($pet);
|
||||
@@ -47,7 +47,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
|
||||
**pet** | [**\Swagger\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -83,7 +83,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$pet_id = 789; // int | Pet id to delete
|
||||
$pet_id = 56; // int | Pet id to delete
|
||||
$api_key = "api_key_example"; // string |
|
||||
|
||||
try {
|
||||
@@ -245,7 +245,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$pet_id = 789; // int | ID of pet to return
|
||||
$pet_id = 56; // int | ID of pet to return
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getPetById($pet_id);
|
||||
@@ -296,7 +296,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$pet = new \Swagger\Client\Model\Pet(); // Pet | Pet object that needs to be added to the store
|
||||
$pet = new \Swagger\Client\Model\Pet(); // \Swagger\Client\Model\Pet | Pet object that needs to be added to the store
|
||||
|
||||
try {
|
||||
$apiInstance->updatePet($pet);
|
||||
@@ -310,7 +310,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet** | [**Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
|
||||
**pet** | [**\Swagger\Client\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -346,7 +346,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$pet_id = 789; // int | ID of pet that needs to be updated
|
||||
$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
|
||||
|
||||
@@ -400,7 +400,7 @@ $apiInstance = new Swagger\Client\Api\PetApi(
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$pet_id = 789; // int | ID of pet to update
|
||||
$pet_id = 56; // int | ID of pet to update
|
||||
$additional_metadata = "additional_metadata_example"; // string | Additional data to pass to server
|
||||
$file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ $apiInstance = new Swagger\Client\Api\StoreApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$order_id = 789; // int | ID of pet that needs to be fetched
|
||||
$order_id = 56; // int | ID of pet that needs to be fetched
|
||||
|
||||
try {
|
||||
$result = $apiInstance->getOrderById($order_id);
|
||||
@@ -173,7 +173,7 @@ $apiInstance = new Swagger\Client\Api\StoreApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$order = new \Swagger\Client\Model\Order(); // Order | order placed for purchasing the pet
|
||||
$order = new \Swagger\Client\Model\Order(); // \Swagger\Client\Model\Order | order placed for purchasing the pet
|
||||
|
||||
try {
|
||||
$result = $apiInstance->placeOrder($order);
|
||||
@@ -188,7 +188,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**order** | [**Order**](../Model/Order.md)| order placed for purchasing the pet |
|
||||
**order** | [**\Swagger\Client\Model\Order**](../Model/Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$user = new \Swagger\Client\Model\User(); // User | Created user object
|
||||
$user = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User | Created user object
|
||||
|
||||
try {
|
||||
$apiInstance->createUser($user);
|
||||
@@ -45,7 +45,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**User**](../Model/User.md)| Created user object |
|
||||
**user** | [**\Swagger\Client\Model\User**](../Model/User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -77,7 +77,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$user = array(new \Swagger\Client\Model\User()); // \Swagger\Client\Model\User[] | List of user object
|
||||
$user = array(new \Swagger\Client\Model\array()); // \Swagger\Client\Model\User[] | List of user object
|
||||
|
||||
try {
|
||||
$apiInstance->createUsersWithArrayInput($user);
|
||||
@@ -91,7 +91,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object |
|
||||
**user** | [**\Swagger\Client\Model\User[]**](../Model/array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -123,7 +123,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$user = array(new \Swagger\Client\Model\User()); // \Swagger\Client\Model\User[] | List of user object
|
||||
$user = array(new \Swagger\Client\Model\array()); // \Swagger\Client\Model\User[] | List of user object
|
||||
|
||||
try {
|
||||
$apiInstance->createUsersWithListInput($user);
|
||||
@@ -137,7 +137,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**\Swagger\Client\Model\User[]**](../Model/User.md)| List of user object |
|
||||
**user** | [**\Swagger\Client\Model\User[]**](../Model/array.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -358,7 +358,7 @@ $apiInstance = new Swagger\Client\Api\UserApi(
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$username = "username_example"; // string | name that need to be deleted
|
||||
$user = new \Swagger\Client\Model\User(); // User | Updated user object
|
||||
$user = new \Swagger\Client\Model\User(); // \Swagger\Client\Model\User | Updated user object
|
||||
|
||||
try {
|
||||
$apiInstance->updateUser($username, $user);
|
||||
@@ -373,7 +373,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| name that need to be deleted |
|
||||
**user** | [**User**](../Model/User.md)| Updated user object |
|
||||
**user** | [**\Swagger\Client\Model\User**](../Model/User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# SpecialModelName
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**special_property_name** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user