[Perl] remove singleton (#5353)

- removed Singleton from ApiClient

fixes #5336
This commit is contained in:
tbe
2017-04-10 16:52:32 +02:00
committed by wing328
parent c35fdc3bda
commit d59ac2ae65
27 changed files with 503 additions and 362 deletions

View File

@@ -24,10 +24,10 @@ To test \"client\" model
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
);
my $api_instance = WWW::SwaggerClient::FakeApi->new();
my $body = WWW::SwaggerClient::Object::Client->new(); # Client | client model
eval {
@@ -70,14 +70,14 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
# Configure HTTP basic authorization: http_basic_test
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
# Configure HTTP basic authorization: http_basic_test
username => 'YOUR_USERNAME',
password => 'YOUR_PASSWORD',
);
my $api_instance = WWW::SwaggerClient::FakeApi->new();
my $number = 3.4; # Number | None
my $double = 1.2; # double | None
my $pattern_without_delimiter = 'pattern_without_delimiter_example'; # string | None
@@ -145,10 +145,10 @@ To test enum parameters
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
);
my $api_instance = WWW::SwaggerClient::FakeApi->new();
my $enum_form_string_array = []; # ARRAY[string] | Form parameter enum test (string array)
my $enum_form_string = 'enum_form_string_example'; # string | Form parameter enum test (string)
my $enum_header_string_array = []; # ARRAY[string] | Header parameter enum test (string array)

View File

@@ -5,7 +5,7 @@
use WWW::SwaggerClient::Object::FakeClassnameTags123Api;
```
All URIs are relative to *http://petstore.swagger.io/v2*
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -20,10 +20,10 @@ To test class name in snake case
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FakeClassnameTags123Api;
my $api_instance = WWW::SwaggerClient::FakeClassnameTags123Api->new(
);
my $api_instance = WWW::SwaggerClient::FakeClassnameTags123Api->new();
my $body = WWW::SwaggerClient::Object::Client->new(); # Client | client model
eval {

View File

@@ -29,13 +29,13 @@ Add a new pet to the store
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
@@ -77,13 +77,13 @@ Deletes a pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # int | Pet id to delete
my $api_key = 'api_key_example'; # string |
@@ -127,13 +127,13 @@ Multiple status values can be provided with comma separated strings
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $status = []; # ARRAY[string] | Status values that need to be considered for filter
eval {
@@ -176,13 +176,13 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $tags = []; # ARRAY[string] | Tags to filter by
eval {
@@ -225,15 +225,15 @@ Returns a single pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
# Configure API key authorization: api_key
api_key => {'api_key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'api_key' => 'Bearer'},
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # int | ID of pet to return
eval {
@@ -276,13 +276,13 @@ Update an existing pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
@@ -324,13 +324,13 @@ Updates a pet in the store with form data
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # int | ID of pet that needs to be updated
my $name = 'name_example'; # string | Updated name of the pet
my $status = 'status_example'; # string | Updated status of the pet
@@ -376,13 +376,13 @@ uploads an image
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $api_instance = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # int | ID of pet to update
my $additional_metadata = 'additional_metadata_example'; # string | Additional data to pass to server
my $file = '/path/to/file.txt'; # File | file to upload

View File

@@ -25,10 +25,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
);
my $api_instance = WWW::SwaggerClient::StoreApi->new();
my $order_id = 'order_id_example'; # string | ID of the order that needs to be deleted
eval {
@@ -70,15 +70,15 @@ Returns a map of status codes to quantities
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "Bearer";
# Configure API key authorization: api_key
api_key => {'api_key' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'api_key' => 'Bearer'},
);
my $api_instance = WWW::SwaggerClient::StoreApi->new();
eval {
my $result = $api_instance->get_inventory();
@@ -117,10 +117,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
);
my $api_instance = WWW::SwaggerClient::StoreApi->new();
my $order_id = 789; # int | ID of pet that needs to be fetched
eval {
@@ -163,10 +163,10 @@ Place an order for a pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
);
my $api_instance = WWW::SwaggerClient::StoreApi->new();
my $body = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet
eval {

View File

@@ -29,10 +29,10 @@ This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | Created user object
eval {
@@ -74,10 +74,10 @@ Creates list of users with given input array
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
my $body = [WWW::SwaggerClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
@@ -119,10 +119,10 @@ Creates list of users with given input array
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
my $body = [WWW::SwaggerClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
@@ -164,10 +164,10 @@ This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
my $username = 'username_example'; # string | The name that needs to be deleted
eval {
@@ -209,10 +209,10 @@ Get user by user name
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
my $username = 'username_example'; # string | The name that needs to be fetched. Use user1 for testing.
eval {
@@ -255,10 +255,10 @@ Logs user into the system
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
my $username = 'username_example'; # string | The user name for login
my $password = 'password_example'; # string | The password for login in clear text
@@ -303,10 +303,10 @@ Logs out current logged in user session
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
eval {
$api_instance->logout_user();
@@ -344,10 +344,10 @@ This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
);
my $api_instance = WWW::SwaggerClient::UserApi->new();
my $username = 'username_example'; # string | name that need to be deleted
my $body = WWW::SwaggerClient::Object::User->new(); # User | Updated user object