forked from loafle/openapi-generator-original
fix typo in readme
This commit is contained in:
parent
f0c3870386
commit
20f1e97df3
@ -6,7 +6,7 @@
|
||||
{{/appDescription}}
|
||||
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}}
|
||||
- Build date: {{generatedDate}}
|
||||
- Build package: {{generatorClass}}
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API verion: {{appVersion}}
|
||||
- API version: {{appVersion}}
|
||||
- Package version: {{moduleVersion}}
|
||||
- Build date: {{generatedDate}}
|
||||
- Build package: {{generatorClass}}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
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}}
|
||||
- Build date: {{generatedDate}}
|
||||
- Build package: {{generatorClass}}
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
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}}
|
||||
- Build date: {{generatedDate}}
|
||||
- Build package: {{generatorClass}}
|
||||
|
@ -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 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
|
||||
- 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
|
||||
|
||||
## Installation
|
||||
@ -108,7 +108,10 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [SwaggerPetstore.Animal](docs/Animal.md)
|
||||
- [SwaggerPetstore.Cat](docs/Cat.md)
|
||||
- [SwaggerPetstore.Category](docs/Category.md)
|
||||
- [SwaggerPetstore.Dog](docs/Dog.md)
|
||||
- [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md)
|
||||
- [SwaggerPetstore.Model200Response](docs/Model200Response.md)
|
||||
- [SwaggerPetstore.ModelReturn](docs/ModelReturn.md)
|
||||
|
@ -1,12 +1,12 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// 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) {
|
||||
// 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';
|
||||
|
||||
/**
|
||||
@ -46,11 +46,26 @@
|
||||
* @property {module: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.
|
||||
* @property {module:model/Category}
|
||||
*/
|
||||
Category: Category,
|
||||
/**
|
||||
* The Dog model constructor.
|
||||
* @property {module:model/Dog}
|
||||
*/
|
||||
Dog: Dog,
|
||||
/**
|
||||
* The InlineResponse200 model constructor.
|
||||
* @property {module:model/InlineResponse200}
|
||||
|
@ -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 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
|
||||
- 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
|
||||
|
||||
## Installation
|
||||
@ -111,7 +111,10 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [SwaggerPetstore.Animal](docs/Animal.md)
|
||||
- [SwaggerPetstore.Cat](docs/Cat.md)
|
||||
- [SwaggerPetstore.Category](docs/Category.md)
|
||||
- [SwaggerPetstore.Dog](docs/Dog.md)
|
||||
- [SwaggerPetstore.InlineResponse200](docs/InlineResponse200.md)
|
||||
- [SwaggerPetstore.Model200Response](docs/Model200Response.md)
|
||||
- [SwaggerPetstore.ModelReturn](docs/ModelReturn.md)
|
||||
|
@ -1,12 +1,12 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// 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) {
|
||||
// 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';
|
||||
|
||||
/**
|
||||
@ -46,11 +46,26 @@
|
||||
* @property {module: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.
|
||||
* @property {module:model/Category}
|
||||
*/
|
||||
Category: Category,
|
||||
/**
|
||||
* The Dog model constructor.
|
||||
* @property {module:model/Dog}
|
||||
*/
|
||||
Dog: Dog,
|
||||
/**
|
||||
* The InlineResponse200 model constructor.
|
||||
* @property {module:model/InlineResponse200}
|
||||
|
@ -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:
|
||||
|
||||
- API verion: 1.0.0
|
||||
- API 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
|
||||
|
||||
## A note on Moose
|
||||
@ -231,7 +231,10 @@ use WWW::SwaggerClient::UserApi;
|
||||
|
||||
To load the models:
|
||||
```perl
|
||||
use WWW::SwaggerClient::Object::Animal;
|
||||
use WWW::SwaggerClient::Object::Cat;
|
||||
use WWW::SwaggerClient::Object::Category;
|
||||
use WWW::SwaggerClient::Object::Dog;
|
||||
use WWW::SwaggerClient::Object::InlineResponse200;
|
||||
use WWW::SwaggerClient::Object::Model200Response;
|
||||
use WWW::SwaggerClient::Object::ModelReturn;
|
||||
@ -257,7 +260,10 @@ use WWW::SwaggerClient::StoreApi;
|
||||
use WWW::SwaggerClient::UserApi;
|
||||
|
||||
# load the models
|
||||
use WWW::SwaggerClient::Object::Animal;
|
||||
use WWW::SwaggerClient::Object::Cat;
|
||||
use WWW::SwaggerClient::Object::Category;
|
||||
use WWW::SwaggerClient::Object::Dog;
|
||||
use WWW::SwaggerClient::Object::InlineResponse200;
|
||||
use WWW::SwaggerClient::Object::Model200Response;
|
||||
use WWW::SwaggerClient::Object::ModelReturn;
|
||||
@ -320,7 +326,10 @@ Class | Method | HTTP request | Description
|
||||
|
||||
|
||||
# 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::Dog](docs/Dog.md)
|
||||
- [WWW::SwaggerClient::Object::InlineResponse200](docs/InlineResponse200.md)
|
||||
- [WWW::SwaggerClient::Object::Model200Response](docs/Model200Response.md)
|
||||
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)
|
||||
|
@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
|
||||
default => sub { {
|
||||
app_name => 'Swagger Petstore',
|
||||
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',
|
||||
} },
|
||||
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
|
||||
|
||||
=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
|
||||
|
||||
|
@ -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:
|
||||
|
||||
- API verion: 1.0.0
|
||||
- API 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
|
||||
|
||||
## Requirements
|
||||
@ -126,25 +126,10 @@ Class | Method | HTTP request | Description
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## petstore_auth
|
||||
|
||||
- **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
|
||||
## test_api_key_header
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-test_api_client_id
|
||||
- **Location**: HTTP header
|
||||
|
||||
## test_api_client_secret
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-test_api_client_secret
|
||||
- **API key parameter name**: test_api_key_header
|
||||
- **Location**: HTTP header
|
||||
|
||||
## api_key
|
||||
@ -157,17 +142,32 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- **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
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: test_api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
## test_api_key_header
|
||||
## petstore_auth
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: test_api_key_header
|
||||
- **Location**: HTTP 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
|
||||
|
||||
|
||||
## Author
|
||||
|
@ -3,12 +3,12 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**photo_urls** | **string[]** | | [optional]
|
||||
**name** | **string** | | [optional]
|
||||
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [optional]
|
||||
**id** | **int** | |
|
||||
**category** | **object** | | [optional]
|
||||
**tags** | [**\Swagger\Client\Model\Tag[]**](Tag.md) | | [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)
|
||||
|
||||
|
@ -268,12 +268,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
||||
<?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
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// 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();
|
||||
$pet_id = 789; // int | ID of pet that needs to be fetched
|
||||
@ -299,7 +299,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### 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
|
||||
|
||||
@ -320,12 +320,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
||||
<?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
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// 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();
|
||||
$pet_id = 789; // int | ID of pet that needs to be fetched
|
||||
@ -351,7 +351,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### 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
|
||||
|
||||
@ -372,12 +372,12 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
||||
<?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
|
||||
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
|
||||
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
// 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();
|
||||
$pet_id = 789; // int | ID of pet that needs to be fetched
|
||||
@ -403,7 +403,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### 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
|
||||
|
||||
|
@ -214,14 +214,14 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
<?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
|
||||
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
|
||||
// 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();
|
||||
$order_id = "order_id_example"; // string | ID of pet that needs to be fetched
|
||||
@ -247,7 +247,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### 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
|
||||
|
||||
|
@ -618,11 +618,6 @@ class PetApi
|
||||
$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
|
||||
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
|
||||
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
|
||||
try {
|
||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||
@ -725,11 +725,6 @@ class PetApi
|
||||
$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
|
||||
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
|
||||
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
|
||||
try {
|
||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||
@ -832,11 +832,6 @@ class PetApi
|
||||
$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
|
||||
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
|
||||
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
|
||||
try {
|
||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||
|
@ -525,16 +525,16 @@ class StoreApi
|
||||
}
|
||||
|
||||
// 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) {
|
||||
$queryParams['test_api_key_query'] = $apiKey;
|
||||
$headerParams['test_api_key_header'] = $apiKey;
|
||||
}
|
||||
|
||||
|
||||
// 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) {
|
||||
$headerParams['test_api_key_header'] = $apiKey;
|
||||
$queryParams['test_api_key_query'] = $apiKey;
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,12 +51,12 @@ class InlineResponse200 implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $swaggerTypes = array(
|
||||
'photo_urls' => 'string[]',
|
||||
'name' => 'string',
|
||||
'tags' => '\Swagger\Client\Model\Tag[]',
|
||||
'id' => 'int',
|
||||
'category' => 'object',
|
||||
'tags' => '\Swagger\Client\Model\Tag[]',
|
||||
'status' => 'string'
|
||||
'status' => 'string',
|
||||
'name' => 'string',
|
||||
'photo_urls' => 'string[]'
|
||||
);
|
||||
|
||||
static function swaggerTypes() {
|
||||
@ -68,12 +68,12 @@ class InlineResponse200 implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $attributeMap = array(
|
||||
'photo_urls' => 'photoUrls',
|
||||
'name' => 'name',
|
||||
'tags' => 'tags',
|
||||
'id' => 'id',
|
||||
'category' => 'category',
|
||||
'tags' => 'tags',
|
||||
'status' => 'status'
|
||||
'status' => 'status',
|
||||
'name' => 'name',
|
||||
'photo_urls' => 'photoUrls'
|
||||
);
|
||||
|
||||
static function attributeMap() {
|
||||
@ -85,12 +85,12 @@ class InlineResponse200 implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $setters = array(
|
||||
'photo_urls' => 'setPhotoUrls',
|
||||
'name' => 'setName',
|
||||
'tags' => 'setTags',
|
||||
'id' => 'setId',
|
||||
'category' => 'setCategory',
|
||||
'tags' => 'setTags',
|
||||
'status' => 'setStatus'
|
||||
'status' => 'setStatus',
|
||||
'name' => 'setName',
|
||||
'photo_urls' => 'setPhotoUrls'
|
||||
);
|
||||
|
||||
static function setters() {
|
||||
@ -102,12 +102,12 @@ class InlineResponse200 implements ArrayAccess
|
||||
* @var string[]
|
||||
*/
|
||||
static $getters = array(
|
||||
'photo_urls' => 'getPhotoUrls',
|
||||
'name' => 'getName',
|
||||
'tags' => 'getTags',
|
||||
'id' => 'getId',
|
||||
'category' => 'getCategory',
|
||||
'tags' => 'getTags',
|
||||
'status' => 'getStatus'
|
||||
'status' => 'getStatus',
|
||||
'name' => 'getName',
|
||||
'photo_urls' => 'getPhotoUrls'
|
||||
);
|
||||
|
||||
static function getters() {
|
||||
@ -116,16 +116,10 @@ class InlineResponse200 implements ArrayAccess
|
||||
|
||||
|
||||
/**
|
||||
* $photo_urls
|
||||
* @var string[]
|
||||
* $tags
|
||||
* @var \Swagger\Client\Model\Tag[]
|
||||
*/
|
||||
protected $photo_urls;
|
||||
|
||||
/**
|
||||
* $name
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
protected $tags;
|
||||
|
||||
/**
|
||||
* $id
|
||||
@ -139,18 +133,24 @@ class InlineResponse200 implements ArrayAccess
|
||||
*/
|
||||
protected $category;
|
||||
|
||||
/**
|
||||
* $tags
|
||||
* @var \Swagger\Client\Model\Tag[]
|
||||
*/
|
||||
protected $tags;
|
||||
|
||||
/**
|
||||
* $status pet status in the store
|
||||
* @var string
|
||||
*/
|
||||
protected $status;
|
||||
|
||||
/**
|
||||
* $name
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* $photo_urls
|
||||
* @var string[]
|
||||
*/
|
||||
protected $photo_urls;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -160,54 +160,33 @@ class InlineResponse200 implements ArrayAccess
|
||||
{
|
||||
|
||||
if ($data != null) {
|
||||
$this->photo_urls = $data["photo_urls"];
|
||||
$this->name = $data["name"];
|
||||
$this->tags = $data["tags"];
|
||||
$this->id = $data["id"];
|
||||
$this->category = $data["category"];
|
||||
$this->tags = $data["tags"];
|
||||
$this->status = $data["status"];
|
||||
$this->name = $data["name"];
|
||||
$this->photo_urls = $data["photo_urls"];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets photo_urls
|
||||
* @return string[]
|
||||
* Gets tags
|
||||
* @return \Swagger\Client\Model\Tag[]
|
||||
*/
|
||||
public function getPhotoUrls()
|
||||
public function getTags()
|
||||
{
|
||||
return $this->photo_urls;
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets photo_urls
|
||||
* @param string[] $photo_urls
|
||||
* Sets tags
|
||||
* @param \Swagger\Client\Model\Tag[] $tags
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhotoUrls($photo_urls)
|
||||
public function setTags($tags)
|
||||
{
|
||||
|
||||
$this->photo_urls = $photo_urls;
|
||||
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;
|
||||
$this->tags = $tags;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -253,27 +232,6 @@ class InlineResponse200 implements ArrayAccess
|
||||
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
|
||||
* @return string
|
||||
@ -298,6 +256,48 @@ class InlineResponse200 implements ArrayAccess
|
||||
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.
|
||||
* @param integer $offset Offset
|
||||
|
@ -257,7 +257,7 @@ class ObjectSerializer
|
||||
} else {
|
||||
$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);
|
||||
$deserialized = $data;
|
||||
} elseif ($class === '\SplFileObject') {
|
||||
|
@ -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:
|
||||
|
||||
- API verion: 1.0.0
|
||||
- API 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
|
||||
|
||||
## Installation
|
||||
@ -110,7 +110,10 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [Petstore::Animal](docs/Animal.md)
|
||||
- [Petstore::Cat](docs/Cat.md)
|
||||
- [Petstore::Category](docs/Category.md)
|
||||
- [Petstore::Dog](docs/Dog.md)
|
||||
- [Petstore::InlineResponse200](docs/InlineResponse200.md)
|
||||
- [Petstore::Model200Response](docs/Model200Response.md)
|
||||
- [Petstore::ModelReturn](docs/ModelReturn.md)
|
||||
|
@ -21,7 +21,10 @@ require 'petstore/version'
|
||||
require 'petstore/configuration'
|
||||
|
||||
# Models
|
||||
require 'petstore/models/animal'
|
||||
require 'petstore/models/cat'
|
||||
require 'petstore/models/category'
|
||||
require 'petstore/models/dog'
|
||||
require 'petstore/models/inline_response_200'
|
||||
require 'petstore/models/model_200_response'
|
||||
require 'petstore/models/model_return'
|
||||
|
Loading…
x
Reference in New Issue
Block a user