Skip to content

Commit

Permalink
update perl test with correct body parameter (#2717)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Apr 23, 2019
1 parent 34e2a0b commit c6c477f
Show file tree
Hide file tree
Showing 33 changed files with 466 additions and 367 deletions.
82 changes: 33 additions & 49 deletions samples/client/petstore/perl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ Each of these calls returns a hashref with various useful pieces of information.
To load the API packages:
```perl
use WWW::OpenAPIClient::AnotherFakeApi;
use WWW::OpenAPIClient::DefaultApi;
use WWW::OpenAPIClient::FakeApi;
use WWW::OpenAPIClient::FakeClassnameTags123Api;
use WWW::OpenAPIClient::PetApi;
Expand All @@ -233,7 +232,14 @@ use WWW::OpenAPIClient::UserApi;

To load the models:
```perl
use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType;
use WWW::OpenAPIClient::Object::AdditionalPropertiesArray;
use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean;
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger;
use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber;
use WWW::OpenAPIClient::Object::AdditionalPropertiesObject;
use WWW::OpenAPIClient::Object::AdditionalPropertiesString;
use WWW::OpenAPIClient::Object::Animal;
use WWW::OpenAPIClient::Object::ApiResponse;
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
Expand All @@ -250,36 +256,26 @@ use WWW::OpenAPIClient::Object::EnumClass;
use WWW::OpenAPIClient::Object::EnumTest;
use WWW::OpenAPIClient::Object::File;
use WWW::OpenAPIClient::Object::FileSchemaTestClass;
use WWW::OpenAPIClient::Object::Foo;
use WWW::OpenAPIClient::Object::FormatTest;
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
use WWW::OpenAPIClient::Object::HealthCheckResult;
use WWW::OpenAPIClient::Object::InlineObject;
use WWW::OpenAPIClient::Object::InlineObject1;
use WWW::OpenAPIClient::Object::InlineObject2;
use WWW::OpenAPIClient::Object::InlineObject3;
use WWW::OpenAPIClient::Object::InlineObject4;
use WWW::OpenAPIClient::Object::InlineObject5;
use WWW::OpenAPIClient::Object::InlineResponseDefault;
use WWW::OpenAPIClient::Object::List;
use WWW::OpenAPIClient::Object::MapTest;
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Model200Response;
use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NullableClass;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
use WWW::OpenAPIClient::Object::OuterEnumInteger;
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
use WWW::OpenAPIClient::Object::Pet;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::SpecialModelName;
use WWW::OpenAPIClient::Object::Tag;
use WWW::OpenAPIClient::Object::TypeHolderDefault;
use WWW::OpenAPIClient::Object::TypeHolderExample;
use WWW::OpenAPIClient::Object::User;
use WWW::OpenAPIClient::Object::XmlItem;

````

Expand All @@ -292,15 +288,21 @@ use strict;
use warnings;
# load the API package
use WWW::OpenAPIClient::AnotherFakeApi;
use WWW::OpenAPIClient::DefaultApi;
use WWW::OpenAPIClient::FakeApi;
use WWW::OpenAPIClient::FakeClassnameTags123Api;
use WWW::OpenAPIClient::PetApi;
use WWW::OpenAPIClient::StoreApi;
use WWW::OpenAPIClient::UserApi;
# load the models
use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType;
use WWW::OpenAPIClient::Object::AdditionalPropertiesArray;
use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean;
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger;
use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber;
use WWW::OpenAPIClient::Object::AdditionalPropertiesObject;
use WWW::OpenAPIClient::Object::AdditionalPropertiesString;
use WWW::OpenAPIClient::Object::Animal;
use WWW::OpenAPIClient::Object::ApiResponse;
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
Expand All @@ -317,36 +319,26 @@ use WWW::OpenAPIClient::Object::EnumClass;
use WWW::OpenAPIClient::Object::EnumTest;
use WWW::OpenAPIClient::Object::File;
use WWW::OpenAPIClient::Object::FileSchemaTestClass;
use WWW::OpenAPIClient::Object::Foo;
use WWW::OpenAPIClient::Object::FormatTest;
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
use WWW::OpenAPIClient::Object::HealthCheckResult;
use WWW::OpenAPIClient::Object::InlineObject;
use WWW::OpenAPIClient::Object::InlineObject1;
use WWW::OpenAPIClient::Object::InlineObject2;
use WWW::OpenAPIClient::Object::InlineObject3;
use WWW::OpenAPIClient::Object::InlineObject4;
use WWW::OpenAPIClient::Object::InlineObject5;
use WWW::OpenAPIClient::Object::InlineResponseDefault;
use WWW::OpenAPIClient::Object::List;
use WWW::OpenAPIClient::Object::MapTest;
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Model200Response;
use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NullableClass;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
use WWW::OpenAPIClient::Object::OuterEnumInteger;
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
use WWW::OpenAPIClient::Object::Pet;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::SpecialModelName;
use WWW::OpenAPIClient::Object::Tag;
use WWW::OpenAPIClient::Object::TypeHolderDefault;
use WWW::OpenAPIClient::Object::TypeHolderExample;
use WWW::OpenAPIClient::Object::User;
use WWW::OpenAPIClient::Object::XmlItem;
# for displaying the API response data
use Data::Dumper;
Expand All @@ -355,10 +347,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 ($@) {
Expand All @@ -374,8 +366,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
*FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
Expand Down Expand Up @@ -413,7 +404,14 @@ Class | Method | HTTP request | Description


# DOCUMENTATION FOR MODELS
- [WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
- [WWW::OpenAPIClient::Object::Animal](docs/Animal.md)
- [WWW::OpenAPIClient::Object::ApiResponse](docs/ApiResponse.md)
- [WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
Expand All @@ -430,36 +428,26 @@ Class | Method | HTTP request | Description
- [WWW::OpenAPIClient::Object::EnumTest](docs/EnumTest.md)
- [WWW::OpenAPIClient::Object::File](docs/File.md)
- [WWW::OpenAPIClient::Object::FileSchemaTestClass](docs/FileSchemaTestClass.md)
- [WWW::OpenAPIClient::Object::Foo](docs/Foo.md)
- [WWW::OpenAPIClient::Object::FormatTest](docs/FormatTest.md)
- [WWW::OpenAPIClient::Object::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [WWW::OpenAPIClient::Object::HealthCheckResult](docs/HealthCheckResult.md)
- [WWW::OpenAPIClient::Object::InlineObject](docs/InlineObject.md)
- [WWW::OpenAPIClient::Object::InlineObject1](docs/InlineObject1.md)
- [WWW::OpenAPIClient::Object::InlineObject2](docs/InlineObject2.md)
- [WWW::OpenAPIClient::Object::InlineObject3](docs/InlineObject3.md)
- [WWW::OpenAPIClient::Object::InlineObject4](docs/InlineObject4.md)
- [WWW::OpenAPIClient::Object::InlineObject5](docs/InlineObject5.md)
- [WWW::OpenAPIClient::Object::InlineResponseDefault](docs/InlineResponseDefault.md)
- [WWW::OpenAPIClient::Object::List](docs/List.md)
- [WWW::OpenAPIClient::Object::MapTest](docs/MapTest.md)
- [WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [WWW::OpenAPIClient::Object::Model200Response](docs/Model200Response.md)
- [WWW::OpenAPIClient::Object::ModelReturn](docs/ModelReturn.md)
- [WWW::OpenAPIClient::Object::Name](docs/Name.md)
- [WWW::OpenAPIClient::Object::NullableClass](docs/NullableClass.md)
- [WWW::OpenAPIClient::Object::NumberOnly](docs/NumberOnly.md)
- [WWW::OpenAPIClient::Object::Order](docs/Order.md)
- [WWW::OpenAPIClient::Object::OuterComposite](docs/OuterComposite.md)
- [WWW::OpenAPIClient::Object::OuterEnum](docs/OuterEnum.md)
- [WWW::OpenAPIClient::Object::OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
- [WWW::OpenAPIClient::Object::OuterEnumInteger](docs/OuterEnumInteger.md)
- [WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
- [WWW::OpenAPIClient::Object::Pet](docs/Pet.md)
- [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [WWW::OpenAPIClient::Object::SpecialModelName](docs/SpecialModelName.md)
- [WWW::OpenAPIClient::Object::Tag](docs/Tag.md)
- [WWW::OpenAPIClient::Object::TypeHolderDefault](docs/TypeHolderDefault.md)
- [WWW::OpenAPIClient::Object::TypeHolderExample](docs/TypeHolderExample.md)
- [WWW::OpenAPIClient::Object::User](docs/User.md)
- [WWW::OpenAPIClient::Object::XmlItem](docs/XmlItem.md)


# DOCUMENTATION FOR AUTHORIZATION
Expand All @@ -476,10 +464,6 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key_query
- **Location**: URL query string

## bearer_test

- **Type**: HTTP basic authentication

## http_basic_test

- **Type**: HTTP basic authentication
Expand Down
13 changes: 11 additions & 2 deletions samples/client/petstore/perl/docs/AdditionalPropertiesClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_property** | **HASH[string,string]** | | [optional]
**map_of_map_property** | **HASH[string,HASH[string,string]]** | | [optional]
**map_string** | **HASH[string,string]** | | [optional]
**map_number** | **HASH[string,double]** | | [optional]
**map_integer** | **HASH[string,int]** | | [optional]
**map_boolean** | **HASH[string,boolean]** | | [optional]
**map_array_integer** | **HASH[string,ARRAY[int]]** | | [optional]
**map_array_anytype** | **HASH[string,ARRAY[object]]** | | [optional]
**map_map_string** | **HASH[string,HASH[string,string]]** | | [optional]
**map_map_anytype** | **HASH[string,HASH[string,object]]** | | [optional]
**anytype_1** | [**object**](.md) | | [optional]
**anytype_2** | [**object**](.md) | | [optional]
**anytype_3** | [**object**](.md) | | [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)

Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/perl/docs/AnotherfakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 ($@) {
Expand All @@ -41,7 +41,7 @@ if ($@) {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |

### Return type

Expand Down
3 changes: 0 additions & 3 deletions samples/client/petstore/perl/docs/EnumTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ Name | Type | Description | Notes
**enum_integer** | **int** | | [optional]
**enum_number** | **double** | | [optional]
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**outer_enum_integer** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
**outer_enum_default_value** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
**outer_enum_integer_default_value** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [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)

Expand Down
Loading

0 comments on commit c6c477f

Please sign in to comment.