From df0e13f0c62482ad7cc2fdeadae5bfceeac7c0a7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 22 Jan 2024 11:39:01 +0800 Subject: [PATCH] Remove outdated files in perl petstore cilents (#17668) * remove outdated files in perl cilents * update samples --- .../perl/docs/AdditionalPropertiesAnyType.md | 15 - .../perl/docs/AdditionalPropertiesArray.md | 15 - .../perl/docs/AdditionalPropertiesBoolean.md | 15 - .../perl/docs/AdditionalPropertiesInteger.md | 15 - .../perl/docs/AdditionalPropertiesNumber.md | 15 - .../perl/docs/AdditionalPropertiesObject.md | 15 - .../perl/docs/AdditionalPropertiesString.md | 15 - samples/client/petstore/perl/docs/Adult.md | 18 - .../client/petstore/perl/docs/AnimalFarm.md | 14 - samples/client/petstore/perl/docs/BigCat.md | 15 - samples/client/petstore/perl/docs/Body4.md | 16 - samples/client/petstore/perl/docs/Child.md | 16 - .../petstore/perl/docs/DeprecatedObject.md | 15 - samples/client/petstore/perl/docs/Human.md | 16 - .../client/petstore/perl/docs/InlineObject.md | 16 - .../petstore/perl/docs/InlineObject1.md | 16 - .../petstore/perl/docs/InlineObject2.md | 16 - .../petstore/perl/docs/InlineObject3.md | 28 -- .../petstore/perl/docs/InlineObject4.md | 16 - .../petstore/perl/docs/InlineObject5.md | 16 - .../petstore/perl/docs/InlineResponse200.md | 20 - .../perl/docs/InlineResponseDefault.md | 15 - .../client/petstore/perl/docs/ObjectReturn.md | 13 - .../client/petstore/perl/docs/OuterBoolean.md | 14 - .../client/petstore/perl/docs/OuterNumber.md | 14 - .../client/petstore/perl/docs/OuterString.md | 14 - samples/client/petstore/perl/docs/Person.md | 20 - .../petstore/perl/docs/SpecialModelName_.md | 15 - .../petstore/perl/docs/StringBooleanMap.md | 14 - .../petstore/perl/docs/TypeHolderDefault.md | 19 - .../petstore/perl/docs/TypeHolderExample.md | 20 - samples/client/petstore/perl/docs/XmlItem.md | 43 -- .../Object/AdditionalPropertiesAnyType.pm | 184 -------- .../Object/AdditionalPropertiesArray.pm | 184 -------- .../Object/AdditionalPropertiesBoolean.pm | 184 -------- .../Object/AdditionalPropertiesInteger.pm | 184 -------- .../Object/AdditionalPropertiesNumber.pm | 184 -------- .../Object/AdditionalPropertiesObject.pm | 184 -------- .../Object/AdditionalPropertiesString.pm | 184 -------- .../lib/WWW/OpenAPIClient/Object/Adult.pm | 231 ---------- .../WWW/OpenAPIClient/Object/AnimalFarm.pm | 170 ------- .../lib/WWW/OpenAPIClient/Object/BigCat.pm | 198 -------- .../lib/WWW/OpenAPIClient/Object/Child.pm | 199 -------- .../OpenAPIClient/Object/DeprecatedObject.pm | 242 ---------- .../lib/WWW/OpenAPIClient/Object/Human.pm | 186 -------- .../WWW/OpenAPIClient/Object/InlineObject.pm | 193 -------- .../WWW/OpenAPIClient/Object/InlineObject1.pm | 193 -------- .../WWW/OpenAPIClient/Object/InlineObject2.pm | 193 -------- .../WWW/OpenAPIClient/Object/InlineObject3.pm | 301 ------------ .../WWW/OpenAPIClient/Object/InlineObject4.pm | 193 -------- .../WWW/OpenAPIClient/Object/InlineObject5.pm | 193 -------- .../Object/InlineResponseDefault.pm | 184 -------- .../lib/WWW/OpenAPIClient/Object/Person.pm | 222 --------- .../OpenAPIClient/Object/StringBooleanMap.pm | 168 ------- .../OpenAPIClient/Object/TypeHolderDefault.pm | 220 --------- .../OpenAPIClient/Object/TypeHolderExample.pm | 229 --------- .../lib/WWW/OpenAPIClient/Object/XmlItem.pm | 436 ------------------ 57 files changed, 5783 deletions(-) delete mode 100644 samples/client/petstore/perl/docs/AdditionalPropertiesAnyType.md delete mode 100644 samples/client/petstore/perl/docs/AdditionalPropertiesArray.md delete mode 100644 samples/client/petstore/perl/docs/AdditionalPropertiesBoolean.md delete mode 100644 samples/client/petstore/perl/docs/AdditionalPropertiesInteger.md delete mode 100644 samples/client/petstore/perl/docs/AdditionalPropertiesNumber.md delete mode 100644 samples/client/petstore/perl/docs/AdditionalPropertiesObject.md delete mode 100644 samples/client/petstore/perl/docs/AdditionalPropertiesString.md delete mode 100644 samples/client/petstore/perl/docs/Adult.md delete mode 100644 samples/client/petstore/perl/docs/AnimalFarm.md delete mode 100644 samples/client/petstore/perl/docs/BigCat.md delete mode 100644 samples/client/petstore/perl/docs/Body4.md delete mode 100644 samples/client/petstore/perl/docs/Child.md delete mode 100644 samples/client/petstore/perl/docs/DeprecatedObject.md delete mode 100644 samples/client/petstore/perl/docs/Human.md delete mode 100644 samples/client/petstore/perl/docs/InlineObject.md delete mode 100644 samples/client/petstore/perl/docs/InlineObject1.md delete mode 100644 samples/client/petstore/perl/docs/InlineObject2.md delete mode 100644 samples/client/petstore/perl/docs/InlineObject3.md delete mode 100644 samples/client/petstore/perl/docs/InlineObject4.md delete mode 100644 samples/client/petstore/perl/docs/InlineObject5.md delete mode 100644 samples/client/petstore/perl/docs/InlineResponse200.md delete mode 100644 samples/client/petstore/perl/docs/InlineResponseDefault.md delete mode 100644 samples/client/petstore/perl/docs/ObjectReturn.md delete mode 100644 samples/client/petstore/perl/docs/OuterBoolean.md delete mode 100644 samples/client/petstore/perl/docs/OuterNumber.md delete mode 100644 samples/client/petstore/perl/docs/OuterString.md delete mode 100644 samples/client/petstore/perl/docs/Person.md delete mode 100644 samples/client/petstore/perl/docs/SpecialModelName_.md delete mode 100644 samples/client/petstore/perl/docs/StringBooleanMap.md delete mode 100644 samples/client/petstore/perl/docs/TypeHolderDefault.md delete mode 100644 samples/client/petstore/perl/docs/TypeHolderExample.md delete mode 100644 samples/client/petstore/perl/docs/XmlItem.md delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Adult.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AnimalFarm.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/BigCat.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Child.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Human.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Person.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/StringBooleanMap.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm diff --git a/samples/client/petstore/perl/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/perl/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index 26f619b17ab..00000000000 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/AdditionalPropertiesArray.md b/samples/client/petstore/perl/docs/AdditionalPropertiesArray.md deleted file mode 100644 index ecd3c7d28b0..00000000000 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::AdditionalPropertiesArray - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesArray; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/AdditionalPropertiesBoolean.md b/samples/client/petstore/perl/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index db7b80c7c1c..00000000000 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/AdditionalPropertiesInteger.md b/samples/client/petstore/perl/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index c1daff0754a..00000000000 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::AdditionalPropertiesInteger - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/AdditionalPropertiesNumber.md b/samples/client/petstore/perl/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 158c325d40e..00000000000 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::AdditionalPropertiesNumber - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/AdditionalPropertiesObject.md b/samples/client/petstore/perl/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 1c09e4ec608..00000000000 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::AdditionalPropertiesObject - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesObject; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/AdditionalPropertiesString.md b/samples/client/petstore/perl/docs/AdditionalPropertiesString.md deleted file mode 100644 index e8f4ea315fe..00000000000 --- a/samples/client/petstore/perl/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::AdditionalPropertiesString - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AdditionalPropertiesString; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/Adult.md b/samples/client/petstore/perl/docs/Adult.md deleted file mode 100644 index 576d0350c2c..00000000000 --- a/samples/client/petstore/perl/docs/Adult.md +++ /dev/null @@ -1,18 +0,0 @@ -# WWW::OpenAPIClient::Object::Adult - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::Adult; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**duplicated_optional** | **int** | | [optional] -**duplicated_required** | **int** | | -**children** | [**ARRAY[Child]**](Child.md) | | [optional] -**adult_required** | **boolean** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/samples/client/petstore/perl/docs/AnimalFarm.md b/samples/client/petstore/perl/docs/AnimalFarm.md deleted file mode 100644 index 1a516d47b36..00000000000 --- a/samples/client/petstore/perl/docs/AnimalFarm.md +++ /dev/null @@ -1,14 +0,0 @@ -# WWW::OpenAPIClient::Object::AnimalFarm - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::AnimalFarm; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/BigCat.md b/samples/client/petstore/perl/docs/BigCat.md deleted file mode 100644 index 131eb61c20b..00000000000 --- a/samples/client/petstore/perl/docs/BigCat.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::BigCat - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::BigCat; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **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/Body4.md b/samples/client/petstore/perl/docs/Body4.md deleted file mode 100644 index 38e2c198944..00000000000 --- a/samples/client/petstore/perl/docs/Body4.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::Body4 - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::Body4; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**param** | **string** | field1 | -**param2** | **string** | field2 | - -[[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/Child.md b/samples/client/petstore/perl/docs/Child.md deleted file mode 100644 index 41f0b9603f3..00000000000 --- a/samples/client/petstore/perl/docs/Child.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::Child - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::Child; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**age** | **int** | | [optional] -**first_name** | **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/DeprecatedObject.md b/samples/client/petstore/perl/docs/DeprecatedObject.md deleted file mode 100644 index 692432fcab1..00000000000 --- a/samples/client/petstore/perl/docs/DeprecatedObject.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::DeprecatedObject - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::DeprecatedObject; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **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/Human.md b/samples/client/petstore/perl/docs/Human.md deleted file mode 100644 index e1b5ddc362c..00000000000 --- a/samples/client/petstore/perl/docs/Human.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::Human - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::Human; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**___type** | **string** | | [optional] -**body** | **string** | | - -[[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/InlineObject.md b/samples/client/petstore/perl/docs/InlineObject.md deleted file mode 100644 index 126cf49b740..00000000000 --- a/samples/client/petstore/perl/docs/InlineObject.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineObject - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineObject; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | Updated name of the pet | [optional] -**status** | **string** | Updated status of the pet | [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/InlineObject1.md b/samples/client/petstore/perl/docs/InlineObject1.md deleted file mode 100644 index 839fdba9efa..00000000000 --- a/samples/client/petstore/perl/docs/InlineObject1.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineObject1 - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineObject1; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additional_metadata** | **string** | Additional data to pass to server | [optional] -**file** | **string** | file to upload | [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/InlineObject2.md b/samples/client/petstore/perl/docs/InlineObject2.md deleted file mode 100644 index 4d9df027ae4..00000000000 --- a/samples/client/petstore/perl/docs/InlineObject2.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineObject2 - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineObject2; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enum_form_string_array** | **ARRAY[string]** | Form parameter enum test (string array) | [optional] -**enum_form_string** | **string** | Form parameter enum test (string) | [optional] [default to '-efg'] - -[[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/InlineObject3.md b/samples/client/petstore/perl/docs/InlineObject3.md deleted file mode 100644 index cf84ac4a3b1..00000000000 --- a/samples/client/petstore/perl/docs/InlineObject3.md +++ /dev/null @@ -1,28 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineObject3 - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineObject3; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**integer** | **int** | None | [optional] -**int32** | **int** | None | [optional] -**int64** | **int** | None | [optional] -**number** | **double** | None | -**float** | **double** | None | [optional] -**double** | **double** | None | -**string** | **string** | None | [optional] -**pattern_without_delimiter** | **string** | None | -**byte** | **string** | None | -**binary** | **string** | None | [optional] -**date** | **DateTime** | None | [optional] -**date_time** | **DateTime** | None | [optional] -**password** | **string** | None | [optional] -**callback** | **string** | None | [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/InlineObject4.md b/samples/client/petstore/perl/docs/InlineObject4.md deleted file mode 100644 index d29db47bc0a..00000000000 --- a/samples/client/petstore/perl/docs/InlineObject4.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineObject4 - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineObject4; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**param** | **string** | field1 | -**param2** | **string** | field2 | - -[[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/InlineObject5.md b/samples/client/petstore/perl/docs/InlineObject5.md deleted file mode 100644 index 1d83caf0754..00000000000 --- a/samples/client/petstore/perl/docs/InlineObject5.md +++ /dev/null @@ -1,16 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineObject5 - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineObject5; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**additional_metadata** | **string** | Additional data to pass to server | [optional] -**required_file** | **string** | file to upload | - -[[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/InlineResponse200.md b/samples/client/petstore/perl/docs/InlineResponse200.md deleted file mode 100644 index bff419cf173..00000000000 --- a/samples/client/petstore/perl/docs/InlineResponse200.md +++ /dev/null @@ -1,20 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineResponse200 - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineResponse200; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tags** | [**ARRAY[Tag]**](Tag.md) | | [optional] -**id** | **int** | | -**category** | **object** | | [optional] -**status** | **string** | pet status in the store | [optional] -**name** | **string** | | [optional] -**photo_urls** | **ARRAY[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/InlineResponseDefault.md b/samples/client/petstore/perl/docs/InlineResponseDefault.md deleted file mode 100644 index 5da39c51579..00000000000 --- a/samples/client/petstore/perl/docs/InlineResponseDefault.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::InlineResponseDefault - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::InlineResponseDefault; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**](Foo.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/ObjectReturn.md b/samples/client/petstore/perl/docs/ObjectReturn.md deleted file mode 100644 index a9eced23a02..00000000000 --- a/samples/client/petstore/perl/docs/ObjectReturn.md +++ /dev/null @@ -1,13 +0,0 @@ -# WWW::OpenAPIClient::Object::ObjectReturn - -## Import the module -```perl -use WWW::OpenAPIClient::Object::ObjectReturn; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**return** | **int** | | [optional] - - diff --git a/samples/client/petstore/perl/docs/OuterBoolean.md b/samples/client/petstore/perl/docs/OuterBoolean.md deleted file mode 100644 index 6d3e7c0ea0e..00000000000 --- a/samples/client/petstore/perl/docs/OuterBoolean.md +++ /dev/null @@ -1,14 +0,0 @@ -# WWW::OpenAPIClient::Object::OuterBoolean - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::OuterBoolean; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/OuterNumber.md b/samples/client/petstore/perl/docs/OuterNumber.md deleted file mode 100644 index 47ba82fbde8..00000000000 --- a/samples/client/petstore/perl/docs/OuterNumber.md +++ /dev/null @@ -1,14 +0,0 @@ -# WWW::OpenAPIClient::Object::OuterNumber - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::OuterNumber; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/OuterString.md b/samples/client/petstore/perl/docs/OuterString.md deleted file mode 100644 index 1eef00c33bf..00000000000 --- a/samples/client/petstore/perl/docs/OuterString.md +++ /dev/null @@ -1,14 +0,0 @@ -# WWW::OpenAPIClient::Object::OuterString - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::OuterString; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/Person.md b/samples/client/petstore/perl/docs/Person.md deleted file mode 100644 index 1b888626d5a..00000000000 --- a/samples/client/petstore/perl/docs/Person.md +++ /dev/null @@ -1,20 +0,0 @@ -# WWW::OpenAPIClient::Object::Person - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::Person; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**___type** | **string** | | [optional] -**last_name** | **string** | | [optional] -**first_name** | **string** | | [optional] -**duplicated_optional** | **string** | | [optional] -**duplicated_required** | **string** | | -**person_required** | **DateTime** | | - -[[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/SpecialModelName_.md b/samples/client/petstore/perl/docs/SpecialModelName_.md deleted file mode 100644 index ad9deccd8e9..00000000000 --- a/samples/client/petstore/perl/docs/SpecialModelName_.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::SpecialModelName_ - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::SpecialModelName_; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**__special[property/name]** | **int** | | [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/StringBooleanMap.md b/samples/client/petstore/perl/docs/StringBooleanMap.md deleted file mode 100644 index 83c9a6f5f17..00000000000 --- a/samples/client/petstore/perl/docs/StringBooleanMap.md +++ /dev/null @@ -1,14 +0,0 @@ -# WWW::OpenAPIClient::Object::StringBooleanMap - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::StringBooleanMap; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[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/TypeHolderDefault.md b/samples/client/petstore/perl/docs/TypeHolderDefault.md deleted file mode 100644 index 7fcd7ed9e53..00000000000 --- a/samples/client/petstore/perl/docs/TypeHolderDefault.md +++ /dev/null @@ -1,19 +0,0 @@ -# WWW::OpenAPIClient::Object::TypeHolderDefault - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::TypeHolderDefault; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string_item** | **string** | | [default to 'what'] -**number_item** | **double** | | -**integer_item** | **int** | | -**bool_item** | **boolean** | | [default to true] -**array_item** | **ARRAY[int]** | | - -[[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/TypeHolderExample.md b/samples/client/petstore/perl/docs/TypeHolderExample.md deleted file mode 100644 index 563163afdf8..00000000000 --- a/samples/client/petstore/perl/docs/TypeHolderExample.md +++ /dev/null @@ -1,20 +0,0 @@ -# WWW::OpenAPIClient::Object::TypeHolderExample - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::TypeHolderExample; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string_item** | **string** | | -**number_item** | **double** | | -**float_item** | **double** | | -**integer_item** | **int** | | -**bool_item** | **boolean** | | -**array_item** | **ARRAY[int]** | | - -[[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/XmlItem.md b/samples/client/petstore/perl/docs/XmlItem.md deleted file mode 100644 index f3350ea89de..00000000000 --- a/samples/client/petstore/perl/docs/XmlItem.md +++ /dev/null @@ -1,43 +0,0 @@ -# WWW::OpenAPIClient::Object::XmlItem - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::XmlItem; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attribute_string** | **string** | | [optional] -**attribute_number** | **double** | | [optional] -**attribute_integer** | **int** | | [optional] -**attribute_boolean** | **boolean** | | [optional] -**wrapped_array** | **ARRAY[int]** | | [optional] -**name_string** | **string** | | [optional] -**name_number** | **double** | | [optional] -**name_integer** | **int** | | [optional] -**name_boolean** | **boolean** | | [optional] -**name_array** | **ARRAY[int]** | | [optional] -**name_wrapped_array** | **ARRAY[int]** | | [optional] -**prefix_string** | **string** | | [optional] -**prefix_number** | **double** | | [optional] -**prefix_integer** | **int** | | [optional] -**prefix_boolean** | **boolean** | | [optional] -**prefix_array** | **ARRAY[int]** | | [optional] -**prefix_wrapped_array** | **ARRAY[int]** | | [optional] -**namespace_string** | **string** | | [optional] -**namespace_number** | **double** | | [optional] -**namespace_integer** | **int** | | [optional] -**namespace_boolean** | **boolean** | | [optional] -**namespace_array** | **ARRAY[int]** | | [optional] -**namespace_wrapped_array** | **ARRAY[int]** | | [optional] -**prefix_ns_string** | **string** | | [optional] -**prefix_ns_number** | **double** | | [optional] -**prefix_ns_integer** | **int** | | [optional] -**prefix_ns_boolean** | **boolean** | | [optional] -**prefix_ns_array** | **ARRAY[int]** | | [optional] -**prefix_ns_wrapped_array** | **ARRAY[int]** | | [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/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm deleted file mode 100644 index 55621de2d7b..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'AdditionalPropertiesAnyType', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm deleted file mode 100644 index b66e305d9d5..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AdditionalPropertiesArray; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'AdditionalPropertiesArray', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm deleted file mode 100644 index 0c12fffd5ba..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'AdditionalPropertiesBoolean', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm deleted file mode 100644 index 98ccc1329c0..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AdditionalPropertiesInteger; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'AdditionalPropertiesInteger', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm deleted file mode 100644 index 6c20cd9b4cc..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AdditionalPropertiesNumber; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'AdditionalPropertiesNumber', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm deleted file mode 100644 index 79ec11321c8..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AdditionalPropertiesObject; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'AdditionalPropertiesObject', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm deleted file mode 100644 index c91754dba18..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AdditionalPropertiesString; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'AdditionalPropertiesString', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Adult.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Adult.pm deleted file mode 100644 index f7df6c4af8c..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Adult.pm +++ /dev/null @@ -1,231 +0,0 @@ -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::Adult; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use WWW::OpenAPIClient::Object::Child; -use WWW::OpenAPIClient::Object::Human; -use WWW::OpenAPIClient::Object::Person; - -use base ("Class::Accessor", "Class::Data::Inheritable", "WWW::OpenAPIClient::Object::Person", "WWW::OpenAPIClient::Object::Human"); - -# -#A representation of an adult -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - # initialize parent object Person - $self->WWW::OpenAPIClient::Object::Person::init(%args); - - # initialize parent object Human - $self->WWW::OpenAPIClient::Object::Human::init(%args); -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - # call Person to_hash and then combine hash - $_hash = { %$_hash, %$self->WWW::OpenAPIClient::Object::Person::to_hash }; - - # call Human to_hash and then combine hash - $_hash = { %$_hash, %$self->WWW::OpenAPIClient::Object::Human::to_hash }; - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - # combine parent (Person) TO_JSON - $_data = { %$_data, %$self->WWW::OpenAPIClient::Object::Person::TO_JSON }; - - # combine parent (Human) TO_JSON - $_data = { %$_data, %$self->WWW::OpenAPIClient::Object::Human::TO_JSON }; - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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 = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - # call parent (Person) from_hash - $self->WWW::OpenAPIClient::Object::Person::from_hash($hash); - - # call parent (Human) from_hash - $self->WWW::OpenAPIClient::Object::Human::from_hash($hash); - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => 'A representation of an adult', - class => 'Adult', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'duplicated_optional' => { - datatype => 'int', - base_name => 'duplicated_optional', - description => '', - format => '', - read_only => '', - }, - 'duplicated_required' => { - datatype => 'int', - base_name => 'duplicated_required', - description => '', - format => '', - read_only => '', - }, - 'children' => { - datatype => 'ARRAY[Child]', - base_name => 'children', - description => '', - format => '', - read_only => '', - }, - 'adult_required' => { - datatype => 'boolean', - base_name => 'adult_required', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'duplicated_optional' => 'int', - 'duplicated_required' => 'int', - 'children' => 'ARRAY[Child]', - 'adult_required' => 'boolean' -} ); - -__PACKAGE__->attribute_map( { - 'duplicated_optional' => 'duplicated_optional', - 'duplicated_required' => 'duplicated_required', - 'children' => 'children', - 'adult_required' => 'adult_required' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AnimalFarm.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AnimalFarm.pm deleted file mode 100644 index 9a9fd1a4538..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AnimalFarm.pm +++ /dev/null @@ -1,170 +0,0 @@ - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::AnimalFarm; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use WWW::OpenAPIClient::Object::Animal; - -use base ( "Class::Accessor", "Class::Data::Inheritable" ); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata( 'attribute_map' => {} ); -__PACKAGE__->mk_classdata( 'openapi_types' => {} ); -__PACKAGE__->mk_classdata( 'method_documentation' => {} ); -__PACKAGE__->mk_classdata( 'class_documentation' => {} ); - -# new object -sub new { - my ( $class, %args ) = @_; - - my $self = bless {}, $class; - - foreach my $attribute ( keys %{ $class->attribute_map } ) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{$args_key} ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json( JSON->new->convert_blessed->encode(shift) ); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key ( keys %{ $self->attribute_map } ) { - if ( defined $self->{$_key} ) { - $_data->{ $self->attribute_map->{$_key} } = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ( $self, $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 = substr( $_type, 6, -1 ); - my @_array = (); - foreach my $_element ( @{ $hash->{$_json_attribute} } ) { - push @_array, $self->_deserialize( $_subclass, $_element ); - } - $self->{$_key} = \@_array; - } - elsif ( exists $hash->{$_json_attribute} ) - { #hash(model), primitive, datetime - $self->{$_key} = - $self->_deserialize( $_type, $hash->{$_json_attribute} ); - } - else { - $log->debugf( "Warning: %s (%s) does not exist in input hash\n", - $_key, $_json_attribute ); - } - } - - return $self; -} - -# deserialize non-array data -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' ) ) ) { - return $data; - } - else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - -__PACKAGE__->class_documentation( - { - description => '', - class => 'AnimalFarm', - required => [], # TODO - } -); - -__PACKAGE__->method_documentation( {} ); - -__PACKAGE__->openapi_types( - { - - } -); - -__PACKAGE__->attribute_map( - { - - } -); - -__PACKAGE__->mk_accessors( keys %{ __PACKAGE__->attribute_map } ); - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/BigCat.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/BigCat.pm deleted file mode 100644 index f1cebb8ec7b..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/BigCat.pm +++ /dev/null @@ -1,198 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::BigCat; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use WWW::OpenAPIClient::Object::BigCatAllOf; -use WWW::OpenAPIClient::Object::Cat; - -use base ("Class::Accessor", "Class::Data::Inheritable", "WWW::OpenAPIClient::Object::Cat"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - # initialize parent object Cat - $self->WWW::OpenAPIClient::Object::Cat::init(%args); -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - # call Cat to_hash and then combine hash - $_hash = { %$_hash, %$self->WWW::OpenAPIClient::Object::Cat::to_hash }; - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - # combine parent (Cat) TO_JSON - $_data = { %$_data, %$self->WWW::OpenAPIClient::Object::Cat::TO_JSON }; - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - # call parent (Cat) from_hash - $self->WWW::OpenAPIClient::Object::Cat::from_hash($hash); - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'BigCat', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'kind' => { - datatype => 'string', - base_name => 'kind', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'kind' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'kind' => 'kind' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Child.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Child.pm deleted file mode 100644 index 3cb4c2ae6ce..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Child.pm +++ /dev/null @@ -1,199 +0,0 @@ -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::Child; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use WWW::OpenAPIClient::Object::Person; - -use base ("Class::Accessor", "Class::Data::Inheritable", "WWW::OpenAPIClient::Object::Person"); - -# -#A representation of a child -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - # initialize parent object Person - $self->WWW::OpenAPIClient::Object::Person::init(%args); -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - # call Person to_hash and then combine hash - $_hash = { %$_hash, %$self->WWW::OpenAPIClient::Object::Person::to_hash }; - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - # combine parent (Person) TO_JSON - $_data = { %$_data, %$self->WWW::OpenAPIClient::Object::Person::TO_JSON }; - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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 = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - # call parent (Person) from_hash - $self->WWW::OpenAPIClient::Object::Person::from_hash($hash); - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => 'A representation of a child', - class => 'Child', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'age' => { - datatype => 'int', - base_name => 'age', - description => '', - format => '', - read_only => '', - }, - 'first_name' => { - datatype => 'string', - base_name => 'firstName', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'age' => 'int', - 'first_name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'age' => 'age', - 'first_name' => 'firstName' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm deleted file mode 100644 index 590c2782fa1..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm +++ /dev/null @@ -1,242 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::DeprecatedObject; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - my $_json_attribute = $self->attribute_map->{$_key}; - my $_type = $self->openapi_types->{$_key}; - my $_value = $self->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; - $_data->{$_json_attribute} = [ map { $self->_to_json_primitives($_subclass, $_) } @$_value ]; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$_value}) { - $_hash{$_key} = $self->_to_json_primitives($_subclass, $_element); - } - $_data->{$_json_attribute} = \%_hash; - } elsif ( grep( /^$_type$/, ('int', 'double', 'string', 'boolean', 'DATE', 'DATE_TIME'))) { - $_data->{$_json_attribute} = $self->_to_json_primitives($_type, $_value); - } else { - $_data->{$_json_attribute} = $_value; - } - } - } - - return $_data; -} - -# to_json non-array data -sub _to_json_primitives { - my ($self, $type, $data) = @_; - if ( grep( /^$type$/, ('int', 'double'))) { - # https://metacpan.org/pod/JSON#simple-scalars - # numify it, ensuring it will be dumped as a number - return undef unless defined $data; - return $data + 0; - } elsif ($type eq 'string') { - # https://metacpan.org/pod/JSON#simple-scalars - # stringified - return undef unless defined $data; - return $data . q(); - } elsif ($type eq 'boolean') { - # https://metacpan.org/pod/JSON#JSON::true,-JSON::false,-JSON::null - return $data ? \1 : \0; - } elsif ($type eq 'DATE') { - return undef unless defined $data; - if (ref($data) eq 'DateTime') { - # https://metacpan.org/pod/DateTime#$dt-%3Eymd($optional_separator),-$dt-%3Emdy(...),-$dt-%3Edmy(...) - return $data->ymd; - } - return $data .q(); - } elsif ($type eq 'DATE_TIME') { - return undef unless defined $data; - # the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z - if (ref($data) eq 'DateTime') { - # https://metacpan.org/pod/DateTime#$dt-%3Erfc3339 - return $data->rfc3339; - } - return $data .q(); - } else { # hash (model), In this case, the TO_JSON of the $data object is executed - return $data; - } -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if (grep( /^$type$/ , ('DATE_TIME', 'DATE'))) { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double'))) { - return undef unless defined $data; - return $data + 0; - } elsif ($type eq 'string') { - return undef unless defined $data; - return $data . q(); - } elsif ($type eq 'boolean') { - return !!$data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - -__PACKAGE__->class_documentation({description => '', - class => 'DeprecatedObject', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Human.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Human.pm deleted file mode 100644 index 9d54bc86753..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Human.pm +++ /dev/null @@ -1,186 +0,0 @@ -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::Human; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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 = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'Human', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - '___type' => { - datatype => 'string', - base_name => '$_type', - description => '', - format => '', - read_only => '', - }, - 'body' => { - datatype => 'string', - base_name => 'body', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - '___type' => 'string', - 'body' => 'string' -} ); - -__PACKAGE__->attribute_map( { - '___type' => '$_type', - 'body' => 'body' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm deleted file mode 100644 index 1b45e5c05c4..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject.pm +++ /dev/null @@ -1,193 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::InlineObject; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineObject', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'name' => { - datatype => 'string', - base_name => 'name', - description => 'Updated name of the pet', - format => '', - read_only => '', - }, - 'status' => { - datatype => 'string', - base_name => 'status', - description => 'Updated status of the pet', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'name' => 'string', - 'status' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'name' => 'name', - 'status' => 'status' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm deleted file mode 100644 index e725223d63a..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject1.pm +++ /dev/null @@ -1,193 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::InlineObject1; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineObject1', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'additional_metadata' => { - datatype => 'string', - base_name => 'additionalMetadata', - description => 'Additional data to pass to server', - format => '', - read_only => '', - }, - 'file' => { - datatype => 'string', - base_name => 'file', - description => 'file to upload', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'additional_metadata' => 'string', - 'file' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'additional_metadata' => 'additionalMetadata', - 'file' => 'file' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm deleted file mode 100644 index 3342b60b860..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject2.pm +++ /dev/null @@ -1,193 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::InlineObject2; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineObject2', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'enum_form_string_array' => { - datatype => 'ARRAY[string]', - base_name => 'enum_form_string_array', - description => 'Form parameter enum test (string array)', - format => '', - read_only => '', - }, - 'enum_form_string' => { - datatype => 'string', - base_name => 'enum_form_string', - description => 'Form parameter enum test (string)', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'enum_form_string_array' => 'ARRAY[string]', - 'enum_form_string' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'enum_form_string_array' => 'enum_form_string_array', - 'enum_form_string' => 'enum_form_string' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm deleted file mode 100644 index c9c74e9ead6..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject3.pm +++ /dev/null @@ -1,301 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::InlineObject3; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineObject3', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'integer' => { - datatype => 'int', - base_name => 'integer', - description => 'None', - format => '', - read_only => '', - }, - 'int32' => { - datatype => 'int', - base_name => 'int32', - description => 'None', - format => '', - read_only => '', - }, - 'int64' => { - datatype => 'int', - base_name => 'int64', - description => 'None', - format => '', - read_only => '', - }, - 'number' => { - datatype => 'double', - base_name => 'number', - description => 'None', - format => '', - read_only => '', - }, - 'float' => { - datatype => 'double', - base_name => 'float', - description => 'None', - format => '', - read_only => '', - }, - 'double' => { - datatype => 'double', - base_name => 'double', - description => 'None', - format => '', - read_only => '', - }, - 'string' => { - datatype => 'string', - base_name => 'string', - description => 'None', - format => '', - read_only => '', - }, - 'pattern_without_delimiter' => { - datatype => 'string', - base_name => 'pattern_without_delimiter', - description => 'None', - format => '', - read_only => '', - }, - 'byte' => { - datatype => 'string', - base_name => 'byte', - description => 'None', - format => '', - read_only => '', - }, - 'binary' => { - datatype => 'string', - base_name => 'binary', - description => 'None', - format => '', - read_only => '', - }, - 'date' => { - datatype => 'DateTime', - base_name => 'date', - description => 'None', - format => '', - read_only => '', - }, - 'date_time' => { - datatype => 'DateTime', - base_name => 'dateTime', - description => 'None', - format => '', - read_only => '', - }, - 'password' => { - datatype => 'string', - base_name => 'password', - description => 'None', - format => '', - read_only => '', - }, - 'callback' => { - datatype => 'string', - base_name => 'callback', - description => 'None', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'integer' => 'int', - 'int32' => 'int', - 'int64' => 'int', - 'number' => 'double', - 'float' => 'double', - 'double' => 'double', - 'string' => 'string', - 'pattern_without_delimiter' => 'string', - 'byte' => 'string', - 'binary' => 'string', - 'date' => 'DateTime', - 'date_time' => 'DateTime', - 'password' => 'string', - 'callback' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'integer' => 'integer', - 'int32' => 'int32', - 'int64' => 'int64', - 'number' => 'number', - 'float' => 'float', - 'double' => 'double', - 'string' => 'string', - 'pattern_without_delimiter' => 'pattern_without_delimiter', - 'byte' => 'byte', - 'binary' => 'binary', - 'date' => 'date', - 'date_time' => 'dateTime', - 'password' => 'password', - 'callback' => 'callback' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm deleted file mode 100644 index 8e73c5f3037..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject4.pm +++ /dev/null @@ -1,193 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::InlineObject4; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineObject4', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'param' => { - datatype => 'string', - base_name => 'param', - description => 'field1', - format => '', - read_only => '', - }, - 'param2' => { - datatype => 'string', - base_name => 'param2', - description => 'field2', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'param' => 'string', - 'param2' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'param' => 'param', - 'param2' => 'param2' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm deleted file mode 100644 index 40a1319c861..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineObject5.pm +++ /dev/null @@ -1,193 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::InlineObject5; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineObject5', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'additional_metadata' => { - datatype => 'string', - base_name => 'additionalMetadata', - description => 'Additional data to pass to server', - format => '', - read_only => '', - }, - 'required_file' => { - datatype => 'string', - base_name => 'requiredFile', - description => 'file to upload', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'additional_metadata' => 'string', - 'required_file' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'additional_metadata' => 'additionalMetadata', - 'required_file' => 'requiredFile' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm deleted file mode 100644 index b9d951ed272..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::InlineResponseDefault; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use WWW::OpenAPIClient::Object::Foo; - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineResponseDefault', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'string' => { - datatype => 'Foo', - base_name => 'string', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'string' => 'Foo' -} ); - -__PACKAGE__->attribute_map( { - 'string' => 'string' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Person.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Person.pm deleted file mode 100644 index f38adcaad3f..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Person.pm +++ /dev/null @@ -1,222 +0,0 @@ -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::Person; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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 = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'Person', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - '___type' => { - datatype => 'string', - base_name => '$_type', - description => '', - format => '', - read_only => '', - }, - 'last_name' => { - datatype => 'string', - base_name => 'lastName', - description => '', - format => '', - read_only => '', - }, - 'first_name' => { - datatype => 'string', - base_name => 'firstName', - description => '', - format => '', - read_only => '', - }, - 'duplicated_optional' => { - datatype => 'string', - base_name => 'duplicated_optional', - description => '', - format => '', - read_only => '', - }, - 'duplicated_required' => { - datatype => 'string', - base_name => 'duplicated_required', - description => '', - format => '', - read_only => '', - }, - 'person_required' => { - datatype => 'DateTime', - base_name => 'person_required', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - '___type' => 'string', - 'last_name' => 'string', - 'first_name' => 'string', - 'duplicated_optional' => 'string', - 'duplicated_required' => 'string', - 'person_required' => 'DateTime' -} ); - -__PACKAGE__->attribute_map( { - '___type' => '$_type', - 'last_name' => 'lastName', - 'first_name' => 'firstName', - 'duplicated_optional' => 'duplicated_optional', - 'duplicated_required' => 'duplicated_required', - 'person_required' => 'person_required' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/StringBooleanMap.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/StringBooleanMap.pm deleted file mode 100644 index 95cc675bf78..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/StringBooleanMap.pm +++ /dev/null @@ -1,168 +0,0 @@ - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::StringBooleanMap; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use base ( "Class::Accessor", "Class::Data::Inheritable" ); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata( 'attribute_map' => {} ); -__PACKAGE__->mk_classdata( 'openapi_types' => {} ); -__PACKAGE__->mk_classdata( 'method_documentation' => {} ); -__PACKAGE__->mk_classdata( 'class_documentation' => {} ); - -# new object -sub new { - my ( $class, %args ) = @_; - - my $self = bless {}, $class; - - foreach my $attribute ( keys %{ $class->attribute_map } ) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{$args_key} ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json( JSON->new->convert_blessed->encode(shift) ); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key ( keys %{ $self->attribute_map } ) { - if ( defined $self->{$_key} ) { - $_data->{ $self->attribute_map->{$_key} } = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ( $self, $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 = substr( $_type, 6, -1 ); - my @_array = (); - foreach my $_element ( @{ $hash->{$_json_attribute} } ) { - push @_array, $self->_deserialize( $_subclass, $_element ); - } - $self->{$_key} = \@_array; - } - elsif ( exists $hash->{$_json_attribute} ) - { #hash(model), primitive, datetime - $self->{$_key} = - $self->_deserialize( $_type, $hash->{$_json_attribute} ); - } - else { - $log->debugf( "Warning: %s (%s) does not exist in input hash\n", - $_key, $_json_attribute ); - } - } - - return $self; -} - -# deserialize non-array data -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' ) ) ) { - return $data; - } - else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - -__PACKAGE__->class_documentation( - { - description => '', - class => 'StringBooleanMap', - required => [], # TODO - } -); - -__PACKAGE__->method_documentation( {} ); - -__PACKAGE__->openapi_types( - { - - } -); - -__PACKAGE__->attribute_map( - { - - } -); - -__PACKAGE__->mk_accessors( keys %{ __PACKAGE__->attribute_map } ); - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm deleted file mode 100644 index 69c427ec07a..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm +++ /dev/null @@ -1,220 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::TypeHolderDefault; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'TypeHolderDefault', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'string_item' => { - datatype => 'string', - base_name => 'string_item', - description => '', - format => '', - read_only => '', - }, - 'number_item' => { - datatype => 'double', - base_name => 'number_item', - description => '', - format => '', - read_only => '', - }, - 'integer_item' => { - datatype => 'int', - base_name => 'integer_item', - description => '', - format => '', - read_only => '', - }, - 'bool_item' => { - datatype => 'boolean', - base_name => 'bool_item', - description => '', - format => '', - read_only => '', - }, - 'array_item' => { - datatype => 'ARRAY[int]', - base_name => 'array_item', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'string_item' => 'string', - 'number_item' => 'double', - 'integer_item' => 'int', - 'bool_item' => 'boolean', - 'array_item' => 'ARRAY[int]' -} ); - -__PACKAGE__->attribute_map( { - 'string_item' => 'string_item', - 'number_item' => 'number_item', - 'integer_item' => 'integer_item', - 'bool_item' => 'bool_item', - 'array_item' => 'array_item' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm deleted file mode 100644 index 4376ad54954..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm +++ /dev/null @@ -1,229 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::TypeHolderExample; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'TypeHolderExample', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'string_item' => { - datatype => 'string', - base_name => 'string_item', - description => '', - format => '', - read_only => '', - }, - 'number_item' => { - datatype => 'double', - base_name => 'number_item', - description => '', - format => '', - read_only => '', - }, - 'float_item' => { - datatype => 'double', - base_name => 'float_item', - description => '', - format => '', - read_only => '', - }, - 'integer_item' => { - datatype => 'int', - base_name => 'integer_item', - description => '', - format => '', - read_only => '', - }, - 'bool_item' => { - datatype => 'boolean', - base_name => 'bool_item', - description => '', - format => '', - read_only => '', - }, - 'array_item' => { - datatype => 'ARRAY[int]', - base_name => 'array_item', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'string_item' => 'string', - 'number_item' => 'double', - 'float_item' => 'double', - 'integer_item' => 'int', - 'bool_item' => 'boolean', - 'array_item' => 'ARRAY[int]' -} ); - -__PACKAGE__->attribute_map( { - 'string_item' => 'string_item', - 'number_item' => 'number_item', - 'float_item' => 'float_item', - 'integer_item' => 'integer_item', - 'bool_item' => 'bool_item', - 'array_item' => 'array_item' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm deleted file mode 100644 index 19523d899f1..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/XmlItem.pm +++ /dev/null @@ -1,436 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::XmlItem; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $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; - 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 { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -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'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'XmlItem', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'attribute_string' => { - datatype => 'string', - base_name => 'attribute_string', - description => '', - format => '', - read_only => '', - }, - 'attribute_number' => { - datatype => 'double', - base_name => 'attribute_number', - description => '', - format => '', - read_only => '', - }, - 'attribute_integer' => { - datatype => 'int', - base_name => 'attribute_integer', - description => '', - format => '', - read_only => '', - }, - 'attribute_boolean' => { - datatype => 'boolean', - base_name => 'attribute_boolean', - description => '', - format => '', - read_only => '', - }, - 'wrapped_array' => { - datatype => 'ARRAY[int]', - base_name => 'wrapped_array', - description => '', - format => '', - read_only => '', - }, - 'name_string' => { - datatype => 'string', - base_name => 'name_string', - description => '', - format => '', - read_only => '', - }, - 'name_number' => { - datatype => 'double', - base_name => 'name_number', - description => '', - format => '', - read_only => '', - }, - 'name_integer' => { - datatype => 'int', - base_name => 'name_integer', - description => '', - format => '', - read_only => '', - }, - 'name_boolean' => { - datatype => 'boolean', - base_name => 'name_boolean', - description => '', - format => '', - read_only => '', - }, - 'name_array' => { - datatype => 'ARRAY[int]', - base_name => 'name_array', - description => '', - format => '', - read_only => '', - }, - 'name_wrapped_array' => { - datatype => 'ARRAY[int]', - base_name => 'name_wrapped_array', - description => '', - format => '', - read_only => '', - }, - 'prefix_string' => { - datatype => 'string', - base_name => 'prefix_string', - description => '', - format => '', - read_only => '', - }, - 'prefix_number' => { - datatype => 'double', - base_name => 'prefix_number', - description => '', - format => '', - read_only => '', - }, - 'prefix_integer' => { - datatype => 'int', - base_name => 'prefix_integer', - description => '', - format => '', - read_only => '', - }, - 'prefix_boolean' => { - datatype => 'boolean', - base_name => 'prefix_boolean', - description => '', - format => '', - read_only => '', - }, - 'prefix_array' => { - datatype => 'ARRAY[int]', - base_name => 'prefix_array', - description => '', - format => '', - read_only => '', - }, - 'prefix_wrapped_array' => { - datatype => 'ARRAY[int]', - base_name => 'prefix_wrapped_array', - description => '', - format => '', - read_only => '', - }, - 'namespace_string' => { - datatype => 'string', - base_name => 'namespace_string', - description => '', - format => '', - read_only => '', - }, - 'namespace_number' => { - datatype => 'double', - base_name => 'namespace_number', - description => '', - format => '', - read_only => '', - }, - 'namespace_integer' => { - datatype => 'int', - base_name => 'namespace_integer', - description => '', - format => '', - read_only => '', - }, - 'namespace_boolean' => { - datatype => 'boolean', - base_name => 'namespace_boolean', - description => '', - format => '', - read_only => '', - }, - 'namespace_array' => { - datatype => 'ARRAY[int]', - base_name => 'namespace_array', - description => '', - format => '', - read_only => '', - }, - 'namespace_wrapped_array' => { - datatype => 'ARRAY[int]', - base_name => 'namespace_wrapped_array', - description => '', - format => '', - read_only => '', - }, - 'prefix_ns_string' => { - datatype => 'string', - base_name => 'prefix_ns_string', - description => '', - format => '', - read_only => '', - }, - 'prefix_ns_number' => { - datatype => 'double', - base_name => 'prefix_ns_number', - description => '', - format => '', - read_only => '', - }, - 'prefix_ns_integer' => { - datatype => 'int', - base_name => 'prefix_ns_integer', - description => '', - format => '', - read_only => '', - }, - 'prefix_ns_boolean' => { - datatype => 'boolean', - base_name => 'prefix_ns_boolean', - description => '', - format => '', - read_only => '', - }, - 'prefix_ns_array' => { - datatype => 'ARRAY[int]', - base_name => 'prefix_ns_array', - description => '', - format => '', - read_only => '', - }, - 'prefix_ns_wrapped_array' => { - datatype => 'ARRAY[int]', - base_name => 'prefix_ns_wrapped_array', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'attribute_string' => 'string', - 'attribute_number' => 'double', - 'attribute_integer' => 'int', - 'attribute_boolean' => 'boolean', - 'wrapped_array' => 'ARRAY[int]', - 'name_string' => 'string', - 'name_number' => 'double', - 'name_integer' => 'int', - 'name_boolean' => 'boolean', - 'name_array' => 'ARRAY[int]', - 'name_wrapped_array' => 'ARRAY[int]', - 'prefix_string' => 'string', - 'prefix_number' => 'double', - 'prefix_integer' => 'int', - 'prefix_boolean' => 'boolean', - 'prefix_array' => 'ARRAY[int]', - 'prefix_wrapped_array' => 'ARRAY[int]', - 'namespace_string' => 'string', - 'namespace_number' => 'double', - 'namespace_integer' => 'int', - 'namespace_boolean' => 'boolean', - 'namespace_array' => 'ARRAY[int]', - 'namespace_wrapped_array' => 'ARRAY[int]', - 'prefix_ns_string' => 'string', - 'prefix_ns_number' => 'double', - 'prefix_ns_integer' => 'int', - 'prefix_ns_boolean' => 'boolean', - 'prefix_ns_array' => 'ARRAY[int]', - 'prefix_ns_wrapped_array' => 'ARRAY[int]' -} ); - -__PACKAGE__->attribute_map( { - 'attribute_string' => 'attribute_string', - 'attribute_number' => 'attribute_number', - 'attribute_integer' => 'attribute_integer', - 'attribute_boolean' => 'attribute_boolean', - 'wrapped_array' => 'wrapped_array', - 'name_string' => 'name_string', - 'name_number' => 'name_number', - 'name_integer' => 'name_integer', - 'name_boolean' => 'name_boolean', - 'name_array' => 'name_array', - 'name_wrapped_array' => 'name_wrapped_array', - 'prefix_string' => 'prefix_string', - 'prefix_number' => 'prefix_number', - 'prefix_integer' => 'prefix_integer', - 'prefix_boolean' => 'prefix_boolean', - 'prefix_array' => 'prefix_array', - 'prefix_wrapped_array' => 'prefix_wrapped_array', - 'namespace_string' => 'namespace_string', - 'namespace_number' => 'namespace_number', - 'namespace_integer' => 'namespace_integer', - 'namespace_boolean' => 'namespace_boolean', - 'namespace_array' => 'namespace_array', - 'namespace_wrapped_array' => 'namespace_wrapped_array', - 'prefix_ns_string' => 'prefix_ns_string', - 'prefix_ns_number' => 'prefix_ns_number', - 'prefix_ns_integer' => 'prefix_ns_integer', - 'prefix_ns_boolean' => 'prefix_ns_boolean', - 'prefix_ns_array' => 'prefix_ns_array', - 'prefix_ns_wrapped_array' => 'prefix_ns_wrapped_array' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1;