Migrate Perl samples to use OAS v3 spec (#6490)

* update perl samples to use oas3

* test perl in travis ci

* fix uri query

* fix comment

* fix bearer token

* fix add pet

* update body to pet
This commit is contained in:
William Cheng 2020-05-30 17:00:22 +08:00 committed by GitHub
parent a47e522fae
commit 1efeb92f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 494 additions and 390 deletions

View File

@ -101,6 +101,9 @@ before_install:
# install Qt5
- sudo apt install -y --no-install-recommends qt5-default
- cmake --version
# perl dep
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Igorned failure from cpanm"
# show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts
# show java version

View File

@ -28,6 +28,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
# complex module name used for testing
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@"
ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -346,9 +346,9 @@ sub update_params_for_auth {
}
{{/isBasicBasic}}
{{#isBasicBearer}}
// this endpoint requires Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authentication (access token)
# this endpoint requires Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authentication (access token)
if ($self->{config}{access_token}) {
$headers['Authorization'] = 'Bearer ' . $self->{config}{access_token};
$header_params->{'Authorization'} = 'Bearer ' . $self->{config}{access_token};
}
{{/isBasicBearer}}
{{/isBasic}}

View File

@ -1181,6 +1181,7 @@
</property>
</activation>
<modules>
<module>samples/client/petstore/perl</module>
<!-- servers -->
<module>samples/server/petstore/python-aiohttp</module>
<module>samples/server/petstore/python-aiohttp-srclayout</module>
@ -1195,7 +1196,6 @@
<module>samples/client/petstore/cpp-qt5</module>
<module>samples/client/petstore/rust</module>
<module>samples/client/petstore/rust/reqwest/petstore</module>
<!--<module>samples/client/petstore/perl</module>-->
<module>samples/client/petstore/php/OpenAPIClient-php</module>
<module>samples/openapi3/client/petstore/php/OpenAPIClient-php</module>
<!--<module>samples/client/petstore/javascript-apollo</module>-->

View File

@ -2,28 +2,20 @@
.travis.yml
README.md
bin/autodoc
docs/AdditionalPropertiesAnyType.md
docs/AdditionalPropertiesArray.md
docs/AdditionalPropertiesBoolean.md
docs/AdditionalPropertiesClass.md
docs/AdditionalPropertiesInteger.md
docs/AdditionalPropertiesNumber.md
docs/AdditionalPropertiesObject.md
docs/AdditionalPropertiesString.md
docs/Animal.md
docs/AnotherFakeApi.md
docs/ApiResponse.md
docs/ArrayOfArrayOfNumberOnly.md
docs/ArrayOfNumberOnly.md
docs/ArrayTest.md
docs/BigCat.md
docs/BigCatAllOf.md
docs/Capitalization.md
docs/Cat.md
docs/CatAllOf.md
docs/Category.md
docs/ClassModel.md
docs/Client.md
docs/DefaultApi.md
docs/Dog.md
docs/DogAllOf.md
docs/EnumArrays.md
@ -33,51 +25,53 @@ docs/FakeApi.md
docs/FakeClassnameTags123Api.md
docs/File.md
docs/FileSchemaTestClass.md
docs/Foo.md
docs/FormatTest.md
docs/HasOnlyReadOnly.md
docs/HealthCheckResult.md
docs/InlineObject.md
docs/InlineObject1.md
docs/InlineObject2.md
docs/InlineObject3.md
docs/InlineObject4.md
docs/InlineObject5.md
docs/InlineResponseDefault.md
docs/List.md
docs/MapTest.md
docs/MixedPropertiesAndAdditionalPropertiesClass.md
docs/Model200Response.md
docs/ModelReturn.md
docs/Name.md
docs/NullableClass.md
docs/NumberOnly.md
docs/Order.md
docs/OuterComposite.md
docs/OuterEnum.md
docs/OuterEnumDefaultValue.md
docs/OuterEnumInteger.md
docs/OuterEnumIntegerDefaultValue.md
docs/Pet.md
docs/PetApi.md
docs/ReadOnlyFirst.md
docs/SpecialModelName.md
docs/StoreApi.md
docs/Tag.md
docs/TypeHolderDefault.md
docs/TypeHolderExample.md
docs/User.md
docs/UserApi.md
docs/XmlItem.md
git_push.sh
lib/WWW/OpenAPIClient/AnotherFakeApi.pm
lib/WWW/OpenAPIClient/ApiClient.pm
lib/WWW/OpenAPIClient/ApiFactory.pm
lib/WWW/OpenAPIClient/Configuration.pm
lib/WWW/OpenAPIClient/DefaultApi.pm
lib/WWW/OpenAPIClient/FakeApi.pm
lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesAnyType.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesArray.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesBoolean.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesInteger.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesNumber.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesObject.pm
lib/WWW/OpenAPIClient/Object/AdditionalPropertiesString.pm
lib/WWW/OpenAPIClient/Object/Animal.pm
lib/WWW/OpenAPIClient/Object/ApiResponse.pm
lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm
lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm
lib/WWW/OpenAPIClient/Object/ArrayTest.pm
lib/WWW/OpenAPIClient/Object/BigCat.pm
lib/WWW/OpenAPIClient/Object/BigCatAllOf.pm
lib/WWW/OpenAPIClient/Object/Capitalization.pm
lib/WWW/OpenAPIClient/Object/Cat.pm
lib/WWW/OpenAPIClient/Object/CatAllOf.pm
@ -91,26 +85,36 @@ lib/WWW/OpenAPIClient/Object/EnumClass.pm
lib/WWW/OpenAPIClient/Object/EnumTest.pm
lib/WWW/OpenAPIClient/Object/File.pm
lib/WWW/OpenAPIClient/Object/FileSchemaTestClass.pm
lib/WWW/OpenAPIClient/Object/Foo.pm
lib/WWW/OpenAPIClient/Object/FormatTest.pm
lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm
lib/WWW/OpenAPIClient/Object/HealthCheckResult.pm
lib/WWW/OpenAPIClient/Object/InlineObject.pm
lib/WWW/OpenAPIClient/Object/InlineObject1.pm
lib/WWW/OpenAPIClient/Object/InlineObject2.pm
lib/WWW/OpenAPIClient/Object/InlineObject3.pm
lib/WWW/OpenAPIClient/Object/InlineObject4.pm
lib/WWW/OpenAPIClient/Object/InlineObject5.pm
lib/WWW/OpenAPIClient/Object/InlineResponseDefault.pm
lib/WWW/OpenAPIClient/Object/List.pm
lib/WWW/OpenAPIClient/Object/MapTest.pm
lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm
lib/WWW/OpenAPIClient/Object/Model200Response.pm
lib/WWW/OpenAPIClient/Object/ModelReturn.pm
lib/WWW/OpenAPIClient/Object/Name.pm
lib/WWW/OpenAPIClient/Object/NullableClass.pm
lib/WWW/OpenAPIClient/Object/NumberOnly.pm
lib/WWW/OpenAPIClient/Object/Order.pm
lib/WWW/OpenAPIClient/Object/OuterComposite.pm
lib/WWW/OpenAPIClient/Object/OuterEnum.pm
lib/WWW/OpenAPIClient/Object/OuterEnumDefaultValue.pm
lib/WWW/OpenAPIClient/Object/OuterEnumInteger.pm
lib/WWW/OpenAPIClient/Object/OuterEnumIntegerDefaultValue.pm
lib/WWW/OpenAPIClient/Object/Pet.pm
lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm
lib/WWW/OpenAPIClient/Object/SpecialModelName.pm
lib/WWW/OpenAPIClient/Object/Tag.pm
lib/WWW/OpenAPIClient/Object/TypeHolderDefault.pm
lib/WWW/OpenAPIClient/Object/TypeHolderExample.pm
lib/WWW/OpenAPIClient/Object/User.pm
lib/WWW/OpenAPIClient/Object/XmlItem.pm
lib/WWW/OpenAPIClient/PetApi.pm
lib/WWW/OpenAPIClient/Role.pm
lib/WWW/OpenAPIClient/Role/AutoDoc.pm

View File

@ -222,6 +222,7 @@ Each of these calls returns a hashref with various useful pieces of information.
To load the API packages:
```perl
use WWW::OpenAPIClient::AnotherFakeApi;
use WWW::OpenAPIClient::DefaultApi;
use WWW::OpenAPIClient::FakeApi;
use WWW::OpenAPIClient::FakeClassnameTags123Api;
use WWW::OpenAPIClient::PetApi;
@ -232,21 +233,12 @@ use WWW::OpenAPIClient::UserApi;
To load the models:
```perl
use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType;
use WWW::OpenAPIClient::Object::AdditionalPropertiesArray;
use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean;
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger;
use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber;
use WWW::OpenAPIClient::Object::AdditionalPropertiesObject;
use WWW::OpenAPIClient::Object::AdditionalPropertiesString;
use WWW::OpenAPIClient::Object::Animal;
use WWW::OpenAPIClient::Object::ApiResponse;
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayTest;
use WWW::OpenAPIClient::Object::BigCat;
use WWW::OpenAPIClient::Object::BigCatAllOf;
use WWW::OpenAPIClient::Object::Capitalization;
use WWW::OpenAPIClient::Object::Cat;
use WWW::OpenAPIClient::Object::CatAllOf;
@ -260,26 +252,36 @@ use WWW::OpenAPIClient::Object::EnumClass;
use WWW::OpenAPIClient::Object::EnumTest;
use WWW::OpenAPIClient::Object::File;
use WWW::OpenAPIClient::Object::FileSchemaTestClass;
use WWW::OpenAPIClient::Object::Foo;
use WWW::OpenAPIClient::Object::FormatTest;
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
use WWW::OpenAPIClient::Object::HealthCheckResult;
use WWW::OpenAPIClient::Object::InlineObject;
use WWW::OpenAPIClient::Object::InlineObject1;
use WWW::OpenAPIClient::Object::InlineObject2;
use WWW::OpenAPIClient::Object::InlineObject3;
use WWW::OpenAPIClient::Object::InlineObject4;
use WWW::OpenAPIClient::Object::InlineObject5;
use WWW::OpenAPIClient::Object::InlineResponseDefault;
use WWW::OpenAPIClient::Object::List;
use WWW::OpenAPIClient::Object::MapTest;
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Model200Response;
use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NullableClass;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
use WWW::OpenAPIClient::Object::OuterEnumInteger;
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
use WWW::OpenAPIClient::Object::Pet;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::SpecialModelName;
use WWW::OpenAPIClient::Object::Tag;
use WWW::OpenAPIClient::Object::TypeHolderDefault;
use WWW::OpenAPIClient::Object::TypeHolderExample;
use WWW::OpenAPIClient::Object::User;
use WWW::OpenAPIClient::Object::XmlItem;
````
@ -292,6 +294,7 @@ use strict;
use warnings;
# load the API package
use WWW::OpenAPIClient::AnotherFakeApi;
use WWW::OpenAPIClient::DefaultApi;
use WWW::OpenAPIClient::FakeApi;
use WWW::OpenAPIClient::FakeClassnameTags123Api;
use WWW::OpenAPIClient::PetApi;
@ -299,21 +302,12 @@ use WWW::OpenAPIClient::StoreApi;
use WWW::OpenAPIClient::UserApi;
# load the models
use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType;
use WWW::OpenAPIClient::Object::AdditionalPropertiesArray;
use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean;
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger;
use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber;
use WWW::OpenAPIClient::Object::AdditionalPropertiesObject;
use WWW::OpenAPIClient::Object::AdditionalPropertiesString;
use WWW::OpenAPIClient::Object::Animal;
use WWW::OpenAPIClient::Object::ApiResponse;
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayTest;
use WWW::OpenAPIClient::Object::BigCat;
use WWW::OpenAPIClient::Object::BigCatAllOf;
use WWW::OpenAPIClient::Object::Capitalization;
use WWW::OpenAPIClient::Object::Cat;
use WWW::OpenAPIClient::Object::CatAllOf;
@ -327,26 +321,36 @@ use WWW::OpenAPIClient::Object::EnumClass;
use WWW::OpenAPIClient::Object::EnumTest;
use WWW::OpenAPIClient::Object::File;
use WWW::OpenAPIClient::Object::FileSchemaTestClass;
use WWW::OpenAPIClient::Object::Foo;
use WWW::OpenAPIClient::Object::FormatTest;
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
use WWW::OpenAPIClient::Object::HealthCheckResult;
use WWW::OpenAPIClient::Object::InlineObject;
use WWW::OpenAPIClient::Object::InlineObject1;
use WWW::OpenAPIClient::Object::InlineObject2;
use WWW::OpenAPIClient::Object::InlineObject3;
use WWW::OpenAPIClient::Object::InlineObject4;
use WWW::OpenAPIClient::Object::InlineObject5;
use WWW::OpenAPIClient::Object::InlineResponseDefault;
use WWW::OpenAPIClient::Object::List;
use WWW::OpenAPIClient::Object::MapTest;
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Model200Response;
use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NullableClass;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
use WWW::OpenAPIClient::Object::OuterEnumInteger;
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
use WWW::OpenAPIClient::Object::Pet;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::SpecialModelName;
use WWW::OpenAPIClient::Object::Tag;
use WWW::OpenAPIClient::Object::TypeHolderDefault;
use WWW::OpenAPIClient::Object::TypeHolderExample;
use WWW::OpenAPIClient::Object::User;
use WWW::OpenAPIClient::Object::XmlItem;
# for displaying the API response data
use Data::Dumper;
@ -355,10 +359,10 @@ use WWW::OpenAPIClient::;
my $api_instance = WWW::OpenAPIClient::->new(
);
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->call_123_test_special_tags(body => $body);
my $result = $api_instance->call_123_test_special_tags(client => $client);
print Dumper($result);
};
if ($@) {
@ -374,7 +378,9 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**fake_http_signature_test**](docs/FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
*FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
@ -382,7 +388,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \&quot;client\&quot; model
*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
*FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
*FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
@ -413,21 +419,12 @@ Class | Method | HTTP request | Description
# DOCUMENTATION FOR MODELS
- [WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
- [WWW::OpenAPIClient::Object::Animal](docs/Animal.md)
- [WWW::OpenAPIClient::Object::ApiResponse](docs/ApiResponse.md)
- [WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [WWW::OpenAPIClient::Object::ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [WWW::OpenAPIClient::Object::ArrayTest](docs/ArrayTest.md)
- [WWW::OpenAPIClient::Object::BigCat](docs/BigCat.md)
- [WWW::OpenAPIClient::Object::BigCatAllOf](docs/BigCatAllOf.md)
- [WWW::OpenAPIClient::Object::Capitalization](docs/Capitalization.md)
- [WWW::OpenAPIClient::Object::Cat](docs/Cat.md)
- [WWW::OpenAPIClient::Object::CatAllOf](docs/CatAllOf.md)
@ -441,26 +438,36 @@ Class | Method | HTTP request | Description
- [WWW::OpenAPIClient::Object::EnumTest](docs/EnumTest.md)
- [WWW::OpenAPIClient::Object::File](docs/File.md)
- [WWW::OpenAPIClient::Object::FileSchemaTestClass](docs/FileSchemaTestClass.md)
- [WWW::OpenAPIClient::Object::Foo](docs/Foo.md)
- [WWW::OpenAPIClient::Object::FormatTest](docs/FormatTest.md)
- [WWW::OpenAPIClient::Object::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [WWW::OpenAPIClient::Object::HealthCheckResult](docs/HealthCheckResult.md)
- [WWW::OpenAPIClient::Object::InlineObject](docs/InlineObject.md)
- [WWW::OpenAPIClient::Object::InlineObject1](docs/InlineObject1.md)
- [WWW::OpenAPIClient::Object::InlineObject2](docs/InlineObject2.md)
- [WWW::OpenAPIClient::Object::InlineObject3](docs/InlineObject3.md)
- [WWW::OpenAPIClient::Object::InlineObject4](docs/InlineObject4.md)
- [WWW::OpenAPIClient::Object::InlineObject5](docs/InlineObject5.md)
- [WWW::OpenAPIClient::Object::InlineResponseDefault](docs/InlineResponseDefault.md)
- [WWW::OpenAPIClient::Object::List](docs/List.md)
- [WWW::OpenAPIClient::Object::MapTest](docs/MapTest.md)
- [WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [WWW::OpenAPIClient::Object::Model200Response](docs/Model200Response.md)
- [WWW::OpenAPIClient::Object::ModelReturn](docs/ModelReturn.md)
- [WWW::OpenAPIClient::Object::Name](docs/Name.md)
- [WWW::OpenAPIClient::Object::NullableClass](docs/NullableClass.md)
- [WWW::OpenAPIClient::Object::NumberOnly](docs/NumberOnly.md)
- [WWW::OpenAPIClient::Object::Order](docs/Order.md)
- [WWW::OpenAPIClient::Object::OuterComposite](docs/OuterComposite.md)
- [WWW::OpenAPIClient::Object::OuterEnum](docs/OuterEnum.md)
- [WWW::OpenAPIClient::Object::OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
- [WWW::OpenAPIClient::Object::OuterEnumInteger](docs/OuterEnumInteger.md)
- [WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
- [WWW::OpenAPIClient::Object::Pet](docs/Pet.md)
- [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [WWW::OpenAPIClient::Object::SpecialModelName](docs/SpecialModelName.md)
- [WWW::OpenAPIClient::Object::Tag](docs/Tag.md)
- [WWW::OpenAPIClient::Object::TypeHolderDefault](docs/TypeHolderDefault.md)
- [WWW::OpenAPIClient::Object::TypeHolderExample](docs/TypeHolderExample.md)
- [WWW::OpenAPIClient::Object::User](docs/User.md)
- [WWW::OpenAPIClient::Object::XmlItem](docs/XmlItem.md)
# DOCUMENTATION FOR AUTHORIZATION
@ -477,10 +484,18 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key_query
- **Location**: URL query string
## bearer_test
- **Type**: HTTP basic authentication
## http_basic_test
- **Type**: HTTP basic authentication
## http_signature_test
- **Type**: HTTP basic authentication
## petstore_auth
- **Type**: OAuth

View File

@ -8,17 +8,8 @@ use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_string** | **HASH[string,string]** | | [optional]
**map_number** | **HASH[string,double]** | | [optional]
**map_integer** | **HASH[string,int]** | | [optional]
**map_boolean** | **HASH[string,boolean]** | | [optional]
**map_array_integer** | **HASH[string,ARRAY[int]]** | | [optional]
**map_array_anytype** | **HASH[string,ARRAY[object]]** | | [optional]
**map_map_string** | **HASH[string,HASH[string,string]]** | | [optional]
**map_map_anytype** | **HASH[string,HASH[string,object]]** | | [optional]
**anytype_1** | **object** | | [optional]
**anytype_2** | **object** | | [optional]
**anytype_3** | **object** | | [optional]
**map_property** | **HASH[string,string]** | | [optional]
**map_of_map_property** | **HASH[string,HASH[string,string]]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

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

View File

@ -13,6 +13,9 @@ Name | Type | Description | Notes
**enum_integer** | **int** | | [optional]
**enum_number** | **double** | | [optional]
**outer_enum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**outer_enum_integer** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
**outer_enum_default_value** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
**outer_enum_integer_default_value** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -9,7 +9,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
[**fake_http_signature_test**](FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
[**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
[**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
@ -17,7 +18,7 @@ Method | HTTP request | Description
[**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \&quot;client\&quot; model
[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
[**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
@ -25,12 +26,10 @@ Method | HTTP request | Description
[**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-paramters |
# **create_xml_item**
> create_xml_item(xml_item => $xml_item)
# **fake_health_get**
> HealthCheckResult fake_health_get()
creates an XmlItem
this route creates an XmlItem
Health check endpoint
### Example
```perl
@ -39,25 +38,22 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $xml_item = WWW::OpenAPIClient::Object::XmlItem->new(); # XmlItem | XmlItem Body
eval {
$api_instance->create_xml_item(xml_item => $xml_item);
my $result = $api_instance->fake_health_get();
print Dumper($result);
};
if ($@) {
warn "Exception when calling FakeApi->create_xml_item: $@\n";
warn "Exception when calling FakeApi->fake_health_get: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body |
This endpoint does not need any parameter.
### Return type
void (empty response body)
[**HealthCheckResult**](HealthCheckResult.md)
### Authorization
@ -65,7 +61,57 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **fake_http_signature_test**
> fake_http_signature_test(pet => $pet, query_1 => $query_1, header_1 => $header_1)
test http signature authentication
### Example
```perl
use Data::Dumper;
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
# Configure HTTP basic authorization: http_signature_test
);
my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
my $query_1 = "query_1_example"; # string | query parameter
my $header_1 = "header_1_example"; # string | header parameter
eval {
$api_instance->fake_http_signature_test(pet => $pet, query_1 => $query_1, header_1 => $header_1);
};
if ($@) {
warn "Exception when calling FakeApi->fake_http_signature_test: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**query_1** | **string**| query parameter | [optional]
**header_1** | **string**| header parameter | [optional]
### Return type
void (empty response body)
### Authorization
[http_signature_test](../README.md#http_signature_test)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -111,13 +157,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **fake_outer_composite_serialize**
> OuterComposite fake_outer_composite_serialize(body => $body)
> OuterComposite fake_outer_composite_serialize(outer_composite => $outer_composite)
@ -130,10 +176,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $body = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
eval {
my $result = $api_instance->fake_outer_composite_serialize(body => $body);
my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite);
print Dumper($result);
};
if ($@) {
@ -145,7 +191,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@ -157,7 +203,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -203,7 +249,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -249,13 +295,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_body_with_file_schema**
> test_body_with_file_schema(body => $body)
> test_body_with_file_schema(file_schema_test_class => $file_schema_test_class)
@ -268,10 +314,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $body = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass |
my $file_schema_test_class = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass |
eval {
$api_instance->test_body_with_file_schema(body => $body);
$api_instance->test_body_with_file_schema(file_schema_test_class => $file_schema_test_class);
};
if ($@) {
warn "Exception when calling FakeApi->test_body_with_file_schema: $@\n";
@ -282,7 +328,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@ -300,7 +346,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_body_with_query_params**
> test_body_with_query_params(query => $query, body => $body)
> test_body_with_query_params(query => $query, user => $user)
@ -312,10 +358,10 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $query = "query_example"; # string |
my $body = WWW::OpenAPIClient::Object::User->new(); # User |
my $user = WWW::OpenAPIClient::Object::User->new(); # User |
eval {
$api_instance->test_body_with_query_params(query => $query, body => $body);
$api_instance->test_body_with_query_params(query => $query, user => $user);
};
if ($@) {
warn "Exception when calling FakeApi->test_body_with_query_params: $@\n";
@ -327,7 +373,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **string**| |
**body** | [**User**](User.md)| |
**user** | [**User**](User.md)| |
### Return type
@ -345,7 +391,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_client_model**
> Client test_client_model(body => $body)
> Client test_client_model(client => $client)
To test \"client\" model
@ -358,10 +404,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->test_client_model(body => $body);
my $result = $api_instance->test_client_model(client => $client);
print Dumper($result);
};
if ($@) {
@ -373,7 +419,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](Client.md)| client model |
### Return type
@ -393,9 +439,9 @@ No authorization required
# **test_endpoint_parameters**
> test_endpoint_parameters(number => $number, double => $double, pattern_without_delimiter => $pattern_without_delimiter, byte => $byte, integer => $integer, int32 => $int32, int64 => $int64, float => $float, string => $string, binary => $binary, date => $date, date_time => $date_time, password => $password, callback => $callback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
### Example
```perl
@ -537,6 +583,11 @@ Fake endpoint to test group parameters (optional)
use Data::Dumper;
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
# Configure HTTP basic authorization: bearer_test
# Configure bearer access token for authorization: bearer_test
access_token => 'YOUR_BEARER_TOKEN',
);
my $required_string_group = 56; # int | Required String in group parameters
@ -571,7 +622,7 @@ void (empty response body)
### Authorization
No authorization required
[bearer_test](../README.md#bearer_test)
### HTTP request headers
@ -581,7 +632,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_inline_additional_properties**
> test_inline_additional_properties(param => $param)
> test_inline_additional_properties(request_body => $request_body)
test inline additionalProperties
@ -592,10 +643,10 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $param = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body
my $request_body = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body
eval {
$api_instance->test_inline_additional_properties(param => $param);
$api_instance->test_inline_additional_properties(request_body => $request_body);
};
if ($@) {
warn "Exception when calling FakeApi->test_inline_additional_properties: $@\n";
@ -606,7 +657,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**param** | [**HASH[string,string]**](string.md)| request body |
**request_body** | [**HASH[string,string]**](string.md)| request body |
### Return type

View File

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

View File

@ -21,7 +21,8 @@ Name | Type | Description | Notes
**date_time** | **DateTime** | | [optional]
**uuid** | **string** | | [optional]
**password** | **string** | |
**big_decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
**pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**pattern_with_digits_and_delimiter** | **string** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

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

View File

@ -154,7 +154,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **place_order**
> Order place_order(body => $body)
> Order place_order(order => $order)
Place an order for a pet
@ -165,10 +165,10 @@ use WWW::OpenAPIClient::StoreApi;
my $api_instance = WWW::OpenAPIClient::StoreApi->new(
);
my $body = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet
my $order = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet
eval {
my $result = $api_instance->place_order(body => $body);
my $result = $api_instance->place_order(order => $order);
print Dumper($result);
};
if ($@) {
@ -180,7 +180,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@ -192,7 +192,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -20,7 +20,7 @@ Method | HTTP request | Description
# **create_user**
> create_user(body => $body)
> create_user(user => $user)
Create user
@ -33,10 +33,10 @@ use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $body = WWW::OpenAPIClient::Object::User->new(); # User | Created user object
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object
eval {
$api_instance->create_user(body => $body);
$api_instance->create_user(user => $user);
};
if ($@) {
warn "Exception when calling UserApi->create_user: $@\n";
@ -47,7 +47,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@ -59,13 +59,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_array_input**
> create_users_with_array_input(body => $body)
> create_users_with_array_input(user => $user)
Creates list of users with given input array
@ -76,10 +76,10 @@ use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
$api_instance->create_users_with_array_input(body => $body);
$api_instance->create_users_with_array_input(user => $user);
};
if ($@) {
warn "Exception when calling UserApi->create_users_with_array_input: $@\n";
@ -90,7 +90,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**ARRAY[User]**](User.md)| List of user object |
**user** | [**ARRAY[User]**](User.md)| List of user object |
### Return type
@ -102,13 +102,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_list_input**
> create_users_with_list_input(body => $body)
> create_users_with_list_input(user => $user)
Creates list of users with given input array
@ -119,10 +119,10 @@ use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
$api_instance->create_users_with_list_input(body => $body);
$api_instance->create_users_with_list_input(user => $user);
};
if ($@) {
warn "Exception when calling UserApi->create_users_with_list_input: $@\n";
@ -133,7 +133,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**ARRAY[User]**](User.md)| List of user object |
**user** | [**ARRAY[User]**](User.md)| List of user object |
### Return type
@ -145,7 +145,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -325,7 +325,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_user**
> update_user(username => $username, body => $body)
> update_user(username => $username, user => $user)
Updated user
@ -339,10 +339,10 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $username = "username_example"; # string | name that need to be deleted
my $body = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object
eval {
$api_instance->update_user(username => $username, body => $body);
$api_instance->update_user(username => $username, user => $user);
};
if ($@) {
warn "Exception when calling UserApi->update_user: $@\n";
@ -354,7 +354,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@ -366,7 +366,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

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

View File

@ -348,11 +348,19 @@ sub update_params_for_auth {
$query_params->{'api_key_query'} = $api_key;
}
}
elsif ($auth eq 'bearer_test') {
# this endpoint requires Bearer (JWT) authentication (access token)
if ($self->{config}{access_token}) {
$header_params->{'Authorization'} = 'Bearer ' . $self->{config}{access_token};
}
}
elsif ($auth eq 'http_basic_test') {
if ($self->{config}{username} || $self->{config}{password}) {
$header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password});
}
}
elsif ($auth eq 'http_signature_test') {
}
elsif ($auth eq 'petstore_auth') {
if ($self->{config}{access_token}) {
$header_params->{'Authorization'} = 'Bearer ' . $self->{config}{access_token};

View File

@ -49,39 +49,100 @@ sub new {
#
# create_xml_item
# fake_health_get
#
# creates an XmlItem
# Health check endpoint
#
# @param XmlItem $xml_item XmlItem Body (required)
{
my $params = {
'xml_item' => {
data_type => 'XmlItem',
description => 'XmlItem Body',
};
__PACKAGE__->method_documentation->{ 'fake_health_get' } = {
summary => 'Health check endpoint',
params => $params,
returns => 'HealthCheckResult',
};
}
# @return HealthCheckResult
#
sub fake_health_get {
my ($self, %args) = @_;
# parse inputs
my $_resource_path = '/fake/health';
my $_method = 'GET';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
my $_body_data;
# authentication setting, if any
my $auth_settings = [qw()];
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('HealthCheckResult', $response);
return $_response_object;
}
#
# fake_http_signature_test
#
# test http signature authentication
#
# @param Pet $pet Pet object that needs to be added to the store (required)
# @param string $query_1 query parameter (optional)
# @param string $header_1 header parameter (optional)
{
my $params = {
'pet' => {
data_type => 'Pet',
description => 'Pet object that needs to be added to the store',
required => '1',
},
'query_1' => {
data_type => 'string',
description => 'query parameter',
required => '0',
},
'header_1' => {
data_type => 'string',
description => 'header parameter',
required => '0',
},
};
__PACKAGE__->method_documentation->{ 'create_xml_item' } = {
summary => 'creates an XmlItem',
__PACKAGE__->method_documentation->{ 'fake_http_signature_test' } = {
summary => 'test http signature authentication',
params => $params,
returns => undef,
};
}
# @return void
#
sub create_xml_item {
sub fake_http_signature_test {
my ($self, %args) = @_;
# verify the required parameter 'xml_item' is set
unless (exists $args{'xml_item'}) {
croak("Missing the required parameter 'xml_item' when calling create_xml_item");
# verify the required parameter 'pet' is set
unless (exists $args{'pet'}) {
croak("Missing the required parameter 'pet' when calling fake_http_signature_test");
}
# parse inputs
my $_resource_path = '/fake/create_xml_item';
my $_resource_path = '/fake/http-signature-test';
my $_method = 'POST';
my $_method = 'GET';
my $query_params = {};
my $header_params = {};
my $form_params = {};
@ -91,16 +152,26 @@ sub create_xml_item {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16');
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', 'application/xml');
# query params
if ( exists $args{'query_1'}) {
$query_params->{'query_1'} = $self->{api_client}->to_query_value($args{'query_1'});
}
# header params
if ( exists $args{'header_1'}) {
$header_params->{'header_1'} = $self->{api_client}->to_header_value($args{'header_1'});
}
my $_body_data;
# body params
if ( exists $args{'xml_item'}) {
$_body_data = $args{'xml_item'};
if ( exists $args{'pet'}) {
$_body_data = $args{'pet'};
}
# authentication setting, if any
my $auth_settings = [qw()];
my $auth_settings = [qw(http_signature_test )];
# make the API Call
$self->{api_client}->call_api($_resource_path, $_method,
@ -147,7 +218,7 @@ sub fake_outer_boolean_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
my $_body_data;
# body params
@ -174,10 +245,10 @@ sub fake_outer_boolean_serialize {
#
#
#
# @param OuterComposite $body Input composite as post body (optional)
# @param OuterComposite $outer_composite Input composite as post body (optional)
{
my $params = {
'body' => {
'outer_composite' => {
data_type => 'OuterComposite',
description => 'Input composite as post body',
required => '0',
@ -207,12 +278,12 @@ sub fake_outer_composite_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
my $_body_data;
# body params
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
if ( exists $args{'outer_composite'}) {
$_body_data = $args{'outer_composite'};
}
# authentication setting, if any
@ -267,7 +338,7 @@ sub fake_outer_number_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
my $_body_data;
# body params
@ -327,7 +398,7 @@ sub fake_outer_string_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
my $_body_data;
# body params
@ -354,10 +425,10 @@ sub fake_outer_string_serialize {
#
#
#
# @param FileSchemaTestClass $body (required)
# @param FileSchemaTestClass $file_schema_test_class (required)
{
my $params = {
'body' => {
'file_schema_test_class' => {
data_type => 'FileSchemaTestClass',
description => '',
required => '1',
@ -374,9 +445,9 @@ sub fake_outer_string_serialize {
sub test_body_with_file_schema {
my ($self, %args) = @_;
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling test_body_with_file_schema");
# verify the required parameter 'file_schema_test_class' is set
unless (exists $args{'file_schema_test_class'}) {
croak("Missing the required parameter 'file_schema_test_class' when calling test_body_with_file_schema");
}
# parse inputs
@ -396,8 +467,8 @@ sub test_body_with_file_schema {
my $_body_data;
# body params
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
if ( exists $args{'file_schema_test_class'}) {
$_body_data = $args{'file_schema_test_class'};
}
# authentication setting, if any
@ -416,7 +487,7 @@ sub test_body_with_file_schema {
#
#
# @param string $query (required)
# @param User $body (required)
# @param User $user (required)
{
my $params = {
'query' => {
@ -424,7 +495,7 @@ sub test_body_with_file_schema {
description => '',
required => '1',
},
'body' => {
'user' => {
data_type => 'User',
description => '',
required => '1',
@ -446,9 +517,9 @@ sub test_body_with_query_params {
croak("Missing the required parameter 'query' when calling test_body_with_query_params");
}
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling test_body_with_query_params");
# verify the required parameter 'user' is set
unless (exists $args{'user'}) {
croak("Missing the required parameter 'user' when calling test_body_with_query_params");
}
# parse inputs
@ -473,8 +544,8 @@ sub test_body_with_query_params {
my $_body_data;
# body params
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
if ( exists $args{'user'}) {
$_body_data = $args{'user'};
}
# authentication setting, if any
@ -492,10 +563,10 @@ sub test_body_with_query_params {
#
# To test \"client\" model
#
# @param Client $body client model (required)
# @param Client $client client model (required)
{
my $params = {
'body' => {
'client' => {
data_type => 'Client',
description => 'client model',
required => '1',
@ -512,9 +583,9 @@ sub test_body_with_query_params {
sub test_client_model {
my ($self, %args) = @_;
# verify the required parameter 'body' is set
unless (exists $args{'body'}) {
croak("Missing the required parameter 'body' when calling test_client_model");
# verify the required parameter 'client' is set
unless (exists $args{'client'}) {
croak("Missing the required parameter 'client' when calling test_client_model");
}
# parse inputs
@ -534,8 +605,8 @@ sub test_client_model {
my $_body_data;
# body params
if ( exists $args{'body'}) {
$_body_data = $args{'body'};
if ( exists $args{'client'}) {
$_body_data = $args{'client'};
}
# authentication setting, if any
@ -555,7 +626,7 @@ sub test_client_model {
#
# test_endpoint_parameters
#
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
#
# @param double $number None (required)
# @param double $double None (required)
@ -645,7 +716,7 @@ sub test_client_model {
},
};
__PACKAGE__->method_documentation->{ 'test_endpoint_parameters' } = {
summary => 'Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트',
summary => 'Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ',
params => $params,
returns => undef,
};
@ -1022,7 +1093,7 @@ sub test_group_parameters {
my $_body_data;
# authentication setting, if any
my $auth_settings = [qw()];
my $auth_settings = [qw(bearer_test )];
# make the API Call
$self->{api_client}->call_api($_resource_path, $_method,
@ -1036,10 +1107,10 @@ sub test_group_parameters {
#
# test inline additionalProperties
#
# @param HASH[string,string] $param request body (required)
# @param HASH[string,string] $request_body request body (required)
{
my $params = {
'param' => {
'request_body' => {
data_type => 'HASH[string,string]',
description => 'request body',
required => '1',
@ -1056,9 +1127,9 @@ sub test_group_parameters {
sub test_inline_additional_properties {
my ($self, %args) = @_;
# verify the required parameter 'param' is set
unless (exists $args{'param'}) {
croak("Missing the required parameter 'param' when calling test_inline_additional_properties");
# verify the required parameter 'request_body' is set
unless (exists $args{'request_body'}) {
croak("Missing the required parameter 'request_body' when calling test_inline_additional_properties");
}
# parse inputs
@ -1078,8 +1149,8 @@ sub test_inline_additional_properties {
my $_body_data;
# body params
if ( exists $args{'param'}) {
$_body_data = $args{'param'};
if ( exists $args{'request_body'}) {
$_body_data = $args{'request_body'};
}
# authentication setting, if any

View File

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

View File

@ -161,79 +161,16 @@ __PACKAGE__->class_documentation({description => '',
} );
__PACKAGE__->method_documentation({
'map_string' => {
'map_property' => {
datatype => 'HASH[string,string]',
base_name => 'map_string',
base_name => 'map_property',
description => '',
format => '',
read_only => '',
},
'map_number' => {
datatype => 'HASH[string,double]',
base_name => 'map_number',
description => '',
format => '',
read_only => '',
},
'map_integer' => {
datatype => 'HASH[string,int]',
base_name => 'map_integer',
description => '',
format => '',
read_only => '',
},
'map_boolean' => {
datatype => 'HASH[string,boolean]',
base_name => 'map_boolean',
description => '',
format => '',
read_only => '',
},
'map_array_integer' => {
datatype => 'HASH[string,ARRAY[int]]',
base_name => 'map_array_integer',
description => '',
format => '',
read_only => '',
},
'map_array_anytype' => {
datatype => 'HASH[string,ARRAY[object]]',
base_name => 'map_array_anytype',
description => '',
format => '',
read_only => '',
},
'map_map_string' => {
'map_of_map_property' => {
datatype => 'HASH[string,HASH[string,string]]',
base_name => 'map_map_string',
description => '',
format => '',
read_only => '',
},
'map_map_anytype' => {
datatype => 'HASH[string,HASH[string,object]]',
base_name => 'map_map_anytype',
description => '',
format => '',
read_only => '',
},
'anytype_1' => {
datatype => 'object',
base_name => 'anytype_1',
description => '',
format => '',
read_only => '',
},
'anytype_2' => {
datatype => 'object',
base_name => 'anytype_2',
description => '',
format => '',
read_only => '',
},
'anytype_3' => {
datatype => 'object',
base_name => 'anytype_3',
base_name => 'map_of_map_property',
description => '',
format => '',
read_only => '',
@ -241,31 +178,13 @@ __PACKAGE__->method_documentation({
});
__PACKAGE__->openapi_types( {
'map_string' => 'HASH[string,string]',
'map_number' => 'HASH[string,double]',
'map_integer' => 'HASH[string,int]',
'map_boolean' => 'HASH[string,boolean]',
'map_array_integer' => 'HASH[string,ARRAY[int]]',
'map_array_anytype' => 'HASH[string,ARRAY[object]]',
'map_map_string' => 'HASH[string,HASH[string,string]]',
'map_map_anytype' => 'HASH[string,HASH[string,object]]',
'anytype_1' => 'object',
'anytype_2' => 'object',
'anytype_3' => 'object'
'map_property' => 'HASH[string,string]',
'map_of_map_property' => 'HASH[string,HASH[string,string]]'
} );
__PACKAGE__->attribute_map( {
'map_string' => 'map_string',
'map_number' => 'map_number',
'map_integer' => 'map_integer',
'map_boolean' => 'map_boolean',
'map_array_integer' => 'map_array_integer',
'map_array_anytype' => 'map_array_anytype',
'map_map_string' => 'map_map_string',
'map_map_anytype' => 'map_map_anytype',
'anytype_1' => 'anytype_1',
'anytype_2' => 'anytype_2',
'anytype_3' => 'anytype_3'
'map_property' => 'map_property',
'map_of_map_property' => 'map_of_map_property'
} );
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});

View File

@ -31,6 +31,9 @@ use Date::Parse;
use DateTime;
use WWW::OpenAPIClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
use WWW::OpenAPIClient::Object::OuterEnumInteger;
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -197,6 +200,27 @@ __PACKAGE__->method_documentation({
format => '',
read_only => '',
},
'outer_enum_integer' => {
datatype => 'OuterEnumInteger',
base_name => 'outerEnumInteger',
description => '',
format => '',
read_only => '',
},
'outer_enum_default_value' => {
datatype => 'OuterEnumDefaultValue',
base_name => 'outerEnumDefaultValue',
description => '',
format => '',
read_only => '',
},
'outer_enum_integer_default_value' => {
datatype => 'OuterEnumIntegerDefaultValue',
base_name => 'outerEnumIntegerDefaultValue',
description => '',
format => '',
read_only => '',
},
});
__PACKAGE__->openapi_types( {
@ -204,7 +228,10 @@ __PACKAGE__->openapi_types( {
'enum_string_required' => 'string',
'enum_integer' => 'int',
'enum_number' => 'double',
'outer_enum' => 'OuterEnum'
'outer_enum' => 'OuterEnum',
'outer_enum_integer' => 'OuterEnumInteger',
'outer_enum_default_value' => 'OuterEnumDefaultValue',
'outer_enum_integer_default_value' => 'OuterEnumIntegerDefaultValue'
} );
__PACKAGE__->attribute_map( {
@ -212,7 +239,10 @@ __PACKAGE__->attribute_map( {
'enum_string_required' => 'enum_string_required',
'enum_integer' => 'enum_integer',
'enum_number' => 'enum_number',
'outer_enum' => 'outerEnum'
'outer_enum' => 'outerEnum',
'outer_enum_integer' => 'outerEnumInteger',
'outer_enum_default_value' => 'outerEnumDefaultValue',
'outer_enum_integer_default_value' => 'outerEnumIntegerDefaultValue'
} );
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});

View File

@ -30,7 +30,6 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::OpenAPIClient::Object::BigDecimal;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -253,10 +252,17 @@ __PACKAGE__->method_documentation({
format => '',
read_only => '',
},
'big_decimal' => {
datatype => 'BigDecimal',
base_name => 'BigDecimal',
description => '',
'pattern_with_digits' => {
datatype => 'string',
base_name => 'pattern_with_digits',
description => 'A string that is a 10 digit number. Can have leading zeros.',
format => '',
read_only => '',
},
'pattern_with_digits_and_delimiter' => {
datatype => 'string',
base_name => 'pattern_with_digits_and_delimiter',
description => 'A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01.',
format => '',
read_only => '',
},
@ -276,7 +282,8 @@ __PACKAGE__->openapi_types( {
'date_time' => 'DateTime',
'uuid' => 'string',
'password' => 'string',
'big_decimal' => 'BigDecimal'
'pattern_with_digits' => 'string',
'pattern_with_digits_and_delimiter' => 'string'
} );
__PACKAGE__->attribute_map( {
@ -293,7 +300,8 @@ __PACKAGE__->attribute_map( {
'date_time' => 'dateTime',
'uuid' => 'uuid',
'password' => 'password',
'big_decimal' => 'BigDecimal'
'pattern_with_digits' => 'pattern_with_digits',
'pattern_with_digits_and_delimiter' => 'pattern_with_digits_and_delimiter'
} );
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});

View File

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

View File

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

View File

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

View File

@ -50,7 +50,7 @@ is $pet_hash->{category}->{name}, 'perl', 'get the proper category name';
is $pet_hash->{tags}[0]->{name}, 'just kidding', 'get the proper tag name';
is $pet_hash->{tags}[0]->{id}, '11', 'get the proper tag id';
my $add_pet = $api->add_pet(body => $pet);
my $add_pet = $api->add_pet(pet => $pet);
my $get_pet = $api->get_pet_by_id(pet_id => $pet_id);
my $get_pet_hash = $get_pet->to_hash;

View File

@ -37,7 +37,7 @@ is $pet->tags->[0]->name, 'just kidding', 'got the proper tag name';
is $pet->tags->[0]->id, '11', 'got the proper tag id';
my $add_pet = $pet_api->add_pet(body => $pet);
my $add_pet = $pet_api->add_pet(pet => $pet);
my $get_pet = $pet_api->get_pet_by_id(pet_id => $pet_id);
is $get_pet->id, '10008', 'stored and retrieved: got the proper pet id';

View File

@ -36,7 +36,7 @@ is $pet->tags->[0]->name, 'just kidding', 'got the proper tag name';
is $pet->tags->[0]->id, '11', 'got the proper tag id';
my $add_pet = $api->add_pet(body => $pet);
my $add_pet = $api->add_pet(pet => $pet);
my $get_pet = $api->get_pet_by_id(pet_id => $pet_id);
is $get_pet->id, '10008', 'stored and retrieved: got the proper pet id';