Skip to content

Commit

Permalink
Make sure Perl client samples are up-to-date (OpenAPITools#3207)
Browse files Browse the repository at this point in the history
* Make sure Perl samples are up-to-date

* update perl samples
  • Loading branch information
wing328 authored Jun 25, 2019
1 parent 3ee76a0 commit 74c569e
Show file tree
Hide file tree
Showing 42 changed files with 1,063 additions and 383 deletions.
1 change: 1 addition & 0 deletions bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ declare -a scripts=(
"./bin/go-gin-petstore-server.sh"
"./bin/groovy-petstore.sh"
"./bin/apex-petstore.sh"
"./bin/perl-petstore-all.sh"
#"./bin/elm-petstore-all.sh"
"./bin/meta-codegen.sh"
# OTHERS
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/perl/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0-SNAPSHOT
4.0.3-SNAPSHOT
9 changes: 9 additions & 0 deletions samples/client/petstore/perl/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://docs.travis-ci.com/user/languages/perl/
#

language: perl

perl:
- "5.28"

sudo: false
88 changes: 39 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,53 +232,52 @@ 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;
use WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayTest;
use WWW::OpenAPIClient::Object::Capitalization;
use WWW::OpenAPIClient::Object::Cat;
use WWW::OpenAPIClient::Object::CatAllOf;
use WWW::OpenAPIClient::Object::Category;
use WWW::OpenAPIClient::Object::ClassModel;
use WWW::OpenAPIClient::Object::Client;
use WWW::OpenAPIClient::Object::Dog;
use WWW::OpenAPIClient::Object::DogAllOf;
use WWW::OpenAPIClient::Object::EnumArrays;
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,61 +290,59 @@ 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;
use WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayTest;
use WWW::OpenAPIClient::Object::Capitalization;
use WWW::OpenAPIClient::Object::Cat;
use WWW::OpenAPIClient::Object::CatAllOf;
use WWW::OpenAPIClient::Object::Category;
use WWW::OpenAPIClient::Object::ClassModel;
use WWW::OpenAPIClient::Object::Client;
use WWW::OpenAPIClient::Object::Dog;
use WWW::OpenAPIClient::Object::DogAllOf;
use WWW::OpenAPIClient::Object::EnumArrays;
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 +351,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 +370,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,53 +408,52 @@ 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)
- [WWW::OpenAPIClient::Object::ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [WWW::OpenAPIClient::Object::ArrayTest](docs/ArrayTest.md)
- [WWW::OpenAPIClient::Object::Capitalization](docs/Capitalization.md)
- [WWW::OpenAPIClient::Object::Cat](docs/Cat.md)
- [WWW::OpenAPIClient::Object::CatAllOf](docs/CatAllOf.md)
- [WWW::OpenAPIClient::Object::Category](docs/Category.md)
- [WWW::OpenAPIClient::Object::ClassModel](docs/ClassModel.md)
- [WWW::OpenAPIClient::Object::Client](docs/Client.md)
- [WWW::OpenAPIClient::Object::Dog](docs/Dog.md)
- [WWW::OpenAPIClient::Object::DogAllOf](docs/DogAllOf.md)
- [WWW::OpenAPIClient::Object::EnumArrays](docs/EnumArrays.md)
- [WWW::OpenAPIClient::Object::EnumClass](docs/EnumClass.md)
- [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 +470,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
60 changes: 60 additions & 0 deletions samples/client/petstore/perl/docs/AnotherFakeApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# WWW::OpenAPIClient::AnotherFakeApi

## Load the API package
```perl
use WWW::OpenAPIClient::Object::AnotherFakeApi;
```

All URIs are relative to *http://petstore.swagger.io:80/v2*

Method | HTTP request | Description
------------- | ------------- | -------------
[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags


# **call_123_test_special_tags**
> Client call_123_test_special_tags(body => $body)
To test special tags

To test special tags and operation ID starting with number

### Example
```perl
use Data::Dumper;
use WWW::OpenAPIClient::AnotherFakeApi;
my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new(
);

my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model

eval {
my $result = $api_instance->call_123_test_special_tags(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AnotherFakeApi->call_123_test_special_tags: $@\n";
}
```

### Parameters

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

### Return type

[**Client**](Client.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)

15 changes: 15 additions & 0 deletions samples/client/petstore/perl/docs/CatAllOf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# WWW::OpenAPIClient::Object::CatAllOf

## Load the model package
```perl
use WWW::OpenAPIClient::Object::CatAllOf;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **boolean** | | [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)


15 changes: 15 additions & 0 deletions samples/client/petstore/perl/docs/DogAllOf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# WWW::OpenAPIClient::Object::DogAllOf

## Load the model package
```perl
use WWW::OpenAPIClient::Object::DogAllOf;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **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)


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 74c569e

Please sign in to comment.