Swagger parser update: 2.0.8-OpenAPITools.org-1 (#1721)

* Update Swagger-Parser Version

* Update samples

* surpress javadoc warning

* fix TS tests

* Set version to 2.0.8-OpenAPITools.org-1
This commit is contained in:
Jérémie Bresson
2018-12-22 11:12:08 +01:00
committed by William Cheng
parent 43abd61144
commit a7dfc650b6
715 changed files with 6588 additions and 6470 deletions

View File

@@ -66,14 +66,14 @@ interface PetApiInterface
*
* Add a new pet to the store
*
* @param OpenAPI\Server\Model\Pet $pet Pet object that needs to be added to the store (required)
* @param OpenAPI\Server\Model\Pet $body Pet object that needs to be added to the store (required)
* @param integer $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return void
*
*/
public function addPet(Pet $pet, &$responseCode, array &$responseHeaders);
public function addPet(Pet $body, &$responseCode, array &$responseHeaders);
/**
* Operation deletePet
@@ -137,14 +137,14 @@ interface PetApiInterface
*
* Update an existing pet
*
* @param OpenAPI\Server\Model\Pet $pet Pet object that needs to be added to the store (required)
* @param OpenAPI\Server\Model\Pet $body Pet object that needs to be added to the store (required)
* @param integer $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return void
*
*/
public function updatePet(Pet $pet, &$responseCode, array &$responseHeaders);
public function updatePet(Pet $body, &$responseCode, array &$responseHeaders);
/**
* Operation updatePetWithForm

View File

@@ -97,12 +97,12 @@ interface StoreApiInterface
*
* Place an order for a pet
*
* @param OpenAPI\Server\Model\Order $order order placed for purchasing the pet (required)
* @param OpenAPI\Server\Model\Order $body order placed for purchasing the pet (required)
* @param integer $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return OpenAPI\Server\Model\Order[]
*
*/
public function placeOrder(Order $order, &$responseCode, array &$responseHeaders);
public function placeOrder(Order $body, &$responseCode, array &$responseHeaders);
}

View File

@@ -47,42 +47,42 @@ interface UserApiInterface
*
* Create user
*
* @param OpenAPI\Server\Model\User $user Created user object (required)
* @param OpenAPI\Server\Model\User $body Created user object (required)
* @param integer $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return void
*
*/
public function createUser(User $user, &$responseCode, array &$responseHeaders);
public function createUser(User $body, &$responseCode, array &$responseHeaders);
/**
* Operation createUsersWithArrayInput
*
* Creates list of users with given input array
*
* @param OpenAPI\Server\Model\User[] $user List of user object (required)
* @param OpenAPI\Server\Model\User[] $body List of user object (required)
* @param integer $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return void
*
*/
public function createUsersWithArrayInput(array $user, &$responseCode, array &$responseHeaders);
public function createUsersWithArrayInput(array $body, &$responseCode, array &$responseHeaders);
/**
* Operation createUsersWithListInput
*
* Creates list of users with given input array
*
* @param OpenAPI\Server\Model\User[] $user List of user object (required)
* @param OpenAPI\Server\Model\User[] $body List of user object (required)
* @param integer $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return void
*
*/
public function createUsersWithListInput(array $user, &$responseCode, array &$responseHeaders);
public function createUsersWithListInput(array $body, &$responseCode, array &$responseHeaders);
/**
* Operation deleteUser
@@ -146,12 +146,12 @@ interface UserApiInterface
* Updated user
*
* @param string $username name that need to be deleted (required)
* @param OpenAPI\Server\Model\User $user Updated user object (required)
* @param OpenAPI\Server\Model\User $body Updated user object (required)
* @param integer $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return void
*
*/
public function updateUser($username, User $user, &$responseCode, array &$responseHeaders);
public function updateUser($username, User $body, &$responseCode, array &$responseHeaders);
}

View File

@@ -82,18 +82,18 @@ class PetController extends Controller
$securitypetstore_auth = $request->headers->get('authorization');
// Read out all input parameter values into variables
$pet = $request->getContent();
$body = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$pet = $this->deserialize($pet, 'OpenAPI\Server\Model\Pet', $inputFormat);
$body = $this->deserialize($body, 'OpenAPI\Server\Model\Pet', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\Pet");
$response = $this->validate($pet, $asserts);
$response = $this->validate($body, $asserts);
if ($response instanceof Response) {
return $response;
}
@@ -108,7 +108,7 @@ class PetController extends Controller
// Make the call to the business logic
$responseCode = 204;
$responseHeaders = [];
$result = $handler->addPet($pet, $responseCode, $responseHeaders);
$result = $handler->addPet($body, $responseCode, $responseHeaders);
// Find default response message
$message = '';
@@ -510,18 +510,18 @@ class PetController extends Controller
$securitypetstore_auth = $request->headers->get('authorization');
// Read out all input parameter values into variables
$pet = $request->getContent();
$body = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$pet = $this->deserialize($pet, 'OpenAPI\Server\Model\Pet', $inputFormat);
$body = $this->deserialize($body, 'OpenAPI\Server\Model\Pet', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\Pet");
$response = $this->validate($pet, $asserts);
$response = $this->validate($body, $asserts);
if ($response instanceof Response) {
return $response;
}
@@ -536,7 +536,7 @@ class PetController extends Controller
// Make the call to the business logic
$responseCode = 204;
$responseHeaders = [];
$result = $handler->updatePet($pet, $responseCode, $responseHeaders);
$result = $handler->updatePet($body, $responseCode, $responseHeaders);
// Find default response message
$message = '';

View File

@@ -305,18 +305,18 @@ class StoreController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$order = $request->getContent();
$body = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$order = $this->deserialize($order, 'OpenAPI\Server\Model\Order', $inputFormat);
$body = $this->deserialize($body, 'OpenAPI\Server\Model\Order', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\Order");
$response = $this->validate($order, $asserts);
$response = $this->validate($body, $asserts);
if ($response instanceof Response) {
return $response;
}
@@ -329,7 +329,7 @@ class StoreController extends Controller
// Make the call to the business logic
$responseCode = 200;
$responseHeaders = [];
$result = $handler->placeOrder($order, $responseCode, $responseHeaders);
$result = $handler->placeOrder($body, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';

View File

@@ -78,18 +78,18 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$user = $request->getContent();
$body = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$user = $this->deserialize($user, 'OpenAPI\Server\Model\User', $inputFormat);
$body = $this->deserialize($body, 'OpenAPI\Server\Model\User', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\User");
$response = $this->validate($user, $asserts);
$response = $this->validate($body, $asserts);
if ($response instanceof Response) {
return $response;
}
@@ -102,7 +102,7 @@ class UserController extends Controller
// Make the call to the business logic
$responseCode = 204;
$responseHeaders = [];
$result = $handler->createUser($user, $responseCode, $responseHeaders);
$result = $handler->createUser($body, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';
@@ -160,12 +160,12 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$user = $request->getContent();
$body = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$user = $this->deserialize($user, 'array<OpenAPI\Server\Model\User>', $inputFormat);
$body = $this->deserialize($body, 'array<OpenAPI\Server\Model\User>', $inputFormat);
// Validate the input values
$asserts = [];
@@ -173,7 +173,7 @@ class UserController extends Controller
$asserts[] = new Assert\All([
new Assert\Type("OpenAPI\Server\Model\User")
]);
$response = $this->validate($user, $asserts);
$response = $this->validate($body, $asserts);
if ($response instanceof Response) {
return $response;
}
@@ -186,7 +186,7 @@ class UserController extends Controller
// Make the call to the business logic
$responseCode = 204;
$responseHeaders = [];
$result = $handler->createUsersWithArrayInput($user, $responseCode, $responseHeaders);
$result = $handler->createUsersWithArrayInput($body, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';
@@ -244,12 +244,12 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$user = $request->getContent();
$body = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$user = $this->deserialize($user, 'array<OpenAPI\Server\Model\User>', $inputFormat);
$body = $this->deserialize($body, 'array<OpenAPI\Server\Model\User>', $inputFormat);
// Validate the input values
$asserts = [];
@@ -257,7 +257,7 @@ class UserController extends Controller
$asserts[] = new Assert\All([
new Assert\Type("OpenAPI\Server\Model\User")
]);
$response = $this->validate($user, $asserts);
$response = $this->validate($body, $asserts);
if ($response instanceof Response) {
return $response;
}
@@ -270,7 +270,7 @@ class UserController extends Controller
// Make the call to the business logic
$responseCode = 204;
$responseHeaders = [];
$result = $handler->createUsersWithListInput($user, $responseCode, $responseHeaders);
$result = $handler->createUsersWithListInput($body, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';
@@ -634,13 +634,13 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$user = $request->getContent();
$body = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$username = $this->deserialize($username, 'string', 'string');
$user = $this->deserialize($user, 'OpenAPI\Server\Model\User', $inputFormat);
$body = $this->deserialize($body, 'OpenAPI\Server\Model\User', $inputFormat);
// Validate the input values
$asserts = [];
@@ -653,7 +653,7 @@ class UserController extends Controller
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("OpenAPI\Server\Model\User");
$response = $this->validate($user, $asserts);
$response = $this->validate($body, $asserts);
if ($response instanceof Response) {
return $response;
}
@@ -666,7 +666,7 @@ class UserController extends Controller
// Make the call to the business logic
$responseCode = 204;
$responseHeaders = [];
$result = $handler->updateUser($username, $user, $responseCode, $responseHeaders);
$result = $handler->updateUser($username, $body, $responseCode, $responseHeaders);
// Find default response message
$message = '';

View File

@@ -93,7 +93,7 @@ class PetApi implements PetApiInterface // An interface is autogenerated
/**
* Implementation of PetApiInterface#addPet
*/
public function addPet(Pet $pet)
public function addPet(Pet $body)
{
// Implement the operation ...
}

View File

@@ -27,7 +27,7 @@ services:
```
## **addPet**
> addPet($pet)
> addPet($body)
Add a new pet to the store
@@ -56,7 +56,7 @@ class PetApi implements PetApiInterface
/**
* Implementation of PetApiInterface#addPet
*/
public function addPet(Pet $pet)
public function addPet(Pet $body)
{
// Implement the operation ...
}
@@ -69,7 +69,7 @@ class PetApi implements PetApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**OpenAPI\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
**body** | [**OpenAPI\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -334,7 +334,7 @@ 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($pet)
> updatePet($body)
Update an existing pet
@@ -363,7 +363,7 @@ class PetApi implements PetApiInterface
/**
* Implementation of PetApiInterface#updatePet
*/
public function updatePet(Pet $pet)
public function updatePet(Pet $body)
{
// Implement the operation ...
}
@@ -376,7 +376,7 @@ class PetApi implements PetApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**OpenAPI\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
**body** | [**OpenAPI\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
### Return type

View File

@@ -190,7 +190,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)
## **placeOrder**
> OpenAPI\Server\Model\Order placeOrder($order)
> OpenAPI\Server\Model\Order placeOrder($body)
Place an order for a pet
@@ -211,7 +211,7 @@ class StoreApi implements StoreApiInterface
/**
* Implementation of StoreApiInterface#placeOrder
*/
public function placeOrder(Order $order)
public function placeOrder(Order $body)
{
// Implement the operation ...
}
@@ -224,7 +224,7 @@ class StoreApi implements StoreApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**OpenAPI\Server\Model\Order**](../Model/Order.md)| order placed for purchasing the pet |
**body** | [**OpenAPI\Server\Model\Order**](../Model/Order.md)| order placed for purchasing the pet |
### Return type

View File

@@ -27,7 +27,7 @@ services:
```
## **createUser**
> createUser($user)
> createUser($body)
Create user
@@ -50,7 +50,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#createUser
*/
public function createUser(User $user)
public function createUser(User $body)
{
// Implement the operation ...
}
@@ -63,7 +63,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**OpenAPI\Server\Model\User**](../Model/User.md)| Created user object |
**body** | [**OpenAPI\Server\Model\User**](../Model/User.md)| Created user object |
### Return type
@@ -81,7 +81,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)
## **createUsersWithArrayInput**
> createUsersWithArrayInput($user)
> createUsersWithArrayInput($body)
Creates list of users with given input array
@@ -102,7 +102,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#createUsersWithArrayInput
*/
public function createUsersWithArrayInput(array $user)
public function createUsersWithArrayInput(array $body)
{
// Implement the operation ...
}
@@ -115,7 +115,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object |
**body** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object |
### Return type
@@ -133,7 +133,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)
## **createUsersWithListInput**
> createUsersWithListInput($user)
> createUsersWithListInput($body)
Creates list of users with given input array
@@ -154,7 +154,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#createUsersWithListInput
*/
public function createUsersWithListInput(array $user)
public function createUsersWithListInput(array $body)
{
// Implement the operation ...
}
@@ -167,7 +167,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object |
**body** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object |
### Return type
@@ -393,7 +393,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)
## **updateUser**
> updateUser($username, $user)
> updateUser($username, $body)
Updated user
@@ -416,7 +416,7 @@ class UserApi implements UserApiInterface
/**
* Implementation of UserApiInterface#updateUser
*/
public function updateUser($username, User $user)
public function updateUser($username, User $body)
{
// Implement the operation ...
}
@@ -430,7 +430,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**user** | [**OpenAPI\Server\Model\User**](../Model/User.md)| Updated user object |
**body** | [**OpenAPI\Server\Model\User**](../Model/User.md)| Updated user object |
### Return type