Update PHP Symfony server petstore with OAS2, OAS3 (#255)

* update php symfony with oas2 petstore

* update php symfony with oas3 petstore
This commit is contained in:
William Cheng
2018-04-28 14:38:37 +08:00
committed by GitHub
parent 5114cd96b0
commit 69133d3677
14 changed files with 174 additions and 154 deletions

View File

@@ -27,12 +27,10 @@ services:
```
## **addPet**
> addPet($body)
> addPet($pet)
Add a new pet to the store
### Example Implementation
```php
<?php
@@ -58,7 +56,7 @@ class PetApi implements PetApiInterface
/**
* Implementation of PetApiInterface#addPet
*/
public function addPet(Pet $body)
public function addPet(Pet $pet)
{
// Implement the operation ...
}
@@ -71,7 +69,7 @@ class PetApi implements PetApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Swagger\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Swagger\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -84,7 +82,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **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)
@@ -93,8 +91,6 @@ void (empty response body)
Deletes a pet
### Example Implementation
```php
<?php
@@ -147,7 +143,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **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)
@@ -338,12 +334,10 @@ Name | Type | Description | Notes
[[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)
## **updatePet**
> updatePet($body)
> updatePet($pet)
Update an existing pet
### Example Implementation
```php
<?php
@@ -369,7 +363,7 @@ class PetApi implements PetApiInterface
/**
* Implementation of PetApiInterface#updatePet
*/
public function updatePet(Pet $body)
public function updatePet(Pet $pet)
{
// Implement the operation ...
}
@@ -382,7 +376,7 @@ class PetApi implements PetApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Swagger\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
**pet** | [**Swagger\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -395,7 +389,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **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)
@@ -404,8 +398,6 @@ void (empty response body)
Updates a pet in the store with form data
### Example Implementation
```php
<?php
@@ -459,7 +451,7 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json
- **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)
@@ -468,8 +460,6 @@ void (empty response body)
uploads an image
### Example Implementation
```php
<?php
@@ -510,7 +500,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **int**| ID of pet to update |
**additionalMetadata** | **string**| Additional data to pass to server | [optional]
**file** | **UploadedFile**| file to upload | [optional]
**file** | **UploadedFile****UploadedFile**| file to upload | [optional]
### Return type

View File

@@ -72,7 +72,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **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)
@@ -190,12 +190,10 @@ 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)
## **placeOrder**
> Swagger\Server\Model\Order placeOrder($body)
> Swagger\Server\Model\Order placeOrder($order)
Place an order for a pet
### Example Implementation
```php
<?php
@@ -213,7 +211,7 @@ class StoreApi implements StoreApiInterface
/**
* Implementation of StoreApiInterface#placeOrder
*/
public function placeOrder(Order $body)
public function placeOrder(Order $order)
{
// Implement the operation ...
}
@@ -226,7 +224,7 @@ class StoreApi implements StoreApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Swagger\Server\Model\Order**](../Model/Order.md)| order placed for purchasing the pet |
**order** | [**Swagger\Server\Model\Order**](../Model/Order.md)| order placed for purchasing the pet |
### Return type
@@ -238,7 +236,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
[[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)

View File

@@ -27,7 +27,7 @@ services:
```
## **createUser**
> createUser($body)
> createUser($user)
Create user
@@ -50,7 +50,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#createUser
*/
public function createUser(User $body)
public function createUser(User $user)
{
// Implement the operation ...
}
@@ -63,7 +63,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Swagger\Server\Model\User**](../Model/User.md)| Created user object |
**user** | [**Swagger\Server\Model\User**](../Model/User.md)| Created user object |
### Return type
@@ -75,18 +75,16 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **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)
## **createUsersWithArrayInput**
> createUsersWithArrayInput($body)
> createUsersWithArrayInput($user)
Creates list of users with given input array
### Example Implementation
```php
<?php
@@ -104,7 +102,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#createUsersWithArrayInput
*/
public function createUsersWithArrayInput(array $body)
public function createUsersWithArrayInput(array $user)
{
// Implement the operation ...
}
@@ -117,7 +115,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Swagger\Server\Model\User**](../Model/User.md)| List of user object |
**user** | [**Swagger\Server\Model\User**](../Model/array.md)| List of user object |
### Return type
@@ -129,18 +127,16 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **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)
## **createUsersWithListInput**
> createUsersWithListInput($body)
> createUsersWithListInput($user)
Creates list of users with given input array
### Example Implementation
```php
<?php
@@ -158,7 +154,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#createUsersWithListInput
*/
public function createUsersWithListInput(array $body)
public function createUsersWithListInput(array $user)
{
// Implement the operation ...
}
@@ -171,7 +167,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Swagger\Server\Model\User**](../Model/User.md)| List of user object |
**user** | [**Swagger\Server\Model\User**](../Model/array.md)| List of user object |
### Return type
@@ -183,8 +179,8 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **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)
@@ -238,7 +234,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **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)
@@ -247,8 +243,6 @@ No authorization required
Get user by user name
### Example Implementation
```php
<?php
@@ -301,8 +295,6 @@ No authorization required
Logs user into the system
### Example Implementation
```php
<?php
@@ -356,8 +348,6 @@ No authorization required
Logs out current logged in user session
### Example Implementation
```php
<?php
@@ -398,12 +388,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **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)
## **updateUser**
> updateUser($username, $body)
> updateUser($username, $user)
Updated user
@@ -426,7 +416,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#updateUser
*/
public function updateUser($username, User $body)
public function updateUser($username, User $user)
{
// Implement the operation ...
}
@@ -440,7 +430,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**body** | [**Swagger\Server\Model\User**](../Model/User.md)| Updated user object |
**user** | [**Swagger\Server\Model\User**](../Model/User.md)| Updated user object |
### Return type
@@ -452,8 +442,8 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **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)