From 0e2eed68925b0a39e7023da44f91cda13d31cdc2 Mon Sep 17 00:00:00 2001 From: Min Kim <291271447@qq.com> Date: Fri, 21 Jun 2019 18:32:12 +0800 Subject: [PATCH] Perl: Basic bearer auth support (#3192) * bearer token support * [generator] running scripts --- .../main/resources/perl/ApiClient.mustache | 8 ++ .../src/main/resources/perl/api_doc.mustache | 9 +- samples/client/petstore/perl/README.md | 82 +++++++----- .../perl/docs/AdditionalPropertiesClass.md | 13 +- .../petstore/perl/docs/AnotherfakeApi.md | 8 +- samples/client/petstore/perl/docs/EnumTest.md | 3 + samples/client/petstore/perl/docs/FakeApi.md | 83 ++++++------ .../perl/docs/FakeClassnameTags123Api.md | 8 +- .../client/petstore/perl/docs/FormatTest.md | 2 + samples/client/petstore/perl/docs/PetApi.md | 16 +-- samples/client/petstore/perl/docs/StoreApi.md | 10 +- samples/client/petstore/perl/docs/UserApi.md | 40 +++--- .../lib/WWW/OpenAPIClient/AnotherFakeApi.pm | 16 +-- .../perl/lib/WWW/OpenAPIClient/ApiClient.pm | 8 +- .../perl/lib/WWW/OpenAPIClient/ApiFactory.pm | 2 +- .../lib/WWW/OpenAPIClient/Configuration.pm | 2 +- .../perl/lib/WWW/OpenAPIClient/DefaultApi.pm | 2 +- .../perl/lib/WWW/OpenAPIClient/FakeApi.pm | 122 ++++++++---------- .../OpenAPIClient/FakeClassnameTags123Api.pm | 16 +-- .../Object/AdditionalPropertiesAnyType.pm | 15 +-- .../Object/AdditionalPropertiesArray.pm | 15 +-- .../Object/AdditionalPropertiesBoolean.pm | 15 +-- .../Object/AdditionalPropertiesClass.pm | 101 ++------------- .../Object/AdditionalPropertiesInteger.pm | 15 +-- .../Object/AdditionalPropertiesNumber.pm | 15 +-- .../Object/AdditionalPropertiesObject.pm | 15 +-- .../Object/AdditionalPropertiesString.pm | 15 +-- .../lib/WWW/OpenAPIClient/Object/Animal.pm | 4 +- .../WWW/OpenAPIClient/Object/ApiResponse.pm | 4 +- .../Object/ArrayOfArrayOfNumberOnly.pm | 4 +- .../OpenAPIClient/Object/ArrayOfNumberOnly.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/ArrayTest.pm | 4 +- .../OpenAPIClient/Object/Capitalization.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Cat.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/Category.pm | 4 +- .../WWW/OpenAPIClient/Object/ClassModel.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/Client.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Dog.pm | 4 +- .../WWW/OpenAPIClient/Object/EnumArrays.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/EnumClass.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/EnumTest.pm | 38 +++++- .../perl/lib/WWW/OpenAPIClient/Object/File.pm | 4 +- .../Object/FileSchemaTestClass.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Foo.pm | 4 +- .../WWW/OpenAPIClient/Object/FormatTest.pm | 26 +++- .../OpenAPIClient/Object/HasOnlyReadOnly.pm | 4 +- .../OpenAPIClient/Object/HealthCheckResult.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject1.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject2.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject3.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject4.pm | 4 +- .../WWW/OpenAPIClient/Object/InlineObject5.pm | 4 +- .../Object/InlineResponseDefault.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/List.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/MapTest.pm | 4 +- ...dPropertiesAndAdditionalPropertiesClass.pm | 4 +- .../OpenAPIClient/Object/Model200Response.pm | 4 +- .../WWW/OpenAPIClient/Object/ModelReturn.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Name.pm | 4 +- .../WWW/OpenAPIClient/Object/NullableClass.pm | 4 +- .../WWW/OpenAPIClient/Object/NumberOnly.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/Order.pm | 4 +- .../OpenAPIClient/Object/OuterComposite.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/OuterEnum.pm | 4 +- .../Object/OuterEnumDefaultValue.pm | 4 +- .../OpenAPIClient/Object/OuterEnumInteger.pm | 4 +- .../Object/OuterEnumIntegerDefaultValue.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Pet.pm | 4 +- .../WWW/OpenAPIClient/Object/ReadOnlyFirst.pm | 4 +- .../OpenAPIClient/Object/SpecialModelName.pm | 4 +- .../perl/lib/WWW/OpenAPIClient/Object/Tag.pm | 4 +- .../OpenAPIClient/Object/TypeHolderDefault.pm | 15 +-- .../OpenAPIClient/Object/TypeHolderExample.pm | 15 +-- .../perl/lib/WWW/OpenAPIClient/Object/User.pm | 4 +- .../lib/WWW/OpenAPIClient/Object/XmlItem.pm | 15 +-- .../perl/lib/WWW/OpenAPIClient/PetApi.pm | 30 ++--- .../perl/lib/WWW/OpenAPIClient/Role.pm | 2 +- .../lib/WWW/OpenAPIClient/Role/AutoDoc.pm | 2 +- .../perl/lib/WWW/OpenAPIClient/StoreApi.pm | 18 +-- .../perl/lib/WWW/OpenAPIClient/UserApi.pm | 66 +++++----- 81 files changed, 489 insertions(+), 570 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache b/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache index a65c20dac53..8175c47d623 100644 --- a/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/perl/ApiClient.mustache @@ -340,9 +340,17 @@ sub update_params_for_auth { {{/isKeyInQuery}} {{/isApiKey}} {{#isBasic}} + {{^isBasicBearer}} if ($self->{config}{username} || $self->{config}{password}) { $header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password}); } + {{/isBasicBearer}} + {{#isBasicBearer}} + // this endpoint requires Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authentication (access token) + if ($self->{config}{access_token}) { + $headers['Authorization'] = 'Bearer ' . $self->{config}{access_token}; + } + {{/isBasicBearer}} {{/isBasic}} {{#isOAuth}} if ($self->{config}{access_token}) { diff --git a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache index 99d5ad5198c..bcbc7b41345 100644 --- a/modules/openapi-generator/src/main/resources/perl/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/perl/api_doc.mustache @@ -29,8 +29,15 @@ use {{moduleName}}::{{classname}}; my $api_instance = {{moduleName}}::{{classname}}->new( {{#hasAuthMethods}}{{#authMethods}}{{#isBasic}} # Configure HTTP basic authorization: {{{name}}} + {{^isBasicBearer}} username => 'YOUR_USERNAME', - password => 'YOUR_PASSWORD',{{/isBasic}}{{#isApiKey}} + password => 'YOUR_PASSWORD', + {{/isBasicBearer}} + {{#isBasicBearer}} + # Configure bearer access token for authorization: {{{name}}} + access_token => 'YOUR_BEARER_TOKEN', + {{/isBasicBearer}} + {{/isBasic}}{{#isApiKey}} # Configure API key authorization: {{{name}}} api_key => {'{{{keyParamName}}}' => 'YOUR_API_KEY'}, # uncomment below to setup prefix (e.g. Bearer) for API key, if needed diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index 292678b2f38..ceba27d0b85 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -222,6 +222,7 @@ 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; @@ -232,14 +233,7 @@ 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; @@ -256,26 +250,36 @@ 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; ```` @@ -288,6 +292,7 @@ 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; @@ -295,14 +300,7 @@ 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; @@ -319,26 +317,36 @@ 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; @@ -347,10 +355,10 @@ use WWW::OpenAPIClient::; my $api_instance = WWW::OpenAPIClient::->new( ); -my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->call_123_test_special_tags(body => $body); + my $result = $api_instance->call_123_test_special_tags(client => $client); print Dumper($result); }; if ($@) { @@ -366,7 +374,8 @@ 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 -*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem +*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* | [**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 | @@ -404,14 +413,7 @@ 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) @@ -428,26 +430,36 @@ 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 @@ -464,6 +476,10 @@ 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 diff --git a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md index 47f95da8f0c..ce21d69c235 100644 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/perl/docs/AdditionalPropertiesClass.md @@ -8,17 +8,8 @@ use WWW::OpenAPIClient::Object::AdditionalPropertiesClass; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**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] +**map_property** | **HASH[string,string]** | | [optional] +**map_of_map_property** | **HASH[string,HASH[string,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) diff --git a/samples/client/petstore/perl/docs/AnotherfakeApi.md b/samples/client/petstore/perl/docs/AnotherfakeApi.md index 87c9e4015b7..a0b0fd6f8ea 100644 --- a/samples/client/petstore/perl/docs/AnotherfakeApi.md +++ b/samples/client/petstore/perl/docs/AnotherfakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call_123_test_special_tags** -> Client call_123_test_special_tags(body => $body) +> Client call_123_test_special_tags(client => $client) To test special tags @@ -26,10 +26,10 @@ use WWW::OpenAPIClient::AnotherFakeApi; my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->call_123_test_special_tags(body => $body); + my $result = $api_instance->call_123_test_special_tags(client => $client); print Dumper($result); }; if ($@) { @@ -41,7 +41,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type diff --git a/samples/client/petstore/perl/docs/EnumTest.md b/samples/client/petstore/perl/docs/EnumTest.md index aa889b2be86..60ed7418d2a 100644 --- a/samples/client/petstore/perl/docs/EnumTest.md +++ b/samples/client/petstore/perl/docs/EnumTest.md @@ -13,6 +13,9 @@ 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) diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 947df811624..e4c380346f5 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem +[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint [**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean | [**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite | [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | @@ -24,12 +24,10 @@ Method | HTTP request | Description [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data -# **create_xml_item** -> create_xml_item(xml_item => $xml_item) +# **fake_health_get** +> HealthCheckResult fake_health_get() -creates an XmlItem - -this route creates an XmlItem +Health check endpoint ### Example ```perl @@ -38,25 +36,22 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $xml_item = WWW::OpenAPIClient::Object::XmlItem->new(); # XmlItem | XmlItem Body eval { - $api_instance->create_xml_item(xml_item => $xml_item); + my $result = $api_instance->fake_health_get(); + print Dumper($result); }; if ($@) { - warn "Exception when calling FakeApi->create_xml_item: $@\n"; + warn "Exception when calling FakeApi->fake_health_get: $@\n"; } ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body | +This endpoint does not need any parameter. ### Return type -void (empty response body) +[**HealthCheckResult**](HealthCheckResult.md) ### Authorization @@ -64,8 +59,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - - **Accept**: Not defined + - **Content-Type**: Not defined + - **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) @@ -110,13 +105,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[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(body => $body) +> OuterComposite fake_outer_composite_serialize(outer_composite => $outer_composite) @@ -129,10 +124,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body +my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body eval { - my $result = $api_instance->fake_outer_composite_serialize(body => $body); + my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite); print Dumper($result); }; if ($@) { @@ -144,7 +139,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -156,7 +151,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[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) @@ -202,7 +197,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[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) @@ -248,13 +243,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: */* [[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(body => $body) +> test_body_with_file_schema(file_schema_test_class => $file_schema_test_class) @@ -267,10 +262,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass | +my $file_schema_test_class = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass | eval { - $api_instance->test_body_with_file_schema(body => $body); + $api_instance->test_body_with_file_schema(file_schema_test_class => $file_schema_test_class); }; if ($@) { warn "Exception when calling FakeApi->test_body_with_file_schema: $@\n"; @@ -281,7 +276,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -299,7 +294,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, body => $body) +> test_body_with_query_params(query => $query, user => $user) @@ -311,10 +306,10 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); my $query = "query_example"; # string | -my $body = WWW::OpenAPIClient::Object::User->new(); # User | +my $user = WWW::OpenAPIClient::Object::User->new(); # User | eval { - $api_instance->test_body_with_query_params(query => $query, body => $body); + $api_instance->test_body_with_query_params(query => $query, user => $user); }; if ($@) { warn "Exception when calling FakeApi->test_body_with_query_params: $@\n"; @@ -326,7 +321,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **query** | **string**| | - **body** | [**User**](User.md)| | + **user** | [**User**](User.md)| | ### Return type @@ -344,7 +339,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(body => $body) +> Client test_client_model(client => $client) To test \"client\" model @@ -357,10 +352,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->test_client_model(body => $body); + my $result = $api_instance->test_client_model(client => $client); print Dumper($result); }; if ($@) { @@ -372,7 +367,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type @@ -405,6 +400,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new( # Configure HTTP basic authorization: http_basic_test username => 'YOUR_USERNAME', password => 'YOUR_PASSWORD', + ); my $number = 3.4; # double | None @@ -535,6 +531,11 @@ Fake endpoint to test group parameters (optional) use Data::Dumper; use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( + + # Configure HTTP basic authorization: bearer_test + # Configure bearer access token for authorization: bearer_test + access_token => 'YOUR_BEARER_TOKEN', + ); my $required_string_group = 56; # int | Required String in group parameters @@ -569,7 +570,7 @@ void (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -579,7 +580,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(param => $param) +> test_inline_additional_properties(request_body => $request_body) test inline additionalProperties @@ -590,10 +591,10 @@ use WWW::OpenAPIClient::FakeApi; my $api_instance = WWW::OpenAPIClient::FakeApi->new( ); -my $param = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body +my $request_body = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body eval { - $api_instance->test_inline_additional_properties(param => $param); + $api_instance->test_inline_additional_properties(request_body => $request_body); }; if ($@) { warn "Exception when calling FakeApi->test_inline_additional_properties: $@\n"; @@ -604,7 +605,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **param** | [**HASH[string,string]**](string.md)| request body | + **request_body** | [**HASH[string,string]**](string.md)| request body | ### Return type diff --git a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md index 70e303f7bf0..67c2122cb6f 100644 --- a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **test_classname** -> Client test_classname(body => $body) +> Client test_classname(client => $client) 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 $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model +my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model eval { - my $result = $api_instance->test_classname(body => $body); + my $result = $api_instance->test_classname(client => $client); print Dumper($result); }; if ($@) { @@ -46,7 +46,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md)| client model | ### Return type diff --git a/samples/client/petstore/perl/docs/FormatTest.md b/samples/client/petstore/perl/docs/FormatTest.md index 3a1bf2c21f3..7cfabebb281 100644 --- a/samples/client/petstore/perl/docs/FormatTest.md +++ b/samples/client/petstore/perl/docs/FormatTest.md @@ -21,6 +21,8 @@ Name | Type | Description | Notes **date_time** | **DateTime** | | [optional] **uuid** | **string** | | [optional] **password** | **string** | | +**pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**pattern_with_digits_and_delimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [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) diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 899e2f63e07..5218d9282f1 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -21,7 +21,7 @@ Method | HTTP request | Description # **add_pet** -> add_pet(body => $body) +> add_pet(pet => $pet) Add a new pet to the store @@ -35,10 +35,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( access_token => 'YOUR_ACCESS_TOKEN', ); -my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store +my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { - $api_instance->add_pet(body => $body); + $api_instance->add_pet(pet => $pet); }; if ($@) { warn "Exception when calling PetApi->add_pet: $@\n"; @@ -49,7 +49,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**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(body => $body) +> update_pet(pet => $pet) Update an existing pet @@ -278,10 +278,10 @@ my $api_instance = WWW::OpenAPIClient::PetApi->new( access_token => 'YOUR_ACCESS_TOKEN', ); -my $body = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store +my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store eval { - $api_instance->update_pet(body => $body); + $api_instance->update_pet(pet => $pet); }; if ($@) { warn "Exception when calling PetApi->update_pet: $@\n"; @@ -292,7 +292,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index fe591e701a8..e467823c53a 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -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(body => $body) +> Order place_order(order => $order) Place an order for a pet @@ -165,10 +165,10 @@ use WWW::OpenAPIClient::StoreApi; my $api_instance = WWW::OpenAPIClient::StoreApi->new( ); -my $body = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet +my $order = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet eval { - my $result = $api_instance->place_order(body => $body); + my $result = $api_instance->place_order(order => $order); print Dumper($result); }; if ($@) { @@ -180,7 +180,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | + **order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -192,7 +192,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/xml, 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) diff --git a/samples/client/petstore/perl/docs/UserApi.md b/samples/client/petstore/perl/docs/UserApi.md index caa7684785b..ebe449515cb 100644 --- a/samples/client/petstore/perl/docs/UserApi.md +++ b/samples/client/petstore/perl/docs/UserApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **create_user** -> create_user(body => $body) +> create_user(user => $user) Create user @@ -33,10 +33,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $body = WWW::OpenAPIClient::Object::User->new(); # User | Created user object +my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object eval { - $api_instance->create_user(body => $body); + $api_instance->create_user(user => $user); }; if ($@) { warn "Exception when calling UserApi->create_user: $@\n"; @@ -47,7 +47,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | + **user** | [**User**](User.md)| Created user object | ### Return type @@ -59,13 +59,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[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(body => $body) +> create_users_with_array_input(user => $user) Creates list of users with given input array @@ -76,10 +76,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object +my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object eval { - $api_instance->create_users_with_array_input(body => $body); + $api_instance->create_users_with_array_input(user => $user); }; if ($@) { warn "Exception when calling UserApi->create_users_with_array_input: $@\n"; @@ -90,7 +90,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ARRAY[User]**](ARRAY.md)| List of user object | + **user** | [**ARRAY[User]**](ARRAY.md)| List of user object | ### Return type @@ -102,13 +102,13 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[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(body => $body) +> create_users_with_list_input(user => $user) Creates list of users with given input array @@ -119,10 +119,10 @@ use WWW::OpenAPIClient::UserApi; my $api_instance = WWW::OpenAPIClient::UserApi->new( ); -my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object +my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object eval { - $api_instance->create_users_with_list_input(body => $body); + $api_instance->create_users_with_list_input(user => $user); }; if ($@) { warn "Exception when calling UserApi->create_users_with_list_input: $@\n"; @@ -133,7 +133,7 @@ if ($@) { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**ARRAY[User]**](ARRAY.md)| List of user object | + **user** | [**ARRAY[User]**](ARRAY.md)| List of user object | ### Return type @@ -145,7 +145,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[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) @@ -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, body => $body) +> update_user(username => $username, user => $user) 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 $body = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object +my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object eval { - $api_instance->update_user(username => $username, body => $body); + $api_instance->update_user(username => $username, user => $user); }; 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 | - **body** | [**User**](User.md)| Updated user object | + **user** | [**User**](User.md)| Updated user object | ### Return type @@ -366,7 +366,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: Not defined [[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) diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm index ed6f6470c59..cd1df44004d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # To test special tags # -# @param Client $body client model (required) +# @param Client $client client model (required) { my $params = { - 'body' => { + 'client' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling call_123_test_special_tags"); + # verify the required parameter 'client' is set + unless (exists $args{'client'}) { + croak("Missing the required parameter 'client' 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{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'client'}) { + $_body_data = $args{'client'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm index 1220484ae4a..e7fc63fd102 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -348,6 +348,12 @@ sub update_params_for_auth { $query_params->{'api_key_query'} = $api_key; } } + elsif ($auth eq 'bearer_test') { + // this endpoint requires Bearer (JWT) authentication (access token) + if ($self->{config}{access_token}) { + $headers['Authorization'] = 'Bearer ' . $self->{config}{access_token}; + } + } 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}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm index 2d3ed6587b7..8a9952a6766 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm index 207807f7983..9bf21bd97ef 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm index abece6801b8..9ff4e14475d 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/DefaultApi.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index 1c727f64c76..29dcd10fe83 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -49,64 +49,52 @@ sub new { # -# create_xml_item +# fake_health_get # -# creates an XmlItem +# Health check endpoint # -# @param XmlItem $xml_item XmlItem Body (required) { my $params = { - 'xml_item' => { - data_type => 'XmlItem', - description => 'XmlItem Body', - required => '1', - }, }; - __PACKAGE__->method_documentation->{ 'create_xml_item' } = { - summary => 'creates an XmlItem', + __PACKAGE__->method_documentation->{ 'fake_health_get' } = { + summary => 'Health check endpoint', params => $params, - returns => undef, + returns => 'HealthCheckResult', }; } -# @return void +# @return HealthCheckResult # -sub create_xml_item { +sub fake_health_get { my ($self, %args) = @_; - # verify the required parameter 'xml_item' is set - unless (exists $args{'xml_item'}) { - croak("Missing the required parameter 'xml_item' when calling create_xml_item"); - } - # parse inputs - my $_resource_path = '/fake/create_xml_item'; + my $_resource_path = '/fake/health'; - my $_method = 'POST'; + my $_method = 'GET'; my $query_params = {}; my $header_params = {}; my $form_params = {}; # 'Accept' and 'Content-Type' header - my $_header_accept = $self->{api_client}->select_header_accept(); + my $_header_accept = $self->{api_client}->select_header_accept('application/json'); if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16'); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); my $_body_data; - # body params - if ( exists $args{'xml_item'}) { - $_body_data = $args{'xml_item'}; - } - # authentication setting, if any my $auth_settings = [qw()]; # make the API Call - $self->{api_client}->call_api($_resource_path, $_method, + my $response = $self->{api_client}->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings); - return; + if (!$response) { + return; + } + my $_response_object = $self->{api_client}->deserialize('HealthCheckResult', $response); + return $_response_object; } # @@ -147,7 +135,7 @@ sub fake_outer_boolean_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params @@ -174,10 +162,10 @@ sub fake_outer_boolean_serialize { # # # -# @param OuterComposite $body Input composite as post body (optional) +# @param OuterComposite $outer_composite Input composite as post body (optional) { my $params = { - 'body' => { + 'outer_composite' => { data_type => 'OuterComposite', description => 'Input composite as post body', required => '0', @@ -207,12 +195,12 @@ sub fake_outer_composite_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'outer_composite'}) { + $_body_data = $args{'outer_composite'}; } # authentication setting, if any @@ -267,7 +255,7 @@ sub fake_outer_number_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params @@ -327,7 +315,7 @@ sub fake_outer_string_serialize { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params @@ -354,10 +342,10 @@ sub fake_outer_string_serialize { # # # -# @param FileSchemaTestClass $body (required) +# @param FileSchemaTestClass $file_schema_test_class (required) { my $params = { - 'body' => { + 'file_schema_test_class' => { data_type => 'FileSchemaTestClass', description => '', required => '1', @@ -374,9 +362,9 @@ sub fake_outer_string_serialize { sub test_body_with_file_schema { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling test_body_with_file_schema"); + # 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"); } # parse inputs @@ -396,8 +384,8 @@ sub test_body_with_file_schema { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'file_schema_test_class'}) { + $_body_data = $args{'file_schema_test_class'}; } # authentication setting, if any @@ -416,7 +404,7 @@ sub test_body_with_file_schema { # # # @param string $query (required) -# @param User $body (required) +# @param User $user (required) { my $params = { 'query' => { @@ -424,7 +412,7 @@ sub test_body_with_file_schema { description => '', required => '1', }, - 'body' => { + 'user' => { data_type => 'User', description => '', required => '1', @@ -446,9 +434,9 @@ sub test_body_with_query_params { croak("Missing the required parameter 'query' 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"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling test_body_with_query_params"); } # parse inputs @@ -473,8 +461,8 @@ sub test_body_with_query_params { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any @@ -492,10 +480,10 @@ sub test_body_with_query_params { # # To test \"client\" model # -# @param Client $body client model (required) +# @param Client $client client model (required) { my $params = { - 'body' => { + 'client' => { data_type => 'Client', description => 'client model', required => '1', @@ -512,9 +500,9 @@ sub test_body_with_query_params { sub test_client_model { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling test_client_model"); + # verify the required parameter 'client' is set + unless (exists $args{'client'}) { + croak("Missing the required parameter 'client' when calling test_client_model"); } # parse inputs @@ -534,8 +522,8 @@ sub test_client_model { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'client'}) { + $_body_data = $args{'client'}; } # authentication setting, if any @@ -1022,7 +1010,7 @@ sub test_group_parameters { my $_body_data; # authentication setting, if any - my $auth_settings = [qw()]; + my $auth_settings = [qw(bearer_test )]; # make the API Call $self->{api_client}->call_api($_resource_path, $_method, @@ -1036,10 +1024,10 @@ sub test_group_parameters { # # test inline additionalProperties # -# @param HASH[string,string] $param request body (required) +# @param HASH[string,string] $request_body request body (required) { my $params = { - 'param' => { + 'request_body' => { data_type => 'HASH[string,string]', description => 'request body', required => '1', @@ -1056,9 +1044,9 @@ sub test_group_parameters { sub test_inline_additional_properties { my ($self, %args) = @_; - # verify the required parameter 'param' is set - unless (exists $args{'param'}) { - croak("Missing the required parameter 'param' when calling test_inline_additional_properties"); + # 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"); } # parse inputs @@ -1078,8 +1066,8 @@ sub test_inline_additional_properties { my $_body_data; # body params - if ( exists $args{'param'}) { - $_body_data = $args{'param'}; + if ( exists $args{'request_body'}) { + $_body_data = $args{'request_body'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm index c55bface164..c521d2c5758 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # To test class name in snake case # -# @param Client $body client model (required) +# @param Client $client client model (required) { my $params = { - 'body' => { + 'client' => { data_type => 'Client', description => 'client model', required => '1', @@ -73,9 +73,9 @@ sub new { sub test_classname { my ($self, %args) = @_; - # verify the required parameter 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling test_classname"); + # verify the required parameter 'client' is set + unless (exists $args{'client'}) { + croak("Missing the required parameter 'client' when calling test_classname"); } # parse inputs @@ -95,8 +95,8 @@ sub test_classname { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'client'}) { + $_body_data = $args{'client'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm index 5b5e6777edb..8e30b03ea8f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm index ee56b7242d8..efc94b94778 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm index 0f80ce04ee2..b7268ad68a6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm index cf35cb03ba4..3bbbceeb84b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -161,79 +161,16 @@ __PACKAGE__->class_documentation({description => '', } ); __PACKAGE__->method_documentation({ - 'map_string' => { + 'map_property' => { datatype => 'HASH[string,string]', - base_name => 'map_string', + base_name => 'map_property', description => '', format => '', read_only => '', }, - 'map_number' => { - datatype => 'HASH[string,double]', - base_name => 'map_number', - description => '', - format => '', - read_only => '', - }, - 'map_integer' => { - datatype => 'HASH[string,int]', - base_name => 'map_integer', - description => '', - format => '', - read_only => '', - }, - 'map_boolean' => { - datatype => 'HASH[string,boolean]', - base_name => 'map_boolean', - description => '', - format => '', - read_only => '', - }, - 'map_array_integer' => { - datatype => 'HASH[string,ARRAY[int]]', - base_name => 'map_array_integer', - description => '', - format => '', - read_only => '', - }, - 'map_array_anytype' => { - datatype => 'HASH[string,ARRAY[object]]', - base_name => 'map_array_anytype', - description => '', - format => '', - read_only => '', - }, - 'map_map_string' => { + 'map_of_map_property' => { datatype => 'HASH[string,HASH[string,string]]', - base_name => 'map_map_string', - description => '', - format => '', - read_only => '', - }, - 'map_map_anytype' => { - datatype => 'HASH[string,HASH[string,object]]', - base_name => 'map_map_anytype', - description => '', - format => '', - read_only => '', - }, - 'anytype_1' => { - datatype => 'object', - base_name => 'anytype_1', - description => '', - format => '', - read_only => '', - }, - 'anytype_2' => { - datatype => 'object', - base_name => 'anytype_2', - description => '', - format => '', - read_only => '', - }, - 'anytype_3' => { - datatype => 'object', - base_name => 'anytype_3', + base_name => 'map_of_map_property', description => '', format => '', read_only => '', @@ -241,31 +178,13 @@ __PACKAGE__->method_documentation({ }); __PACKAGE__->openapi_types( { - 'map_string' => 'HASH[string,string]', - 'map_number' => 'HASH[string,double]', - 'map_integer' => 'HASH[string,int]', - 'map_boolean' => 'HASH[string,boolean]', - 'map_array_integer' => 'HASH[string,ARRAY[int]]', - 'map_array_anytype' => 'HASH[string,ARRAY[object]]', - 'map_map_string' => 'HASH[string,HASH[string,string]]', - 'map_map_anytype' => 'HASH[string,HASH[string,object]]', - 'anytype_1' => 'object', - 'anytype_2' => 'object', - 'anytype_3' => 'object' + 'map_property' => 'HASH[string,string]', + 'map_of_map_property' => 'HASH[string,HASH[string,string]]' } ); __PACKAGE__->attribute_map( { - 'map_string' => 'map_string', - 'map_number' => 'map_number', - 'map_integer' => 'map_integer', - 'map_boolean' => 'map_boolean', - 'map_array_integer' => 'map_array_integer', - 'map_array_anytype' => 'map_array_anytype', - 'map_map_string' => 'map_map_string', - 'map_map_anytype' => 'map_map_anytype', - 'anytype_1' => 'anytype_1', - 'anytype_2' => 'anytype_2', - 'anytype_3' => 'anytype_3' + 'map_property' => 'map_property', + 'map_of_map_property' => 'map_of_map_property' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm index 6ac377a0757..da3887e899b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm index ee32e481ff5..b742632d41e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm index 9bcf3aeb154..bf10d33d38c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm index bb15356f698..594f8489c8e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm index d9bc7ed50de..15d93a05325 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm index 8a1cda357f0..673b1954e3b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm index 0c540b94a84..89f25673a03 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm index e4723275997..20d4ce4299f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm index cc342e699df..3ea06c42ee7 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm index 7f05a735204..59165095981 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm index 9eba77c90c7..66aaed54284 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm index e6eda282cf2..f83ccda5a96 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm index 124ecaaf8e8..6d4995336ce 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm index 9870f0b2a2a..f4989a15608 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm index 396bec58f58..e9a735f0e20 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm index 7abbe2666e9..edbfc4b5432 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm index 31b0ba2a22e..d6b23f1dbfd 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm index 79d5102de6a..a563f72d70e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -31,6 +31,9 @@ use Date::Parse; use DateTime; use WWW::OpenAPIClient::Object::OuterEnum; +use WWW::OpenAPIClient::Object::OuterEnumDefaultValue; +use WWW::OpenAPIClient::Object::OuterEnumInteger; +use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue; use base ("Class::Accessor", "Class::Data::Inheritable"); @@ -47,7 +50,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -197,6 +200,27 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, + 'outer_enum_integer' => { + datatype => 'OuterEnumInteger', + base_name => 'outerEnumInteger', + description => '', + format => '', + read_only => '', + }, + 'outer_enum_default_value' => { + datatype => 'OuterEnumDefaultValue', + base_name => 'outerEnumDefaultValue', + description => '', + format => '', + read_only => '', + }, + 'outer_enum_integer_default_value' => { + datatype => 'OuterEnumIntegerDefaultValue', + base_name => 'outerEnumIntegerDefaultValue', + description => '', + format => '', + read_only => '', + }, }); __PACKAGE__->openapi_types( { @@ -204,7 +228,10 @@ __PACKAGE__->openapi_types( { 'enum_string_required' => 'string', 'enum_integer' => 'int', 'enum_number' => 'double', - 'outer_enum' => 'OuterEnum' + 'outer_enum' => 'OuterEnum', + 'outer_enum_integer' => 'OuterEnumInteger', + 'outer_enum_default_value' => 'OuterEnumDefaultValue', + 'outer_enum_integer_default_value' => 'OuterEnumIntegerDefaultValue' } ); __PACKAGE__->attribute_map( { @@ -212,7 +239,10 @@ __PACKAGE__->attribute_map( { 'enum_string_required' => 'enum_string_required', 'enum_integer' => 'enum_integer', 'enum_number' => 'enum_number', - 'outer_enum' => 'outerEnum' + 'outer_enum' => 'outerEnum', + 'outer_enum_integer' => 'outerEnumInteger', + 'outer_enum_default_value' => 'outerEnumDefaultValue', + 'outer_enum_integer_default_value' => 'outerEnumIntegerDefaultValue' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm index 6c3690620da..44d4650e543 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/File.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm index 46643834502..e31bac19a61 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm index 8e76ee79d2c..378a588f945 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Foo.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm index 5622c742cba..b3c1defbd7e 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -252,6 +252,20 @@ __PACKAGE__->method_documentation({ format => '', read_only => '', }, + 'pattern_with_digits' => { + datatype => 'string', + base_name => 'pattern_with_digits', + description => 'A string that is a 10 digit number. Can have leading zeros.', + format => '', + read_only => '', + }, + 'pattern_with_digits_and_delimiter' => { + datatype => 'string', + base_name => 'pattern_with_digits_and_delimiter', + description => 'A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.', + format => '', + read_only => '', + }, }); __PACKAGE__->openapi_types( { @@ -267,7 +281,9 @@ __PACKAGE__->openapi_types( { 'date' => 'DateTime', 'date_time' => 'DateTime', 'uuid' => 'string', - 'password' => 'string' + 'password' => 'string', + 'pattern_with_digits' => 'string', + 'pattern_with_digits_and_delimiter' => 'string' } ); __PACKAGE__->attribute_map( { @@ -283,7 +299,9 @@ __PACKAGE__->attribute_map( { 'date' => 'date', 'date_time' => 'dateTime', 'uuid' => 'uuid', - 'password' => 'password' + 'password' => 'password', + 'pattern_with_digits' => 'pattern_with_digits', + 'pattern_with_digits_and_delimiter' => 'pattern_with_digits_and_delimiter' } ); __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm index 5a359791d26..cde0076373c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm index 31ee152b7b0..f8a88db2922 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm index 47e9d20f2ff..1b45e5c05c4 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm index 387af5b5588..e725223d63a 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm index 22b97d9da70..3342b60b860 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm index 13dc5e45575..c9c74e9ead6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm index 733bcd1b0ec..8e73c5f3037 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm index f4a4fa7e18c..40a1319c861 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm index 079d246db55..7c9c51f0a96 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm index 4ad74944ca9..08b426283c6 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm index 9964563a6fe..4c3c66b987f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm index 251aabe1d61..d413341cf5b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -47,7 +47,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm index e088706fe0c..fd006c5ad6b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm index 530581cc0c6..4972e0a9dba 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm index 9c00ad14894..29a78caf527 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm index 27836004746..9e538e95c7b 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NullableClass.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm index 96b42362910..ab9e9d3dd40 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm index 00ed0155385..645ba74faae 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm index 0aef6dbfe90..aa5a9526aaa 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm index f20810137e7..44d1e6ca8ad 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm index 53b1d5a1620..5942b8ff798 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm index ebc6f6d0c1b..5309a43dfa2 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm index 49ff7d83eea..d12618951d3 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm index dbb878f86b6..86b73132280 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -48,7 +48,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm index 96d5e1d5d9c..f04defe0d97 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm index 48d438db454..bb884cfa0de 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm index d973f5e5877..41399693422 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm index 355cf839493..147a8d9abf3 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm index 8cacd4e433c..f3e28b05051 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm index 44f7ff0f75f..9b86889ea42 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -46,7 +46,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm index ad7e2c2695c..d6e700b3623 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm @@ -114,20 +114,13 @@ sub from_hash { # loop through attributes and use openapi_types to deserialize the data while ( my ($_key, $_type) = each %{$self->openapi_types} ) { my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; + if ($_type =~ /^array\[/i) { # array + my $_subclass = substr($_type, 6, -1); my @_array = (); foreach my $_element (@{$hash->{$_json_attribute}}) { push @_array, $self->_deserialize($_subclass, $_element); } $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); } else { @@ -142,10 +135,10 @@ sub from_hash { sub _deserialize { my ($self, $type, $data) = @_; $log->debugf("deserializing %s with %s",Dumper($data), $type); - + if ($type eq 'DateTime') { return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { + } elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) { return $data; } else { # hash(model) my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index 070ab1bde33..f55d7b63834 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # Add a new pet to the store # -# @param Pet $body Pet object that needs to be added to the store (required) +# @param Pet $pet Pet object that needs to be added to the store (required) { my $params = { - 'body' => { + 'pet' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling add_pet"); + # verify the required parameter 'pet' is set + unless (exists $args{'pet'}) { + croak("Missing the required parameter 'pet' when calling add_pet"); } # parse inputs @@ -95,8 +95,8 @@ sub add_pet { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'pet'}) { + $_body_data = $args{'pet'}; } # authentication setting, if any @@ -385,10 +385,10 @@ sub get_pet_by_id { # # Update an existing pet # -# @param Pet $body Pet object that needs to be added to the store (required) +# @param Pet $pet Pet object that needs to be added to the store (required) { my $params = { - 'body' => { + 'pet' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling update_pet"); + # verify the required parameter 'pet' is set + unless (exists $args{'pet'}) { + croak("Missing the required parameter 'pet' when calling update_pet"); } # parse inputs @@ -427,8 +427,8 @@ sub update_pet { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'pet'}) { + $_body_data = $args{'pet'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm index 22da68892cb..dea1fd81a0c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm index bc18a96fb71..db553b53a1f 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm index 2d730e28e55..3b87d3d8f73 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -232,10 +232,10 @@ sub get_order_by_id { # # Place an order for a pet # -# @param Order $body order placed for purchasing the pet (required) +# @param Order $order order placed for purchasing the pet (required) { my $params = { - 'body' => { + 'order' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling place_order"); + # verify the required parameter 'order' is set + unless (exists $args{'order'}) { + croak("Missing the required parameter 'order' when calling place_order"); } # parse inputs @@ -270,12 +270,12 @@ sub place_order { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'order'}) { + $_body_data = $args{'order'}; } # authentication setting, if any diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm index e02106644ca..15bb4b97a3c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm @@ -4,7 +4,7 @@ OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -OpenAPI spec version: 1.0.0 +The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech @@ -53,10 +53,10 @@ sub new { # # Create user # -# @param User $body Created user object (required) +# @param User $user Created user object (required) { my $params = { - 'body' => { + 'user' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling create_user"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling create_user"); } # parse inputs @@ -91,12 +91,12 @@ sub create_user { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any @@ -114,10 +114,10 @@ sub create_user { # # Creates list of users with given input array # -# @param ARRAY[User] $body List of user object (required) +# @param ARRAY[User] $user List of user object (required) { my $params = { - 'body' => { + 'user' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling create_users_with_array_input"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling create_users_with_array_input"); } # parse inputs @@ -152,12 +152,12 @@ sub create_users_with_array_input { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # 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] $body List of user object (required) +# @param ARRAY[User] $user List of user object (required) { my $params = { - 'body' => { + 'user' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' when calling create_users_with_list_input"); + # verify the required parameter 'user' is set + unless (exists $args{'user'}) { + croak("Missing the required parameter 'user' when calling create_users_with_list_input"); } # parse inputs @@ -213,12 +213,12 @@ sub create_users_with_list_input { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # 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 $body Updated user object (required) +# @param User $user Updated user object (required) { my $params = { 'username' => { @@ -501,7 +501,7 @@ sub logout_user { description => 'name that need to be deleted', required => '1', }, - 'body' => { + 'user' => { 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 'body' is set - unless (exists $args{'body'}) { - croak("Missing the required parameter 'body' 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"); } # parse inputs @@ -541,7 +541,7 @@ sub update_user { if ($_header_accept) { $header_params->{'Accept'} = $_header_accept; } - $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type(); + $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json'); # path params if ( exists $args{'username'}) { @@ -552,8 +552,8 @@ sub update_user { my $_body_data; # body params - if ( exists $args{'body'}) { - $_body_data = $args{'body'}; + if ( exists $args{'user'}) { + $_body_data = $args{'user'}; } # authentication setting, if any