Update default value for PHP server generators (slim, silex) (#272)

* update php slim samples

* update php silex samples

* update php silex default value
This commit is contained in:
William Cheng
2018-04-30 15:18:13 +08:00
committed by GitHub
parent 799b033c22
commit 7ad92572e4
69 changed files with 546 additions and 535 deletions

View File

@@ -1,4 +1,4 @@
# Swagger\Server\Api\PetApiInterface
# OpenAPI\Server\Api\PetApiInterface
All URIs are relative to *http://petstore.swagger.io/v2*
@@ -22,7 +22,7 @@ services:
acme.my_bundle.api.pet:
class: Acme\MyBundle\Api\PetApi
tags:
- { name: "swagger_server.api", api: "pet" }
- { name: "open_apiserver.api", api: "pet" }
# ...
```
@@ -38,7 +38,7 @@ Add a new pet to the store
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -69,7 +69,7 @@ class PetApi implements PetApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Swagger\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
**pet** | [**OpenAPI\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -98,7 +98,7 @@ Deletes a pet
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -148,7 +148,7 @@ void (empty response body)
[[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)
## **findPetsByStatus**
> Swagger\Server\Model\Pet findPetsByStatus($status)
> OpenAPI\Server\Model\Pet findPetsByStatus($status)
Finds Pets by status
@@ -161,7 +161,7 @@ Multiple status values can be provided with comma separated strings
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -196,7 +196,7 @@ Name | Type | Description | Notes
### Return type
[**Swagger\Server\Model\Pet**](../Model/Pet.md)
[**OpenAPI\Server\Model\Pet**](../Model/Pet.md)
### Authorization
@@ -210,7 +210,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)
## **findPetsByTags**
> Swagger\Server\Model\Pet findPetsByTags($tags)
> OpenAPI\Server\Model\Pet findPetsByTags($tags)
Finds Pets by tags
@@ -223,7 +223,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -258,7 +258,7 @@ Name | Type | Description | Notes
### Return type
[**Swagger\Server\Model\Pet**](../Model/Pet.md)
[**OpenAPI\Server\Model\Pet**](../Model/Pet.md)
### Authorization
@@ -272,7 +272,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)
## **getPetById**
> Swagger\Server\Model\Pet getPetById($petId)
> OpenAPI\Server\Model\Pet getPetById($petId)
Find pet by ID
@@ -285,7 +285,7 @@ Returns a single pet
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -320,7 +320,7 @@ Name | Type | Description | Notes
### Return type
[**Swagger\Server\Model\Pet**](../Model/Pet.md)
[**OpenAPI\Server\Model\Pet**](../Model/Pet.md)
### Authorization
@@ -345,7 +345,7 @@ Update an existing pet
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -376,7 +376,7 @@ class PetApi implements PetApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Swagger\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
**pet** | [**OpenAPI\Server\Model\Pet**](../Model/Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -405,7 +405,7 @@ Updates a pet in the store with form data
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -456,7 +456,7 @@ void (empty response body)
[[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)
## **uploadFile**
> Swagger\Server\Model\ApiResponse uploadFile($petId, $additionalMetadata, $file)
> OpenAPI\Server\Model\ApiResponse uploadFile($petId, $additionalMetadata, $file)
uploads an image
@@ -467,7 +467,7 @@ uploads an image
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\PetApiInterface;
use OpenAPI\Server\Api\PetApiInterface;
class PetApi implements PetApiInterface
{
@@ -504,7 +504,7 @@ Name | Type | Description | Notes
### Return type
[**Swagger\Server\Model\ApiResponse**](../Model/ApiResponse.md)
[**OpenAPI\Server\Model\ApiResponse**](../Model/ApiResponse.md)
### Authorization

View File

@@ -1,4 +1,4 @@
# Swagger\Server\Api\StoreApiInterface
# OpenAPI\Server\Api\StoreApiInterface
All URIs are relative to *http://petstore.swagger.io/v2*
@@ -18,7 +18,7 @@ services:
acme.my_bundle.api.store:
class: Acme\MyBundle\Api\StoreApi
tags:
- { name: "swagger_server.api", api: "store" }
- { name: "open_apiserver.api", api: "store" }
# ...
```
@@ -36,7 +36,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\StoreApiInterface;
use OpenAPI\Server\Api\StoreApiInterface;
class StoreApi implements StoreApiInterface
{
@@ -90,7 +90,7 @@ Returns a map of status codes to quantities
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\StoreApiInterface;
use OpenAPI\Server\Api\StoreApiInterface;
class StoreApi implements StoreApiInterface
{
@@ -136,7 +136,7 @@ This endpoint does not need any parameter.
[[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)
## **getOrderById**
> Swagger\Server\Model\Order getOrderById($orderId)
> OpenAPI\Server\Model\Order getOrderById($orderId)
Find purchase order by ID
@@ -149,7 +149,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\StoreApiInterface;
use OpenAPI\Server\Api\StoreApiInterface;
class StoreApi implements StoreApiInterface
{
@@ -176,7 +176,7 @@ Name | Type | Description | Notes
### Return type
[**Swagger\Server\Model\Order**](../Model/Order.md)
[**OpenAPI\Server\Model\Order**](../Model/Order.md)
### Authorization
@@ -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**
> Swagger\Server\Model\Order placeOrder($order)
> OpenAPI\Server\Model\Order placeOrder($order)
Place an order for a pet
@@ -201,7 +201,7 @@ Place an order for a pet
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\StoreApiInterface;
use OpenAPI\Server\Api\StoreApiInterface;
class StoreApi implements StoreApiInterface
{
@@ -224,11 +224,11 @@ class StoreApi implements StoreApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Swagger\Server\Model\Order**](../Model/Order.md)| order placed for purchasing the pet |
**order** | [**OpenAPI\Server\Model\Order**](../Model/Order.md)| order placed for purchasing the pet |
### Return type
[**Swagger\Server\Model\Order**](../Model/Order.md)
[**OpenAPI\Server\Model\Order**](../Model/Order.md)
### Authorization
@@ -236,7 +236,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **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

@@ -1,4 +1,4 @@
# Swagger\Server\Api\UserApiInterface
# OpenAPI\Server\Api\UserApiInterface
All URIs are relative to *http://petstore.swagger.io/v2*
@@ -22,7 +22,7 @@ services:
acme.my_bundle.api.user:
class: Acme\MyBundle\Api\UserApi
tags:
- { name: "swagger_server.api", api: "user" }
- { name: "open_apiserver.api", api: "user" }
# ...
```
@@ -40,7 +40,7 @@ This can only be done by the logged in user.
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -63,7 +63,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**Swagger\Server\Model\User**](../Model/User.md)| Created user object |
**user** | [**OpenAPI\Server\Model\User**](../Model/User.md)| Created user object |
### Return type
@@ -75,7 +75,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **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)
@@ -92,7 +92,7 @@ Creates list of users with given input array
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -115,7 +115,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**Swagger\Server\Model\User**](../Model/array.md)| List of user object |
**user** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object |
### Return type
@@ -127,7 +127,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **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)
@@ -144,7 +144,7 @@ Creates list of users with given input array
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -167,7 +167,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**Swagger\Server\Model\User**](../Model/array.md)| List of user object |
**user** | [**OpenAPI\Server\Model\User**](../Model/array.md)| List of user object |
### Return type
@@ -179,7 +179,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **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)
@@ -198,7 +198,7 @@ This can only be done by the logged in user.
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -239,7 +239,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)
## **getUserByName**
> Swagger\Server\Model\User getUserByName($username)
> OpenAPI\Server\Model\User getUserByName($username)
Get user by user name
@@ -250,7 +250,7 @@ Get user by user name
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -277,7 +277,7 @@ Name | Type | Description | Notes
### Return type
[**Swagger\Server\Model\User**](../Model/User.md)
[**OpenAPI\Server\Model\User**](../Model/User.md)
### Authorization
@@ -302,7 +302,7 @@ Logs user into the system
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -355,7 +355,7 @@ Logs out current logged in user session
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -406,7 +406,7 @@ This can only be done by the logged in user.
namespace Acme\MyBundle\Api;
use Swagger\Server\Api\UserApiInterface;
use OpenAPI\Server\Api\UserApiInterface;
class UserApi implements UserApiInterface
{
@@ -430,7 +430,7 @@ class UserApi implements UserApiInterface
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**user** | [**Swagger\Server\Model\User**](../Model/User.md)| Updated user object |
**user** | [**OpenAPI\Server\Model\User**](../Model/User.md)| Updated user object |
### Return type
@@ -442,7 +442,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **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

@@ -4,10 +4,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**category** | [**Swagger\Server\Model\Category**](Category.md) | | [optional]
**category** | [**OpenAPI\Server\Model\Category**](Category.md) | | [optional]
**name** | **string** | |
**photoUrls** | **string** | |
**tags** | [**Swagger\Server\Model\Tag**](Tag.md) | | [optional]
**tags** | [**OpenAPI\Server\Model\Tag**](Tag.md) | | [optional]
**status** | **string** | pet status in the store | [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)