fix typo in readme

This commit is contained in:
wing328 2016-03-30 20:58:18 +08:00
parent f0c3870386
commit 20f1e97df3
20 changed files with 215 additions and 164 deletions

View File

@ -6,7 +6,7 @@
{{/appDescription}} {{/appDescription}}
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: {{appVersion}} - API version: {{appVersion}}
- Package version: {{projectVersion}} - Package version: {{projectVersion}}
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
- Build package: {{generatorClass}} - Build package: {{generatorClass}}

View File

@ -8,7 +8,7 @@
Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: {{appVersion}} - API version: {{appVersion}}
- Package version: {{moduleVersion}} - Package version: {{moduleVersion}}
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
- Build package: {{generatorClass}} - Build package: {{generatorClass}}

View File

@ -5,7 +5,7 @@
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: {{appVersion}} - API version: {{appVersion}}
- Package version: {{artifactVersion}} - Package version: {{artifactVersion}}
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
- Build package: {{generatorClass}} - Build package: {{generatorClass}}

View File

@ -8,7 +8,7 @@
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: {{appVersion}} - API version: {{appVersion}}
- Package version: {{gemVersion}} - Package version: {{gemVersion}}
- Build date: {{generatedDate}} - Build date: {{generatedDate}}
- Build package: {{generatorClass}} - Build package: {{generatorClass}}

View File

@ -4,9 +4,9 @@ SwaggerPetstore - JavaScript client for swagger-petstore
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-03-24T19:50:42.301+08:00 - Build date: 2016-03-30T20:58:13.565+08:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen - Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
## Installation ## Installation
@ -108,7 +108,10 @@ Class | Method | HTTP request | Description
## Documentation for Models ## Documentation for Models
- [SwaggerPetstore.Animal](docs/Animal.md)
- [SwaggerPetstore.Cat](docs/Cat.md)
- [SwaggerPetstore.Category](docs/Category.md) - [SwaggerPetstore.Category](docs/Category.md)
- [SwaggerPetstore.Dog](docs/Dog.md)
- [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md) - [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md)
- [SwaggerPetstore.Model200Response](docs/Model200Response.md) - [SwaggerPetstore.Model200Response](docs/Model200Response.md)
- [SwaggerPetstore.ModelReturn](docs/ModelReturn.md) - [SwaggerPetstore.ModelReturn](docs/ModelReturn.md)

View File

@ -1,12 +1,12 @@
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define(['./ApiClient', './model/Category', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory); define(['./ApiClient', './model/Animal', './model/Cat', './model/Category', './model/Dog', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory);
} else if (typeof module === 'object' && module.exports) { } else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node. // CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('./ApiClient'), require('./model/Category'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi')); module.exports = factory(require('./ApiClient'), require('./model/Animal'), require('./model/Cat'), require('./model/Category'), require('./model/Dog'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
} }
}(function(ApiClient, Category, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) { }(function(ApiClient, Animal, Cat, Category, Dog, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) {
'use strict'; 'use strict';
/** /**
@ -46,11 +46,26 @@
* @property {module:ApiClient} * @property {module:ApiClient}
*/ */
ApiClient: ApiClient, ApiClient: ApiClient,
/**
* The Animal model constructor.
* @property {module:model/Animal}
*/
Animal: Animal,
/**
* The Cat model constructor.
* @property {module:model/Cat}
*/
Cat: Cat,
/** /**
* The Category model constructor. * The Category model constructor.
* @property {module:model/Category} * @property {module:model/Category}
*/ */
Category: Category, Category: Category,
/**
* The Dog model constructor.
* @property {module:model/Dog}
*/
Dog: Dog,
/** /**
* The InlineResponse200 model constructor. * The InlineResponse200 model constructor.
* @property {module:model/InlineResponse200} * @property {module:model/InlineResponse200}

View File

@ -4,9 +4,9 @@ SwaggerPetstore - JavaScript client for swagger-petstore
This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-03-24T19:50:27.240+08:00 - Build date: 2016-03-30T20:58:07.996+08:00
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen - Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
## Installation ## Installation
@ -111,7 +111,10 @@ Class | Method | HTTP request | Description
## Documentation for Models ## Documentation for Models
- [SwaggerPetstore.Animal](docs/Animal.md)
- [SwaggerPetstore.Cat](docs/Cat.md)
- [SwaggerPetstore.Category](docs/Category.md) - [SwaggerPetstore.Category](docs/Category.md)
- [SwaggerPetstore.Dog](docs/Dog.md)
- [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md) - [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md)
- [SwaggerPetstore.Model200Response](docs/Model200Response.md) - [SwaggerPetstore.Model200Response](docs/Model200Response.md)
- [SwaggerPetstore.ModelReturn](docs/ModelReturn.md) - [SwaggerPetstore.ModelReturn](docs/ModelReturn.md)

View File

@ -1,12 +1,12 @@
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define(['./ApiClient', './model/Category', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory); define(['./ApiClient', './model/Animal', './model/Cat', './model/Category', './model/Dog', './model/InlineResponse200', './model/Model200Response', './model/ModelReturn', './model/Name', './model/Order', './model/Pet', './model/SpecialModelName', './model/Tag', './model/User', './api/PetApi', './api/StoreApi', './api/UserApi'], factory);
} else if (typeof module === 'object' && module.exports) { } else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node. // CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('./ApiClient'), require('./model/Category'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi')); module.exports = factory(require('./ApiClient'), require('./model/Animal'), require('./model/Cat'), require('./model/Category'), require('./model/Dog'), require('./model/InlineResponse200'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/Order'), require('./model/Pet'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
} }
}(function(ApiClient, Category, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) { }(function(ApiClient, Animal, Cat, Category, Dog, InlineResponse200, Model200Response, ModelReturn, Name, Order, Pet, SpecialModelName, Tag, User, PetApi, StoreApi, UserApi) {
'use strict'; 'use strict';
/** /**
@ -46,11 +46,26 @@
* @property {module:ApiClient} * @property {module:ApiClient}
*/ */
ApiClient: ApiClient, ApiClient: ApiClient,
/**
* The Animal model constructor.
* @property {module:model/Animal}
*/
Animal: Animal,
/**
* The Cat model constructor.
* @property {module:model/Cat}
*/
Cat: Cat,
/** /**
* The Category model constructor. * The Category model constructor.
* @property {module:model/Category} * @property {module:model/Category}
*/ */
Category: Category, Category: Category,
/**
* The Dog model constructor.
* @property {module:model/Dog}
*/
Dog: Dog,
/** /**
* The InlineResponse200 model constructor. * The InlineResponse200 model constructor.
* @property {module:model/InlineResponse200} * @property {module:model/InlineResponse200}

View File

@ -8,9 +8,9 @@ This is a sample server Petstore server. You can find out more about Swagger at
Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-03-19T17:46:21.048+08:00 - Build date: 2016-03-30T20:57:51.908+08:00
- Build package: class io.swagger.codegen.languages.PerlClientCodegen - Build package: class io.swagger.codegen.languages.PerlClientCodegen
## A note on Moose ## A note on Moose
@ -231,7 +231,10 @@ use WWW::SwaggerClient::UserApi;
To load the models: To load the models:
```perl ```perl
use WWW::SwaggerClient::Object::Animal;
use WWW::SwaggerClient::Object::Cat;
use WWW::SwaggerClient::Object::Category; use WWW::SwaggerClient::Object::Category;
use WWW::SwaggerClient::Object::Dog;
use WWW::SwaggerClient::Object::InlineResponse200; use WWW::SwaggerClient::Object::InlineResponse200;
use WWW::SwaggerClient::Object::Model200Response; use WWW::SwaggerClient::Object::Model200Response;
use WWW::SwaggerClient::Object::ModelReturn; use WWW::SwaggerClient::Object::ModelReturn;
@ -257,7 +260,10 @@ use WWW::SwaggerClient::StoreApi;
use WWW::SwaggerClient::UserApi; use WWW::SwaggerClient::UserApi;
# load the models # load the models
use WWW::SwaggerClient::Object::Animal;
use WWW::SwaggerClient::Object::Cat;
use WWW::SwaggerClient::Object::Category; use WWW::SwaggerClient::Object::Category;
use WWW::SwaggerClient::Object::Dog;
use WWW::SwaggerClient::Object::InlineResponse200; use WWW::SwaggerClient::Object::InlineResponse200;
use WWW::SwaggerClient::Object::Model200Response; use WWW::SwaggerClient::Object::Model200Response;
use WWW::SwaggerClient::Object::ModelReturn; use WWW::SwaggerClient::Object::ModelReturn;
@ -320,7 +326,10 @@ Class | Method | HTTP request | Description
# DOCUMENTATION FOR MODELS # DOCUMENTATION FOR MODELS
- [WWW::SwaggerClient::Object::Animal](docs/Animal.md)
- [WWW::SwaggerClient::Object::Cat](docs/Cat.md)
- [WWW::SwaggerClient::Object::Category](docs/Category.md) - [WWW::SwaggerClient::Object::Category](docs/Category.md)
- [WWW::SwaggerClient::Object::Dog](docs/Dog.md)
- [WWW::SwaggerClient::Object::InlineResponse200](docs/InlineResponse200.md) - [WWW::SwaggerClient::Object::InlineResponse200](docs/InlineResponse200.md)
- [WWW::SwaggerClient::Object::Model200Response](docs/Model200Response.md) - [WWW::SwaggerClient::Object::Model200Response](docs/Model200Response.md)
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md) - [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)

View File

@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
default => sub { { default => sub { {
app_name => 'Swagger Petstore', app_name => 'Swagger Petstore',
app_version => '1.0.0', app_version => '1.0.0',
generated_date => '2016-03-19T17:46:21.048+08:00', generated_date => '2016-03-30T20:57:51.908+08:00',
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen', generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
} }, } },
documentation => 'Information about the application version and the codegen codebase version' documentation => 'Information about the application version and the codegen codebase version'
@ -103,7 +103,7 @@ Automatically generated by the Perl Swagger Codegen project:
=over 4 =over 4
=item Build date: 2016-03-19T17:46:21.048+08:00 =item Build date: 2016-03-30T20:57:51.908+08:00
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen =item Build package: class io.swagger.codegen.languages.PerlClientCodegen

View File

@ -3,9 +3,9 @@ This is a sample server Petstore server. You can find out more about Swagger at
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-03-28T11:19:00.169+02:00 - Build date: 2016-03-30T20:57:56.803+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen - Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements ## Requirements
@ -126,25 +126,10 @@ Class | Method | HTTP request | Description
## Documentation For Authorization ## Documentation For Authorization
## petstore_auth ## test_api_key_header
- **Type**: OAuth
- **Flow**: implicit
- **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## test_api_client_id
- **Type**: API key - **Type**: API key
- **API key parameter name**: x-test_api_client_id - **API key parameter name**: test_api_key_header
- **Location**: HTTP header
## test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **Location**: HTTP header - **Location**: HTTP header
## api_key ## api_key
@ -157,17 +142,32 @@ Class | Method | HTTP request | Description
- **Type**: HTTP basic authentication - **Type**: HTTP basic authentication
## test_api_client_secret
- **Type**: API key
- **API key parameter name**: x-test_api_client_secret
- **Location**: HTTP header
## test_api_client_id
- **Type**: API key
- **API key parameter name**: x-test_api_client_id
- **Location**: HTTP header
## test_api_key_query ## test_api_key_query
- **Type**: API key - **Type**: API key
- **API key parameter name**: test_api_key_query - **API key parameter name**: test_api_key_query
- **Location**: URL query string - **Location**: URL query string
## test_api_key_header ## petstore_auth
- **Type**: API key - **Type**: OAuth
- **API key parameter name**: test_api_key_header - **Flow**: implicit
- **Location**: HTTP header - **Authorizatoin URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- **write:pets**: modify pets in your account
- **read:pets**: read your pets
## Author ## Author

View File

@ -3,12 +3,12 @@
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**photo_urls** | **string[]** | | [optional] **tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**name** | **string** | | [optional]
**id** | **int** | | **id** | **int** | |
**category** | **object** | | [optional] **category** | **object** | | [optional]
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
**status** | **string** | pet status in the store | [optional] **status** | **string** | pet status in the store | [optional]
**name** | **string** | | [optional]
**photo_urls** | **string[]** | | [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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -268,12 +268,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: api_key // Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed // Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\PetApi(); $api_instance = new Swagger\Client\Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched $pet_id = 789; // int | ID of pet that needs to be fetched
@ -299,7 +299,7 @@ Name | Type | Description | Notes
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) [api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP reuqest headers
@ -320,12 +320,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: api_key // Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed // Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\PetApi(); $api_instance = new Swagger\Client\Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched $pet_id = 789; // int | ID of pet that needs to be fetched
@ -351,7 +351,7 @@ Name | Type | Description | Notes
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) [api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP reuqest headers
@ -372,12 +372,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure API key authorization: api_key // Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed // Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\PetApi(); $api_instance = new Swagger\Client\Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched $pet_id = 789; // int | ID of pet that needs to be fetched
@ -403,7 +403,7 @@ Name | Type | Description | Notes
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key) [api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP reuqest headers

View File

@ -214,14 +214,14 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
<?php <?php
require_once(__DIR__ . '/vendor/autoload.php'); require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: test_api_key_query
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_query', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_query', 'BEARER');
// Configure API key authorization: test_api_key_header // Configure API key authorization: test_api_key_header
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_header', 'YOUR_API_KEY'); Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_header', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed // Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_header', 'BEARER'); // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_header', 'BEARER');
// Configure API key authorization: test_api_key_query
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_query', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_query', 'BEARER');
$api_instance = new Swagger\Client\Api\StoreApi(); $api_instance = new Swagger\Client\Api\StoreApi();
$order_id = "order_id_example"; // string | ID of pet that needs to be fetched $order_id = "order_id_example"; // string | ID of pet that needs to be fetched
@ -247,7 +247,7 @@ Name | Type | Description | Notes
### Authorization ### Authorization
[test_api_key_query](../README.md#test_api_key_query), [test_api_key_header](../README.md#test_api_key_header) [test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
### HTTP reuqest headers ### HTTP reuqest headers

View File

@ -618,11 +618,6 @@ class PetApi
$httpBody = $formParams; // for HTTP post (form) $httpBody = $formParams; // for HTTP post (form)
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
@ -630,6 +625,11 @@ class PetApi
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call // make the API Call
try { try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -725,11 +725,6 @@ class PetApi
$httpBody = $formParams; // for HTTP post (form) $httpBody = $formParams; // for HTTP post (form)
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
@ -737,6 +732,11 @@ class PetApi
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call // make the API Call
try { try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -832,11 +832,6 @@ class PetApi
$httpBody = $formParams; // for HTTP post (form) $httpBody = $formParams; // for HTTP post (form)
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key'); $apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
@ -844,6 +839,11 @@ class PetApi
} }
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call // make the API Call
try { try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(

View File

@ -525,16 +525,16 @@ class StoreApi
} }
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_query'); $apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_header');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
$queryParams['test_api_key_query'] = $apiKey; $headerParams['test_api_key_header'] = $apiKey;
} }
// this endpoint requires API key authentication // this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_header'); $apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_query');
if (strlen($apiKey) !== 0) { if (strlen($apiKey) !== 0) {
$headerParams['test_api_key_header'] = $apiKey; $queryParams['test_api_key_query'] = $apiKey;
} }

View File

@ -51,12 +51,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $swaggerTypes = array( static $swaggerTypes = array(
'photo_urls' => 'string[]', 'tags' => '\Swagger\Client\Model\Tag[]',
'name' => 'string',
'id' => 'int', 'id' => 'int',
'category' => 'object', 'category' => 'object',
'tags' => '\Swagger\Client\Model\Tag[]', 'status' => 'string',
'status' => 'string' 'name' => 'string',
'photo_urls' => 'string[]'
); );
static function swaggerTypes() { static function swaggerTypes() {
@ -68,12 +68,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $attributeMap = array( static $attributeMap = array(
'photo_urls' => 'photoUrls', 'tags' => 'tags',
'name' => 'name',
'id' => 'id', 'id' => 'id',
'category' => 'category', 'category' => 'category',
'tags' => 'tags', 'status' => 'status',
'status' => 'status' 'name' => 'name',
'photo_urls' => 'photoUrls'
); );
static function attributeMap() { static function attributeMap() {
@ -85,12 +85,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $setters = array( static $setters = array(
'photo_urls' => 'setPhotoUrls', 'tags' => 'setTags',
'name' => 'setName',
'id' => 'setId', 'id' => 'setId',
'category' => 'setCategory', 'category' => 'setCategory',
'tags' => 'setTags', 'status' => 'setStatus',
'status' => 'setStatus' 'name' => 'setName',
'photo_urls' => 'setPhotoUrls'
); );
static function setters() { static function setters() {
@ -102,12 +102,12 @@ class InlineResponse200 implements ArrayAccess
* @var string[] * @var string[]
*/ */
static $getters = array( static $getters = array(
'photo_urls' => 'getPhotoUrls', 'tags' => 'getTags',
'name' => 'getName',
'id' => 'getId', 'id' => 'getId',
'category' => 'getCategory', 'category' => 'getCategory',
'tags' => 'getTags', 'status' => 'getStatus',
'status' => 'getStatus' 'name' => 'getName',
'photo_urls' => 'getPhotoUrls'
); );
static function getters() { static function getters() {
@ -116,16 +116,10 @@ class InlineResponse200 implements ArrayAccess
/** /**
* $photo_urls * $tags
* @var string[] * @var \Swagger\Client\Model\Tag[]
*/ */
protected $photo_urls; protected $tags;
/**
* $name
* @var string
*/
protected $name;
/** /**
* $id * $id
@ -139,18 +133,24 @@ class InlineResponse200 implements ArrayAccess
*/ */
protected $category; protected $category;
/**
* $tags
* @var \Swagger\Client\Model\Tag[]
*/
protected $tags;
/** /**
* $status pet status in the store * $status pet status in the store
* @var string * @var string
*/ */
protected $status; protected $status;
/**
* $name
* @var string
*/
protected $name;
/**
* $photo_urls
* @var string[]
*/
protected $photo_urls;
/** /**
* Constructor * Constructor
@ -160,54 +160,33 @@ class InlineResponse200 implements ArrayAccess
{ {
if ($data != null) { if ($data != null) {
$this->photo_urls = $data["photo_urls"]; $this->tags = $data["tags"];
$this->name = $data["name"];
$this->id = $data["id"]; $this->id = $data["id"];
$this->category = $data["category"]; $this->category = $data["category"];
$this->tags = $data["tags"];
$this->status = $data["status"]; $this->status = $data["status"];
$this->name = $data["name"];
$this->photo_urls = $data["photo_urls"];
} }
} }
/** /**
* Gets photo_urls * Gets tags
* @return string[] * @return \Swagger\Client\Model\Tag[]
*/ */
public function getPhotoUrls() public function getTags()
{ {
return $this->photo_urls; return $this->tags;
} }
/** /**
* Sets photo_urls * Sets tags
* @param string[] $photo_urls * @param \Swagger\Client\Model\Tag[] $tags
* @return $this * @return $this
*/ */
public function setPhotoUrls($photo_urls) public function setTags($tags)
{ {
$this->photo_urls = $photo_urls; $this->tags = $tags;
return $this;
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this; return $this;
} }
@ -253,27 +232,6 @@ class InlineResponse200 implements ArrayAccess
return $this; return $this;
} }
/**
* Gets tags
* @return \Swagger\Client\Model\Tag[]
*/
public function getTags()
{
return $this->tags;
}
/**
* Sets tags
* @param \Swagger\Client\Model\Tag[] $tags
* @return $this
*/
public function setTags($tags)
{
$this->tags = $tags;
return $this;
}
/** /**
* Gets status * Gets status
* @return string * @return string
@ -298,6 +256,48 @@ class InlineResponse200 implements ArrayAccess
return $this; return $this;
} }
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets photo_urls
* @return string[]
*/
public function getPhotoUrls()
{
return $this->photo_urls;
}
/**
* Sets photo_urls
* @param string[] $photo_urls
* @return $this
*/
public function setPhotoUrls($photo_urls)
{
$this->photo_urls = $photo_urls;
return $this;
}
/** /**
* Returns true if offset exists. False otherwise. * Returns true if offset exists. False otherwise.
* @param integer $offset Offset * @param integer $offset Offset

View File

@ -257,7 +257,7 @@ class ObjectSerializer
} else { } else {
$deserialized = null; $deserialized = null;
} }
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) { } elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
settype($data, $class); settype($data, $class);
$deserialized = $data; $deserialized = $data;
} elseif ($class === '\SplFileObject') { } elseif ($class === '\SplFileObject') {

View File

@ -6,9 +6,9 @@ This is a sample server Petstore server. You can find out more about Swagger at
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API verion: 1.0.0 - API version: 1.0.0
- Package version: 1.0.0 - Package version: 1.0.0
- Build date: 2016-03-19T11:13:14.822+08:00 - Build date: 2016-03-30T20:58:00.549+08:00
- Build package: class io.swagger.codegen.languages.RubyClientCodegen - Build package: class io.swagger.codegen.languages.RubyClientCodegen
## Installation ## Installation
@ -110,7 +110,10 @@ Class | Method | HTTP request | Description
## Documentation for Models ## Documentation for Models
- [Petstore::Animal](docs/Animal.md)
- [Petstore::Cat](docs/Cat.md)
- [Petstore::Category](docs/Category.md) - [Petstore::Category](docs/Category.md)
- [Petstore::Dog](docs/Dog.md)
- [Petstore::InlineResponse200](docs/InlineResponse200.md) - [Petstore::InlineResponse200](docs/InlineResponse200.md)
- [Petstore::Model200Response](docs/Model200Response.md) - [Petstore::Model200Response](docs/Model200Response.md)
- [Petstore::ModelReturn](docs/ModelReturn.md) - [Petstore::ModelReturn](docs/ModelReturn.md)

View File

@ -21,7 +21,10 @@ require 'petstore/version'
require 'petstore/configuration' require 'petstore/configuration'
# Models # Models
require 'petstore/models/animal'
require 'petstore/models/cat'
require 'petstore/models/category' require 'petstore/models/category'
require 'petstore/models/dog'
require 'petstore/models/inline_response_200' require 'petstore/models/inline_response_200'
require 'petstore/models/model_200_response' require 'petstore/models/model_200_response'
require 'petstore/models/model_return' require 'petstore/models/model_return'