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

@@ -66,14 +66,14 @@ interface PetApiInterface
*
* Add a new pet to the store
*
* @param Swagger\Server\Model\Pet $body Pet object that needs to be added to the store (required)
* @param Swagger\Server\Model\Pet $pet 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 $body, &$responseCode, array &$responseHeaders);
public function addPet(Pet $pet, &$responseCode, array &$responseHeaders);
/**
* Operation deletePet
@@ -137,14 +137,14 @@ interface PetApiInterface
*
* Update an existing pet
*
* @param Swagger\Server\Model\Pet $body Pet object that needs to be added to the store (required)
* @param Swagger\Server\Model\Pet $pet 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 $body, &$responseCode, array &$responseHeaders);
public function updatePet(Pet $pet, &$responseCode, array &$responseHeaders);
/**
* Operation updatePetWithForm

View File

@@ -97,12 +97,12 @@ interface StoreApiInterface
*
* Place an order for a pet
*
* @param Swagger\Server\Model\Order $body order placed for purchasing the pet (required)
* @param Swagger\Server\Model\Order $order 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 Swagger\Server\Model\Order[]
*
*/
public function placeOrder(Order $body, &$responseCode, array &$responseHeaders);
public function placeOrder(Order $order, &$responseCode, array &$responseHeaders);
}

View File

@@ -47,42 +47,42 @@ interface UserApiInterface
*
* Create user
*
* @param Swagger\Server\Model\User $body Created user object (required)
* @param Swagger\Server\Model\User $user 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 $body, &$responseCode, array &$responseHeaders);
public function createUser(User $user, &$responseCode, array &$responseHeaders);
/**
* Operation createUsersWithArrayInput
*
* Creates list of users with given input array
*
* @param Swagger\Server\Model\User[] $body List of user object (required)
* @param Swagger\Server\Model\User[] $user 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 $body, &$responseCode, array &$responseHeaders);
public function createUsersWithArrayInput(array $user, &$responseCode, array &$responseHeaders);
/**
* Operation createUsersWithListInput
*
* Creates list of users with given input array
*
* @param Swagger\Server\Model\User[] $body List of user object (required)
* @param Swagger\Server\Model\User[] $user 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 $body, &$responseCode, array &$responseHeaders);
public function createUsersWithListInput(array $user, &$responseCode, array &$responseHeaders);
/**
* Operation deleteUser
@@ -146,12 +146,12 @@ interface UserApiInterface
* Updated user
*
* @param string $username name that need to be deleted (required)
* @param Swagger\Server\Model\User $body Updated user object (required)
* @param Swagger\Server\Model\User $user 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 $body, &$responseCode, array &$responseHeaders);
public function updateUser($username, User $user, &$responseCode, array &$responseHeaders);
}

View File

@@ -68,7 +68,7 @@ class PetController extends Controller
}
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -82,18 +82,18 @@ class PetController extends Controller
$securitypetstore_auth = $request->headers->get('authorization');
// Read out all input parameter values into variables
$body = $request->getContent();
$pet = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$body = $this->deserialize($body, 'Swagger\Server\Model\Pet', $inputFormat);
$pet = $this->deserialize($pet, 'Swagger\Server\Model\Pet', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("Swagger\Server\Model\Pet");
$response = $this->validate($body, $asserts);
$response = $this->validate($pet, $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($body, $responseCode, $responseHeaders);
$result = $handler->addPet($pet, $responseCode, $responseHeaders);
// Find default response message
$message = '';
@@ -147,7 +147,7 @@ class PetController extends Controller
public function deletePetAction(Request $request, $petId)
{
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -496,7 +496,7 @@ class PetController extends Controller
}
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -510,18 +510,18 @@ class PetController extends Controller
$securitypetstore_auth = $request->headers->get('authorization');
// Read out all input parameter values into variables
$body = $request->getContent();
$pet = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$body = $this->deserialize($body, 'Swagger\Server\Model\Pet', $inputFormat);
$pet = $this->deserialize($pet, 'Swagger\Server\Model\Pet', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("Swagger\Server\Model\Pet");
$response = $this->validate($body, $asserts);
$response = $this->validate($pet, $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($body, $responseCode, $responseHeaders);
$result = $handler->updatePet($pet, $responseCode, $responseHeaders);
// Find default response message
$message = '';
@@ -581,7 +581,7 @@ class PetController extends Controller
public function updatePetWithFormAction(Request $request, $petId)
{
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);

View File

@@ -59,7 +59,7 @@ class StoreController extends Controller
public function deleteOrderAction(Request $request, $orderId)
{
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -286,7 +286,7 @@ class StoreController extends Controller
public function placeOrderAction(Request $request)
{
// Make sure that the client is providing something that we can consume
$consumes = [];
$consumes = ['application/json'];
$inputFormat = $request->headers->has('Content-Type')?$request->headers->get('Content-Type'):$consumes[0];
if (!in_array($inputFormat, $consumes)) {
// We can't consume the content that the client is sending us
@@ -305,18 +305,18 @@ class StoreController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$body = $request->getContent();
$order = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$body = $this->deserialize($body, 'Swagger\Server\Model\Order', $inputFormat);
$order = $this->deserialize($order, 'Swagger\Server\Model\Order', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("Swagger\Server\Model\Order");
$response = $this->validate($body, $asserts);
$response = $this->validate($order, $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($body, $responseCode, $responseHeaders);
$result = $handler->placeOrder($order, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';

View File

@@ -59,7 +59,7 @@ class UserController extends Controller
public function createUserAction(Request $request)
{
// Make sure that the client is providing something that we can consume
$consumes = [];
$consumes = ['application/json'];
$inputFormat = $request->headers->has('Content-Type')?$request->headers->get('Content-Type'):$consumes[0];
if (!in_array($inputFormat, $consumes)) {
// We can't consume the content that the client is sending us
@@ -67,7 +67,7 @@ class UserController extends Controller
}
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -78,18 +78,18 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$body = $request->getContent();
$user = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$body = $this->deserialize($body, 'Swagger\Server\Model\User', $inputFormat);
$user = $this->deserialize($user, 'Swagger\Server\Model\User', $inputFormat);
// Validate the input values
$asserts = [];
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("Swagger\Server\Model\User");
$response = $this->validate($body, $asserts);
$response = $this->validate($user, $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($body, $responseCode, $responseHeaders);
$result = $handler->createUser($user, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';
@@ -141,7 +141,7 @@ class UserController extends Controller
public function createUsersWithArrayInputAction(Request $request)
{
// Make sure that the client is providing something that we can consume
$consumes = [];
$consumes = ['application/json'];
$inputFormat = $request->headers->has('Content-Type')?$request->headers->get('Content-Type'):$consumes[0];
if (!in_array($inputFormat, $consumes)) {
// We can't consume the content that the client is sending us
@@ -149,7 +149,7 @@ class UserController extends Controller
}
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -160,12 +160,12 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$body = $request->getContent();
$user = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$body = $this->deserialize($body, 'array<Swagger\Server\Model\User>', $inputFormat);
$user = $this->deserialize($user, 'array<Swagger\Server\Model\User>', $inputFormat);
// Validate the input values
$asserts = [];
@@ -173,7 +173,7 @@ class UserController extends Controller
$asserts[] = new Assert\All([
new Assert\Type("Swagger\Server\Model\User")
]);
$response = $this->validate($body, $asserts);
$response = $this->validate($user, $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($body, $responseCode, $responseHeaders);
$result = $handler->createUsersWithArrayInput($user, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';
@@ -225,7 +225,7 @@ class UserController extends Controller
public function createUsersWithListInputAction(Request $request)
{
// Make sure that the client is providing something that we can consume
$consumes = [];
$consumes = ['application/json'];
$inputFormat = $request->headers->has('Content-Type')?$request->headers->get('Content-Type'):$consumes[0];
if (!in_array($inputFormat, $consumes)) {
// We can't consume the content that the client is sending us
@@ -233,7 +233,7 @@ class UserController extends Controller
}
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -244,12 +244,12 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$body = $request->getContent();
$user = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$body = $this->deserialize($body, 'array<Swagger\Server\Model\User>', $inputFormat);
$user = $this->deserialize($user, 'array<Swagger\Server\Model\User>', $inputFormat);
// Validate the input values
$asserts = [];
@@ -257,7 +257,7 @@ class UserController extends Controller
$asserts[] = new Assert\All([
new Assert\Type("Swagger\Server\Model\User")
]);
$response = $this->validate($body, $asserts);
$response = $this->validate($user, $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($body, $responseCode, $responseHeaders);
$result = $handler->createUsersWithListInput($user, $responseCode, $responseHeaders);
// Find default response message
$message = 'successful operation';
@@ -309,7 +309,7 @@ class UserController extends Controller
public function deleteUserAction(Request $request, $username)
{
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -550,7 +550,7 @@ class UserController extends Controller
public function logoutUserAction(Request $request)
{
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -615,7 +615,7 @@ class UserController extends Controller
public function updateUserAction(Request $request, $username)
{
// Make sure that the client is providing something that we can consume
$consumes = [];
$consumes = ['application/json'];
$inputFormat = $request->headers->has('Content-Type')?$request->headers->get('Content-Type'):$consumes[0];
if (!in_array($inputFormat, $consumes)) {
// We can't consume the content that the client is sending us
@@ -623,7 +623,7 @@ class UserController extends Controller
}
// Figure out what data format to return to the client
$produces = ['application/xml', 'application/json'];
$produces = [];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
@@ -634,13 +634,13 @@ class UserController extends Controller
// Handle authentication
// Read out all input parameter values into variables
$body = $request->getContent();
$user = $request->getContent();
// Use the default value if no value was provided
// Deserialize the input values that needs it
$username = $this->deserialize($username, 'string', 'string');
$body = $this->deserialize($body, 'Swagger\Server\Model\User', $inputFormat);
$user = $this->deserialize($user, 'Swagger\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("Swagger\Server\Model\User");
$response = $this->validate($body, $asserts);
$response = $this->validate($user, $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, $body, $responseCode, $responseHeaders);
$result = $handler->updateUser($username, $user, $responseCode, $responseHeaders);
// Find default response message
$message = '';

View File

@@ -4,7 +4,7 @@ This is a sample server Petstore server. You can find out more about Swagger at
This [Symfony](https://symfony.com/) bundle is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Build package: io.swagger.codegen.languages.SymfonyServerCodegen
- Build package: org.openapitools.codegen.languages.PhpSymfonyServerCodegen
## Requirements
@@ -93,7 +93,7 @@ class PetApi implements PetApiInterface // An interface is autogenerated
/**
* Implementation of PetApiInterface#addPet
*/
public function addPet(Pet $body)
public function addPet(Pet $pet)
{
// Implement the operation ...
}
@@ -124,36 +124,36 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PetApiInterface* | [**addPet**](Resources\docs\Api/PetApiInterface.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApiInterface* | [**deletePet**](Resources\docs\Api/PetApiInterface.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApiInterface* | [**findPetsByStatus**](Resources\docs\Api/PetApiInterface.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApiInterface* | [**findPetsByTags**](Resources\docs\Api/PetApiInterface.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApiInterface* | [**getPetById**](Resources\docs\Api/PetApiInterface.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApiInterface* | [**updatePet**](Resources\docs\Api/PetApiInterface.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApiInterface* | [**updatePetWithForm**](Resources\docs\Api/PetApiInterface.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApiInterface* | [**uploadFile**](Resources\docs\Api/PetApiInterface.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApiInterface* | [**deleteOrder**](Resources\docs\Api/StoreApiInterface.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApiInterface* | [**getInventory**](Resources\docs\Api/StoreApiInterface.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApiInterface* | [**getOrderById**](Resources\docs\Api/StoreApiInterface.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApiInterface* | [**placeOrder**](Resources\docs\Api/StoreApiInterface.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApiInterface* | [**createUser**](Resources\docs\Api/UserApiInterface.md#createuser) | **POST** /user | Create user
*UserApiInterface* | [**createUsersWithArrayInput**](Resources\docs\Api/UserApiInterface.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApiInterface* | [**createUsersWithListInput**](Resources\docs\Api/UserApiInterface.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
*UserApiInterface* | [**deleteUser**](Resources\docs\Api/UserApiInterface.md#deleteuser) | **DELETE** /user/{username} | Delete user
*UserApiInterface* | [**getUserByName**](Resources\docs\Api/UserApiInterface.md#getuserbyname) | **GET** /user/{username} | Get user by user name
*UserApiInterface* | [**loginUser**](Resources\docs\Api/UserApiInterface.md#loginuser) | **GET** /user/login | Logs user into the system
*UserApiInterface* | [**logoutUser**](Resources\docs\Api/UserApiInterface.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
*UserApiInterface* | [**updateUser**](Resources\docs\Api/UserApiInterface.md#updateuser) | **PUT** /user/{username} | Updated user
*PetApiInterface* | [**addPet**](Resources/docs/Api/PetApiInterface.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApiInterface* | [**deletePet**](Resources/docs/Api/PetApiInterface.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApiInterface* | [**findPetsByStatus**](Resources/docs/Api/PetApiInterface.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApiInterface* | [**findPetsByTags**](Resources/docs/Api/PetApiInterface.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApiInterface* | [**getPetById**](Resources/docs/Api/PetApiInterface.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApiInterface* | [**updatePet**](Resources/docs/Api/PetApiInterface.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApiInterface* | [**updatePetWithForm**](Resources/docs/Api/PetApiInterface.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApiInterface* | [**uploadFile**](Resources/docs/Api/PetApiInterface.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApiInterface* | [**deleteOrder**](Resources/docs/Api/StoreApiInterface.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApiInterface* | [**getInventory**](Resources/docs/Api/StoreApiInterface.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApiInterface* | [**getOrderById**](Resources/docs/Api/StoreApiInterface.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApiInterface* | [**placeOrder**](Resources/docs/Api/StoreApiInterface.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApiInterface* | [**createUser**](Resources/docs/Api/UserApiInterface.md#createuser) | **POST** /user | Create user
*UserApiInterface* | [**createUsersWithArrayInput**](Resources/docs/Api/UserApiInterface.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
*UserApiInterface* | [**createUsersWithListInput**](Resources/docs/Api/UserApiInterface.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
*UserApiInterface* | [**deleteUser**](Resources/docs/Api/UserApiInterface.md#deleteuser) | **DELETE** /user/{username} | Delete user
*UserApiInterface* | [**getUserByName**](Resources/docs/Api/UserApiInterface.md#getuserbyname) | **GET** /user/{username} | Get user by user name
*UserApiInterface* | [**loginUser**](Resources/docs/Api/UserApiInterface.md#loginuser) | **GET** /user/login | Logs user into the system
*UserApiInterface* | [**logoutUser**](Resources/docs/Api/UserApiInterface.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
*UserApiInterface* | [**updateUser**](Resources/docs/Api/UserApiInterface.md#updateuser) | **PUT** /user/{username} | Updated user
## Documentation For Models
- [ApiResponse](Resources\docs\Model/ApiResponse.md)
- [Category](Resources\docs\Model/Category.md)
- [Order](Resources\docs\Model/Order.md)
- [Pet](Resources\docs\Model/Pet.md)
- [Tag](Resources\docs\Model/Tag.md)
- [User](Resources\docs\Model/User.md)
- [ApiResponse](Resources/docs/Model/ApiResponse.md)
- [Category](Resources/docs/Model/Category.md)
- [Order](Resources/docs/Model/Order.md)
- [Pet](Resources/docs/Model/Pet.md)
- [Tag](Resources/docs/Model/Tag.md)
- [User](Resources/docs/Model/User.md)
## Documentation For Authorization

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)

View File

@@ -7,8 +7,8 @@
stopOnFailure="false">
<testsuites>
<testsuite>
<directory>.\Tests\Api</directory>
<directory>.\Tests\Model</directory>
<directory>./Tests/Api</directory>
<directory>./Tests/Model</directory>
</testsuite>
</testsuites>
@@ -18,8 +18,8 @@
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">.\.\Api</directory>
<directory suffix=".php">.\.\Model</directory>
<directory suffix=".php">././Api</directory>
<directory suffix=".php">././Model</directory>
</whitelist>
</filter>
</phpunit>