Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

namespace {{controllerPackage}};

use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use {{servicePackage}}\SerializerInterface;
Expand All @@ -32,7 +33,7 @@ use {{servicePackage}}\ValidatorInterface;
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Controller
class Controller extends BaseController
{
protected $validator;
protected $serializer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0-SNAPSHOT
2.4.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

namespace Swagger\Server\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller as BaseController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Swagger\Server\Service\SerializerInterface;
Expand All @@ -42,7 +43,7 @@
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class Controller
class Controller extends BaseController
{
protected $validator;
protected $serializer;
Expand Down
127 changes: 127 additions & 0 deletions samples/server/petstore/php-symfony/SymfonyBundle-php/Model/Amount.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?php
/**
* Amount
*
* PHP version 5
*
* @category Class
* @package Swagger\Server\Model
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/

/**
* Swagger Petstore
*
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/

/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

namespace Swagger\Server\Model;

use Symfony\Component\Validator\Constraints as Assert;
use JMS\Serializer\Annotation\Type;
use JMS\Serializer\Annotation\SerializedName;

/**
* Class representing the Amount model.
*
* some description
*
* @package Swagger\Server\Model
* @author Swagger Codegen team
*/
class Amount
{
/**
* some description
*
* @var double
* @SerializedName("value")
* @Assert\NotNull()
* @Assert\Type("double")
* @Type("double")
* @Assert\GreaterThanOrEqual(0.01)
* @Assert\LessThanOrEqual(0.01)
*/
protected $value;

/**
* @var Swagger\Server\Model\Currency
* @SerializedName("currency")
* @Assert\NotNull()
* @Assert\Type("Swagger\Server\Model\Currency")
* @Type("Swagger\Server\Model\Currency")
*/
protected $currency;

/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*/
public function __construct(array $data = null)
{
$this->value = isset($data['value']) ? $data['value'] : null;
$this->currency = isset($data['currency']) ? $data['currency'] : null;
}

/**
* Gets value.
*
* @return double
*/
public function getValue()
{
return $this->value;
}

/**
* Sets value.
*
* @param double $value some description
*
* @return $this
*/
public function setValue($value)
{
$this->value = $value;

return $this;
}

/**
* Gets currency.
*
* @return Swagger\Server\Model\Currency
*/
public function getCurrency()
{
return $this->currency;
}

/**
* Sets currency.
*
* @param Swagger\Server\Model\Currency $currency
*
* @return $this
*/
public function setCurrency(Currency $currency)
{
$this->currency = $currency;

return $this;
}
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
* Currency
*
* PHP version 5
*
* @category Class
* @package Swagger\Server\Model
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/

/**
* Swagger Petstore
*
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/

/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

namespace Swagger\Server\Model;

use Symfony\Component\Validator\Constraints as Assert;
use JMS\Serializer\Annotation\Type;
use JMS\Serializer\Annotation\SerializedName;

/**
* Class representing the Currency model.
*
* some description
*
* @package Swagger\Server\Model
* @author Swagger Codegen team
*/
class Currency
{
/**
* Constructor
* @param mixed[] $data Associated array of property values initializing the model
*/
public function __construct(array $data = null)
{
}
}


54 changes: 28 additions & 26 deletions samples/server/petstore/php-symfony/SymfonyBundle-php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,36 +124,38 @@ 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)
- [Amount](Resources/docs/Model/Amount.md)
- [ApiResponse](Resources/docs/Model/ApiResponse.md)
- [Category](Resources/docs/Model/Category.md)
- [Currency](Resources/docs/Model/Currency.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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Amount

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **double** | some description |
**currency** | [**Swagger\Server\Model\Currency**](Currency.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Currency

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading