use 4-space instead of tab in perl templates (#1830)

This commit is contained in:
William Cheng 2019-01-07 00:22:24 +08:00 committed by GitHub
parent bdf32775fb
commit b015ac9307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 1957 additions and 1963 deletions

View File

@ -26,7 +26,6 @@ use Module::Runtime qw(use_module);
use {{moduleName}}::Configuration;
sub new {
my $class = shift;
@ -80,7 +79,6 @@ sub call_api {
# update parameters based on authentication settings
$self->update_params_for_auth($header_params, $query_params, $auth_settings);
my $_url = $self->{config}{base_url} . $resource_path;
# build query
@ -88,7 +86,6 @@ sub call_api {
$_url = ($_url . '?' . eval { URI::Query->new($query_params)->stringify });
}
# body data
$body_data = to_json($body_data->to_hash) if defined $body_data && $body_data->can('to_hash'); # model to json string
my $_body_data = %$post_params ? $post_params : $body_data;
@ -232,7 +229,6 @@ sub deserialize
} else {
#TODO log error
}
} elsif ( (substr($class, 0, 6)) eq 'ARRAY[' ) { # array of data
return $data if $data eq '[]'; # return if empty array
@ -259,7 +255,6 @@ sub deserialize
return $_instance->from_hash(decode_json $data);
}
}
}
# return 'Accept' based on an array of accept provided
@ -328,22 +323,32 @@ sub update_params_for_auth {
if (!defined($auth)) {
# TODO show warning about auth setting not defined
}
{{#authMethods}}elsif ($auth eq '{{name}}') {
{{#isApiKey}}{{#isKeyInHeader}}
{{#authMethods}}
elsif ($auth eq '{{name}}') {
{{#isApiKey}}
{{#isKeyInHeader}}
my $api_key = $self->get_api_key_with_prefix('{{keyParamName}}');
if ($api_key) {
$header_params->{'{{keyParamName}}'} = $api_key;
}{{/isKeyInHeader}}{{#isKeyInQuery}}
}
{{/isKeyInHeader}}
{{#isKeyInQuery}}
my $api_key = $self->get_api_key_with_prefix('{{keyParamName}}');
if ($api_key) {
$query_params->{'{{keyParamName}}'} = $api_key;
}{{/isKeyInQuery}}{{/isApiKey}}{{#isBasic}}
}
{{/isKeyInQuery}}
{{/isApiKey}}
{{#isBasic}}
if ($self->{config}{username} || $self->{config}{password}) {
$header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password});
}{{/isBasic}}{{#isOAuth}}
}
{{/isBasic}}
{{#isOAuth}}
if ($self->{config}{access_token}) {
$header_params->{'Authorization'} = 'Bearer ' . $self->{config}{access_token};
}{{/isOAuth}}
}
{{/isOAuth}}
}
{{/authMethods}}
else {
@ -389,5 +394,4 @@ sub _global_auth_setup {
}
}
1;

View File

@ -327,10 +327,10 @@ use WWW::OpenAPIClient::;
my $api_instance = WWW::OpenAPIClient::->new(
);
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->call_123_test_special_tags(client => $client);
my $result = $api_instance->call_123_test_special_tags(body => $body);
print Dumper($result);
};
if ($@) {

View File

@ -13,7 +13,7 @@ Method | HTTP request | Description
# **call_123_test_special_tags**
> Client call_123_test_special_tags(client => $client)
> Client call_123_test_special_tags(body => $body)
To test special tags
@ -26,10 +26,10 @@ use WWW::OpenAPIClient::AnotherFakeApi;
my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new(
);
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->call_123_test_special_tags(client => $client);
my $result = $api_instance->call_123_test_special_tags(body => $body);
print Dumper($result);
};
if ($@) {
@ -41,7 +41,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -70,7 +70,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)
# **fake_outer_composite_serialize**
> OuterComposite fake_outer_composite_serialize(outer_composite => $outer_composite)
> OuterComposite fake_outer_composite_serialize(body => $body)
@ -83,10 +83,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
my $body = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
eval {
my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite);
my $result = $api_instance->fake_outer_composite_serialize(body => $body);
print Dumper($result);
};
if ($@) {
@ -98,7 +98,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@ -208,7 +208,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)
# **test_body_with_file_schema**
> test_body_with_file_schema(file_schema_test_class => $file_schema_test_class)
> test_body_with_file_schema(body => $body)
@ -221,10 +221,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $file_schema_test_class = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass |
my $body = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass |
eval {
$api_instance->test_body_with_file_schema(file_schema_test_class => $file_schema_test_class);
$api_instance->test_body_with_file_schema(body => $body);
};
if ($@) {
warn "Exception when calling FakeApi->test_body_with_file_schema: $@\n";
@ -235,7 +235,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@ -253,7 +253,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)
# **test_body_with_query_params**
> test_body_with_query_params(query => $query, user => $user)
> test_body_with_query_params(query => $query, body => $body)
@ -265,10 +265,10 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $query = "query_example"; # string |
my $user = WWW::OpenAPIClient::Object::User->new(); # User |
my $body = WWW::OpenAPIClient::Object::User->new(); # User |
eval {
$api_instance->test_body_with_query_params(query => $query, user => $user);
$api_instance->test_body_with_query_params(query => $query, body => $body);
};
if ($@) {
warn "Exception when calling FakeApi->test_body_with_query_params: $@\n";
@ -280,7 +280,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **string**| |
**user** | [**User**](User.md)| |
**body** | [**User**](User.md)| |
### Return type
@ -298,7 +298,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)
# **test_client_model**
> Client test_client_model(client => $client)
> Client test_client_model(body => $body)
To test \"client\" model
@ -311,10 +311,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->test_client_model(client => $client);
my $result = $api_instance->test_client_model(body => $body);
print Dumper($result);
};
if ($@) {
@ -326,7 +326,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type
@ -533,7 +533,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)
# **test_inline_additional_properties**
> test_inline_additional_properties(request_body => $request_body)
> test_inline_additional_properties(param => $param)
test inline additionalProperties
@ -544,10 +544,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $request_body = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body
my $param = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body
eval {
$api_instance->test_inline_additional_properties(request_body => $request_body);
$api_instance->test_inline_additional_properties(param => $param);
};
if ($@) {
warn "Exception when calling FakeApi->test_inline_additional_properties: $@\n";
@ -558,7 +558,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**request_body** | [**HASH[string,string]**](string.md)| request body |
**param** | [**HASH[string,string]**](string.md)| request body |
### Return type

View File

@ -13,7 +13,7 @@ Method | HTTP request | Description
# **test_classname**
> Client test_classname(client => $client)
> Client test_classname(body => $body)
To test class name in snake case
@ -31,10 +31,10 @@ my $api_instance = WWW::OpenAPIClient::FakeClassnameTags123Api->new(
#api_key_prefix => {'api_key_query' => 'Bearer'},
);
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->test_classname(client => $client);
my $result = $api_instance->test_classname(body => $body);
print Dumper($result);
};
if ($@) {
@ -46,7 +46,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -21,7 +21,7 @@ Method | HTTP request | Description
# **add_pet**
> add_pet(pet => $pet)
> add_pet(body => $body)
Add a new pet to the store
@ -35,10 +35,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new(
access_token => 'YOUR_ACCESS_TOKEN',
);
my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
$api_instance->add_pet(pet => $pet);
$api_instance->add_pet(body => $body);
};
if ($@) {
warn "Exception when calling PetApi->add_pet: $@\n";
@ -49,7 +49,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -264,7 +264,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)
# **update_pet**
> update_pet(pet => $pet)
> update_pet(body => $body)
Update an existing pet
@ -278,10 +278,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new(
access_token => 'YOUR_ACCESS_TOKEN',
);
my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
$api_instance->update_pet(pet => $pet);
$api_instance->update_pet(body => $body);
};
if ($@) {
warn "Exception when calling PetApi->update_pet: $@\n";
@ -292,7 +292,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type

View File

@ -154,7 +154,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)
# **place_order**
> Order place_order(order => $order)
> Order place_order(body => $body)
Place an order for a pet
@ -165,10 +165,10 @@ use WWW::OpenAPIClient::StoreApi;
my $api_instance = WWW::OpenAPIClient::StoreApi->new(
);
my $order = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet
my $body = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet
eval {
my $result = $api_instance->place_order(order => $order);
my $result = $api_instance->place_order(body => $body);
print Dumper($result);
};
if ($@) {
@ -180,7 +180,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type

View File

@ -20,7 +20,7 @@ Method | HTTP request | Description
# **create_user**
> create_user(user => $user)
> create_user(body => $body)
Create user
@ -33,10 +33,10 @@ use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object
my $body = WWW::OpenAPIClient::Object::User->new(); # User | Created user object
eval {
$api_instance->create_user(user => $user);
$api_instance->create_user(body => $body);
};
if ($@) {
warn "Exception when calling UserApi->create_user: $@\n";
@ -47,7 +47,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| Created user object |
**body** | [**User**](User.md)| Created user object |
### Return type
@ -65,7 +65,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)
# **create_users_with_array_input**
> create_users_with_array_input(user => $user)
> create_users_with_array_input(body => $body)
Creates list of users with given input array
@ -76,10 +76,10 @@ use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
$api_instance->create_users_with_array_input(user => $user);
$api_instance->create_users_with_array_input(body => $body);
};
if ($@) {
warn "Exception when calling UserApi->create_users_with_array_input: $@\n";
@ -90,7 +90,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**ARRAY[User]**](ARRAY.md)| List of user object |
**body** | [**ARRAY[User]**](ARRAY.md)| List of user object |
### Return type
@ -108,7 +108,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)
# **create_users_with_list_input**
> create_users_with_list_input(user => $user)
> create_users_with_list_input(body => $body)
Creates list of users with given input array
@ -119,10 +119,10 @@ use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
$api_instance->create_users_with_list_input(user => $user);
$api_instance->create_users_with_list_input(body => $body);
};
if ($@) {
warn "Exception when calling UserApi->create_users_with_list_input: $@\n";
@ -133,7 +133,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**ARRAY[User]**](ARRAY.md)| List of user object |
**body** | [**ARRAY[User]**](ARRAY.md)| List of user object |
### Return type
@ -325,7 +325,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)
# **update_user**
> update_user(username => $username, user => $user)
> update_user(username => $username, body => $body)
Updated user
@ -339,10 +339,10 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $username = "username_example"; # string | name that need to be deleted
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object
my $body = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object
eval {
$api_instance->update_user(username => $username, user => $user);
$api_instance->update_user(username => $username, body => $body);
};
if ($@) {
warn "Exception when calling UserApi->update_user: $@\n";
@ -354,7 +354,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**user** | [**User**](User.md)| Updated user object |
**body** | [**User**](User.md)| Updated user object |
### Return type

View File

@ -53,10 +53,10 @@ sub new {
#
# To test special tags
#
# @param Client $client client model (required)
# @param Client $body client model (required)
{
my $params = {
'client' => {
'body' => {
data_type => 'Client',
description => 'client model',
required => '1',
@ -73,9 +73,9 @@ sub new {
sub call_123_test_special_tags {
my ($self, %args) = @_;
# verify the required parameter 'client' is set
unless (exists $args{'client'}) {
croak("Missing the required parameter 'client' when calling call_123_test_special_tags");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling call_123_test_special_tags");
}
# parse inputs
@ -95,8 +95,8 @@ sub call_123_test_special_tags {
my $_body_data;
# body params
if ( exists $args{'client'}) {
$_body_data = $args{'client'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any

View File

@ -39,7 +39,6 @@ use Module::Runtime qw(use_module);
use WWW::OpenAPIClient::Configuration;
sub new {
my $class = shift;
@ -93,7 +92,6 @@ sub call_api {
# update parameters based on authentication settings
$self->update_params_for_auth($header_params, $query_params, $auth_settings);
my $_url = $self->{config}{base_url} . $resource_path;
# build query
@ -101,7 +99,6 @@ sub call_api {
$_url = ($_url . '?' . eval { URI::Query->new($query_params)->stringify });
}
# body data
$body_data = to_json($body_data->to_hash) if defined $body_data && $body_data->can('to_hash'); # model to json string
my $_body_data = %$post_params ? $post_params : $body_data;
@ -245,7 +242,6 @@ sub deserialize
} else {
#TODO log error
}
} elsif ( (substr($class, 0, 6)) eq 'ARRAY[' ) { # array of data
return $data if $data eq '[]'; # return if empty array
@ -272,7 +268,6 @@ sub deserialize
return $_instance->from_hash(decode_json $data);
}
}
}
# return 'Accept' based on an array of accept provided
@ -342,27 +337,23 @@ sub update_params_for_auth {
# TODO show warning about auth setting not defined
}
elsif ($auth eq 'api_key') {
my $api_key = $self->get_api_key_with_prefix('api_key');
if ($api_key) {
$header_params->{'api_key'} = $api_key;
}
}
elsif ($auth eq 'api_key_query') {
elsif ($auth eq 'api_key_query') {
my $api_key = $self->get_api_key_with_prefix('api_key_query');
if ($api_key) {
$query_params->{'api_key_query'} = $api_key;
}
}
elsif ($auth eq 'http_basic_test') {
elsif ($auth eq 'http_basic_test') {
if ($self->{config}{username} || $self->{config}{password}) {
$header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password});
}
}
elsif ($auth eq 'petstore_auth') {
elsif ($auth eq 'petstore_auth') {
if ($self->{config}{access_token}) {
$header_params->{'Authorization'} = 'Bearer ' . $self->{config}{access_token};
}
@ -410,5 +401,4 @@ sub _global_auth_setup {
}
}
1;

View File

@ -113,10 +113,10 @@ sub fake_outer_boolean_serialize {
#
#
#
# @param OuterComposite $outer_composite Input composite as post body (optional)
# @param OuterComposite $body Input composite as post body (optional)
{
my $params = {
'outer_composite' => {
'body' => {
data_type => 'OuterComposite',
description => 'Input composite as post body',
required => '0',
@ -150,8 +150,8 @@ sub fake_outer_composite_serialize {
my $_body_data;
# body params
if ( exists $args{'outer_composite'}) {
$_body_data = $args{'outer_composite'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -293,10 +293,10 @@ sub fake_outer_string_serialize {
#
#
#
# @param FileSchemaTestClass $file_schema_test_class (required)
# @param FileSchemaTestClass $body (required)
{
my $params = {
'file_schema_test_class' => {
'body' => {
data_type => 'FileSchemaTestClass',
description => '',
required => '1',
@ -313,9 +313,9 @@ sub fake_outer_string_serialize {
sub test_body_with_file_schema {
my ($self, %args) = @_;
# verify the required parameter 'file_schema_test_class' is set
unless (exists $args{'file_schema_test_class'}) {
croak("Missing the required parameter 'file_schema_test_class' when calling test_body_with_file_schema");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling test_body_with_file_schema");
}
# parse inputs
@ -335,8 +335,8 @@ sub test_body_with_file_schema {
my $_body_data;
# body params
if ( exists $args{'file_schema_test_class'}) {
$_body_data = $args{'file_schema_test_class'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -355,7 +355,7 @@ sub test_body_with_file_schema {
#
#
# @param string $query (required)
# @param User $user (required)
# @param User $body (required)
{
my $params = {
'query' => {
@ -363,7 +363,7 @@ sub test_body_with_file_schema {
description => '',
required => '1',
},
'user' => {
'body' => {
data_type => 'User',
description => '',
required => '1',
@ -385,9 +385,9 @@ sub test_body_with_query_params {
croak("Missing the required parameter 'query' when calling test_body_with_query_params");
}
# verify the required parameter 'user' is set
unless (exists $args{'user'}) {
croak("Missing the required parameter 'user' when calling test_body_with_query_params");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling test_body_with_query_params");
}
# parse inputs
@ -412,8 +412,8 @@ sub test_body_with_query_params {
my $_body_data;
# body params
if ( exists $args{'user'}) {
$_body_data = $args{'user'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -431,10 +431,10 @@ sub test_body_with_query_params {
#
# To test \"client\" model
#
# @param Client $client client model (required)
# @param Client $body client model (required)
{
my $params = {
'client' => {
'body' => {
data_type => 'Client',
description => 'client model',
required => '1',
@ -451,9 +451,9 @@ sub test_body_with_query_params {
sub test_client_model {
my ($self, %args) = @_;
# verify the required parameter 'client' is set
unless (exists $args{'client'}) {
croak("Missing the required parameter 'client' when calling test_client_model");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling test_client_model");
}
# parse inputs
@ -473,8 +473,8 @@ sub test_client_model {
my $_body_data;
# body params
if ( exists $args{'client'}) {
$_body_data = $args{'client'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -975,10 +975,10 @@ sub test_group_parameters {
#
# test inline additionalProperties
#
# @param HASH[string,string] $request_body request body (required)
# @param HASH[string,string] $param request body (required)
{
my $params = {
'request_body' => {
'param' => {
data_type => 'HASH[string,string]',
description => 'request body',
required => '1',
@ -995,9 +995,9 @@ sub test_group_parameters {
sub test_inline_additional_properties {
my ($self, %args) = @_;
# verify the required parameter 'request_body' is set
unless (exists $args{'request_body'}) {
croak("Missing the required parameter 'request_body' when calling test_inline_additional_properties");
# verify the required parameter 'param' is set
unless (exists $args{'param'}) {
croak("Missing the required parameter 'param' when calling test_inline_additional_properties");
}
# parse inputs
@ -1017,8 +1017,8 @@ sub test_inline_additional_properties {
my $_body_data;
# body params
if ( exists $args{'request_body'}) {
$_body_data = $args{'request_body'};
if ( exists $args{'param'}) {
$_body_data = $args{'param'};
}
# authentication setting, if any

View File

@ -53,10 +53,10 @@ sub new {
#
# To test class name in snake case
#
# @param Client $client client model (required)
# @param Client $body client model (required)
{
my $params = {
'client' => {
'body' => {
data_type => 'Client',
description => 'client model',
required => '1',
@ -73,9 +73,9 @@ sub new {
sub test_classname {
my ($self, %args) = @_;
# verify the required parameter 'client' is set
unless (exists $args{'client'}) {
croak("Missing the required parameter 'client' when calling test_classname");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling test_classname");
}
# parse inputs
@ -95,8 +95,8 @@ sub test_classname {
my $_body_data;
# body params
if ( exists $args{'client'}) {
$_body_data = $args{'client'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any

View File

@ -53,10 +53,10 @@ sub new {
#
# Add a new pet to the store
#
# @param Pet $pet Pet object that needs to be added to the store (required)
# @param Pet $body Pet object that needs to be added to the store (required)
{
my $params = {
'pet' => {
'body' => {
data_type => 'Pet',
description => 'Pet object that needs to be added to the store',
required => '1',
@ -73,9 +73,9 @@ sub new {
sub add_pet {
my ($self, %args) = @_;
# verify the required parameter 'pet' is set
unless (exists $args{'pet'}) {
croak("Missing the required parameter 'pet' when calling add_pet");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling add_pet");
}
# parse inputs
@ -95,8 +95,8 @@ sub add_pet {
my $_body_data;
# body params
if ( exists $args{'pet'}) {
$_body_data = $args{'pet'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -385,10 +385,10 @@ sub get_pet_by_id {
#
# Update an existing pet
#
# @param Pet $pet Pet object that needs to be added to the store (required)
# @param Pet $body Pet object that needs to be added to the store (required)
{
my $params = {
'pet' => {
'body' => {
data_type => 'Pet',
description => 'Pet object that needs to be added to the store',
required => '1',
@ -405,9 +405,9 @@ sub get_pet_by_id {
sub update_pet {
my ($self, %args) = @_;
# verify the required parameter 'pet' is set
unless (exists $args{'pet'}) {
croak("Missing the required parameter 'pet' when calling update_pet");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling update_pet");
}
# parse inputs
@ -427,8 +427,8 @@ sub update_pet {
my $_body_data;
# body params
if ( exists $args{'pet'}) {
$_body_data = $args{'pet'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any

View File

@ -232,10 +232,10 @@ sub get_order_by_id {
#
# Place an order for a pet
#
# @param Order $order order placed for purchasing the pet (required)
# @param Order $body order placed for purchasing the pet (required)
{
my $params = {
'order' => {
'body' => {
data_type => 'Order',
description => 'order placed for purchasing the pet',
required => '1',
@ -252,9 +252,9 @@ sub get_order_by_id {
sub place_order {
my ($self, %args) = @_;
# verify the required parameter 'order' is set
unless (exists $args{'order'}) {
croak("Missing the required parameter 'order' when calling place_order");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling place_order");
}
# parse inputs
@ -274,8 +274,8 @@ sub place_order {
my $_body_data;
# body params
if ( exists $args{'order'}) {
$_body_data = $args{'order'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any

View File

@ -53,10 +53,10 @@ sub new {
#
# Create user
#
# @param User $user Created user object (required)
# @param User $body Created user object (required)
{
my $params = {
'user' => {
'body' => {
data_type => 'User',
description => 'Created user object',
required => '1',
@ -73,9 +73,9 @@ sub new {
sub create_user {
my ($self, %args) = @_;
# verify the required parameter 'user' is set
unless (exists $args{'user'}) {
croak("Missing the required parameter 'user' when calling create_user");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling create_user");
}
# parse inputs
@ -95,8 +95,8 @@ sub create_user {
my $_body_data;
# body params
if ( exists $args{'user'}) {
$_body_data = $args{'user'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -114,10 +114,10 @@ sub create_user {
#
# Creates list of users with given input array
#
# @param ARRAY[User] $user List of user object (required)
# @param ARRAY[User] $body List of user object (required)
{
my $params = {
'user' => {
'body' => {
data_type => 'ARRAY[User]',
description => 'List of user object',
required => '1',
@ -134,9 +134,9 @@ sub create_user {
sub create_users_with_array_input {
my ($self, %args) = @_;
# verify the required parameter 'user' is set
unless (exists $args{'user'}) {
croak("Missing the required parameter 'user' when calling create_users_with_array_input");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling create_users_with_array_input");
}
# parse inputs
@ -156,8 +156,8 @@ sub create_users_with_array_input {
my $_body_data;
# body params
if ( exists $args{'user'}) {
$_body_data = $args{'user'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -175,10 +175,10 @@ sub create_users_with_array_input {
#
# Creates list of users with given input array
#
# @param ARRAY[User] $user List of user object (required)
# @param ARRAY[User] $body List of user object (required)
{
my $params = {
'user' => {
'body' => {
data_type => 'ARRAY[User]',
description => 'List of user object',
required => '1',
@ -195,9 +195,9 @@ sub create_users_with_array_input {
sub create_users_with_list_input {
my ($self, %args) = @_;
# verify the required parameter 'user' is set
unless (exists $args{'user'}) {
croak("Missing the required parameter 'user' when calling create_users_with_list_input");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling create_users_with_list_input");
}
# parse inputs
@ -217,8 +217,8 @@ sub create_users_with_list_input {
my $_body_data;
# body params
if ( exists $args{'user'}) {
$_body_data = $args{'user'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any
@ -493,7 +493,7 @@ sub logout_user {
# Updated user
#
# @param string $username name that need to be deleted (required)
# @param User $user Updated user object (required)
# @param User $body Updated user object (required)
{
my $params = {
'username' => {
@ -501,7 +501,7 @@ sub logout_user {
description => 'name that need to be deleted',
required => '1',
},
'user' => {
'body' => {
data_type => 'User',
description => 'Updated user object',
required => '1',
@ -523,9 +523,9 @@ sub update_user {
croak("Missing the required parameter 'username' when calling update_user");
}
# verify the required parameter 'user' is set
unless (exists $args{'user'}) {
croak("Missing the required parameter 'user' when calling update_user");
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling update_user");
}
# parse inputs
@ -552,8 +552,8 @@ sub update_user {
my $_body_data;
# body params
if ( exists $args{'user'}) {
$_body_data = $args{'user'};
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
}
# authentication setting, if any