mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
Perl: Basic bearer auth support (#3192)
* bearer token support * [generator] running scripts
This commit is contained in:
parent
46c18ad4dd
commit
0e2eed6892
@ -340,9 +340,17 @@ sub update_params_for_auth {
|
||||
{{/isKeyInQuery}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}
|
||||
{{^isBasicBearer}}
|
||||
if ($self->{config}{username} || $self->{config}{password}) {
|
||||
$header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password});
|
||||
}
|
||||
{{/isBasicBearer}}
|
||||
{{#isBasicBearer}}
|
||||
// this endpoint requires Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authentication (access token)
|
||||
if ($self->{config}{access_token}) {
|
||||
$headers['Authorization'] = 'Bearer ' . $self->{config}{access_token};
|
||||
}
|
||||
{{/isBasicBearer}}
|
||||
{{/isBasic}}
|
||||
{{#isOAuth}}
|
||||
if ($self->{config}{access_token}) {
|
||||
|
@ -29,8 +29,15 @@ use {{moduleName}}::{{classname}};
|
||||
my $api_instance = {{moduleName}}::{{classname}}->new(
|
||||
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
||||
# Configure HTTP basic authorization: {{{name}}}
|
||||
{{^isBasicBearer}}
|
||||
username => 'YOUR_USERNAME',
|
||||
password => 'YOUR_PASSWORD',{{/isBasic}}{{#isApiKey}}
|
||||
password => 'YOUR_PASSWORD',
|
||||
{{/isBasicBearer}}
|
||||
{{#isBasicBearer}}
|
||||
# Configure bearer access token for authorization: {{{name}}}
|
||||
access_token => 'YOUR_BEARER_TOKEN',
|
||||
{{/isBasicBearer}}
|
||||
{{/isBasic}}{{#isApiKey}}
|
||||
# Configure API key authorization: {{{name}}}
|
||||
api_key => {'{{{keyParamName}}}' => 'YOUR_API_KEY'},
|
||||
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
|
@ -222,6 +222,7 @@ Each of these calls returns a hashref with various useful pieces of information.
|
||||
To load the API packages:
|
||||
```perl
|
||||
use WWW::OpenAPIClient::AnotherFakeApi;
|
||||
use WWW::OpenAPIClient::DefaultApi;
|
||||
use WWW::OpenAPIClient::FakeApi;
|
||||
use WWW::OpenAPIClient::FakeClassnameTags123Api;
|
||||
use WWW::OpenAPIClient::PetApi;
|
||||
@ -232,14 +233,7 @@ use WWW::OpenAPIClient::UserApi;
|
||||
|
||||
To load the models:
|
||||
```perl
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesArray;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesObject;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesString;
|
||||
use WWW::OpenAPIClient::Object::Animal;
|
||||
use WWW::OpenAPIClient::Object::ApiResponse;
|
||||
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
|
||||
@ -256,26 +250,36 @@ use WWW::OpenAPIClient::Object::EnumClass;
|
||||
use WWW::OpenAPIClient::Object::EnumTest;
|
||||
use WWW::OpenAPIClient::Object::File;
|
||||
use WWW::OpenAPIClient::Object::FileSchemaTestClass;
|
||||
use WWW::OpenAPIClient::Object::Foo;
|
||||
use WWW::OpenAPIClient::Object::FormatTest;
|
||||
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
|
||||
use WWW::OpenAPIClient::Object::HealthCheckResult;
|
||||
use WWW::OpenAPIClient::Object::InlineObject;
|
||||
use WWW::OpenAPIClient::Object::InlineObject1;
|
||||
use WWW::OpenAPIClient::Object::InlineObject2;
|
||||
use WWW::OpenAPIClient::Object::InlineObject3;
|
||||
use WWW::OpenAPIClient::Object::InlineObject4;
|
||||
use WWW::OpenAPIClient::Object::InlineObject5;
|
||||
use WWW::OpenAPIClient::Object::InlineResponseDefault;
|
||||
use WWW::OpenAPIClient::Object::List;
|
||||
use WWW::OpenAPIClient::Object::MapTest;
|
||||
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
|
||||
use WWW::OpenAPIClient::Object::Model200Response;
|
||||
use WWW::OpenAPIClient::Object::ModelReturn;
|
||||
use WWW::OpenAPIClient::Object::Name;
|
||||
use WWW::OpenAPIClient::Object::NullableClass;
|
||||
use WWW::OpenAPIClient::Object::NumberOnly;
|
||||
use WWW::OpenAPIClient::Object::Order;
|
||||
use WWW::OpenAPIClient::Object::OuterComposite;
|
||||
use WWW::OpenAPIClient::Object::OuterEnum;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumInteger;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
|
||||
use WWW::OpenAPIClient::Object::Pet;
|
||||
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
|
||||
use WWW::OpenAPIClient::Object::SpecialModelName;
|
||||
use WWW::OpenAPIClient::Object::Tag;
|
||||
use WWW::OpenAPIClient::Object::TypeHolderDefault;
|
||||
use WWW::OpenAPIClient::Object::TypeHolderExample;
|
||||
use WWW::OpenAPIClient::Object::User;
|
||||
use WWW::OpenAPIClient::Object::XmlItem;
|
||||
|
||||
````
|
||||
|
||||
@ -288,6 +292,7 @@ use strict;
|
||||
use warnings;
|
||||
# load the API package
|
||||
use WWW::OpenAPIClient::AnotherFakeApi;
|
||||
use WWW::OpenAPIClient::DefaultApi;
|
||||
use WWW::OpenAPIClient::FakeApi;
|
||||
use WWW::OpenAPIClient::FakeClassnameTags123Api;
|
||||
use WWW::OpenAPIClient::PetApi;
|
||||
@ -295,14 +300,7 @@ use WWW::OpenAPIClient::StoreApi;
|
||||
use WWW::OpenAPIClient::UserApi;
|
||||
|
||||
# load the models
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesArray;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesInteger;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesNumber;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesObject;
|
||||
use WWW::OpenAPIClient::Object::AdditionalPropertiesString;
|
||||
use WWW::OpenAPIClient::Object::Animal;
|
||||
use WWW::OpenAPIClient::Object::ApiResponse;
|
||||
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
|
||||
@ -319,26 +317,36 @@ use WWW::OpenAPIClient::Object::EnumClass;
|
||||
use WWW::OpenAPIClient::Object::EnumTest;
|
||||
use WWW::OpenAPIClient::Object::File;
|
||||
use WWW::OpenAPIClient::Object::FileSchemaTestClass;
|
||||
use WWW::OpenAPIClient::Object::Foo;
|
||||
use WWW::OpenAPIClient::Object::FormatTest;
|
||||
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
|
||||
use WWW::OpenAPIClient::Object::HealthCheckResult;
|
||||
use WWW::OpenAPIClient::Object::InlineObject;
|
||||
use WWW::OpenAPIClient::Object::InlineObject1;
|
||||
use WWW::OpenAPIClient::Object::InlineObject2;
|
||||
use WWW::OpenAPIClient::Object::InlineObject3;
|
||||
use WWW::OpenAPIClient::Object::InlineObject4;
|
||||
use WWW::OpenAPIClient::Object::InlineObject5;
|
||||
use WWW::OpenAPIClient::Object::InlineResponseDefault;
|
||||
use WWW::OpenAPIClient::Object::List;
|
||||
use WWW::OpenAPIClient::Object::MapTest;
|
||||
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
|
||||
use WWW::OpenAPIClient::Object::Model200Response;
|
||||
use WWW::OpenAPIClient::Object::ModelReturn;
|
||||
use WWW::OpenAPIClient::Object::Name;
|
||||
use WWW::OpenAPIClient::Object::NullableClass;
|
||||
use WWW::OpenAPIClient::Object::NumberOnly;
|
||||
use WWW::OpenAPIClient::Object::Order;
|
||||
use WWW::OpenAPIClient::Object::OuterComposite;
|
||||
use WWW::OpenAPIClient::Object::OuterEnum;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumInteger;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
|
||||
use WWW::OpenAPIClient::Object::Pet;
|
||||
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
|
||||
use WWW::OpenAPIClient::Object::SpecialModelName;
|
||||
use WWW::OpenAPIClient::Object::Tag;
|
||||
use WWW::OpenAPIClient::Object::TypeHolderDefault;
|
||||
use WWW::OpenAPIClient::Object::TypeHolderExample;
|
||||
use WWW::OpenAPIClient::Object::User;
|
||||
use WWW::OpenAPIClient::Object::XmlItem;
|
||||
|
||||
# for displaying the API response data
|
||||
use Data::Dumper;
|
||||
@ -347,10 +355,10 @@ use WWW::OpenAPIClient::;
|
||||
my $api_instance = WWW::OpenAPIClient::->new(
|
||||
);
|
||||
|
||||
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
|
||||
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->call_123_test_special_tags(body => $body);
|
||||
my $result = $api_instance->call_123_test_special_tags(client => $client);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
@ -366,7 +374,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
||||
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
||||
@ -404,14 +413,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
|
||||
# DOCUMENTATION FOR MODELS
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
|
||||
- [WWW::OpenAPIClient::Object::AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
|
||||
- [WWW::OpenAPIClient::Object::Animal](docs/Animal.md)
|
||||
- [WWW::OpenAPIClient::Object::ApiResponse](docs/ApiResponse.md)
|
||||
- [WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
@ -428,26 +430,36 @@ Class | Method | HTTP request | Description
|
||||
- [WWW::OpenAPIClient::Object::EnumTest](docs/EnumTest.md)
|
||||
- [WWW::OpenAPIClient::Object::File](docs/File.md)
|
||||
- [WWW::OpenAPIClient::Object::FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [WWW::OpenAPIClient::Object::Foo](docs/Foo.md)
|
||||
- [WWW::OpenAPIClient::Object::FormatTest](docs/FormatTest.md)
|
||||
- [WWW::OpenAPIClient::Object::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [WWW::OpenAPIClient::Object::HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [WWW::OpenAPIClient::Object::InlineObject](docs/InlineObject.md)
|
||||
- [WWW::OpenAPIClient::Object::InlineObject1](docs/InlineObject1.md)
|
||||
- [WWW::OpenAPIClient::Object::InlineObject2](docs/InlineObject2.md)
|
||||
- [WWW::OpenAPIClient::Object::InlineObject3](docs/InlineObject3.md)
|
||||
- [WWW::OpenAPIClient::Object::InlineObject4](docs/InlineObject4.md)
|
||||
- [WWW::OpenAPIClient::Object::InlineObject5](docs/InlineObject5.md)
|
||||
- [WWW::OpenAPIClient::Object::InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [WWW::OpenAPIClient::Object::List](docs/List.md)
|
||||
- [WWW::OpenAPIClient::Object::MapTest](docs/MapTest.md)
|
||||
- [WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [WWW::OpenAPIClient::Object::Model200Response](docs/Model200Response.md)
|
||||
- [WWW::OpenAPIClient::Object::ModelReturn](docs/ModelReturn.md)
|
||||
- [WWW::OpenAPIClient::Object::Name](docs/Name.md)
|
||||
- [WWW::OpenAPIClient::Object::NullableClass](docs/NullableClass.md)
|
||||
- [WWW::OpenAPIClient::Object::NumberOnly](docs/NumberOnly.md)
|
||||
- [WWW::OpenAPIClient::Object::Order](docs/Order.md)
|
||||
- [WWW::OpenAPIClient::Object::OuterComposite](docs/OuterComposite.md)
|
||||
- [WWW::OpenAPIClient::Object::OuterEnum](docs/OuterEnum.md)
|
||||
- [WWW::OpenAPIClient::Object::OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
|
||||
- [WWW::OpenAPIClient::Object::OuterEnumInteger](docs/OuterEnumInteger.md)
|
||||
- [WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
|
||||
- [WWW::OpenAPIClient::Object::Pet](docs/Pet.md)
|
||||
- [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [WWW::OpenAPIClient::Object::SpecialModelName](docs/SpecialModelName.md)
|
||||
- [WWW::OpenAPIClient::Object::Tag](docs/Tag.md)
|
||||
- [WWW::OpenAPIClient::Object::TypeHolderDefault](docs/TypeHolderDefault.md)
|
||||
- [WWW::OpenAPIClient::Object::TypeHolderExample](docs/TypeHolderExample.md)
|
||||
- [WWW::OpenAPIClient::Object::User](docs/User.md)
|
||||
- [WWW::OpenAPIClient::Object::XmlItem](docs/XmlItem.md)
|
||||
|
||||
|
||||
# DOCUMENTATION FOR AUTHORIZATION
|
||||
@ -464,6 +476,10 @@ Class | Method | HTTP request | Description
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
## bearer_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
## http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
@ -8,17 +8,8 @@ use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**map_string** | **HASH[string,string]** | | [optional]
|
||||
**map_number** | **HASH[string,double]** | | [optional]
|
||||
**map_integer** | **HASH[string,int]** | | [optional]
|
||||
**map_boolean** | **HASH[string,boolean]** | | [optional]
|
||||
**map_array_integer** | **HASH[string,ARRAY[int]]** | | [optional]
|
||||
**map_array_anytype** | **HASH[string,ARRAY[object]]** | | [optional]
|
||||
**map_map_string** | **HASH[string,HASH[string,string]]** | | [optional]
|
||||
**map_map_anytype** | **HASH[string,HASH[string,object]]** | | [optional]
|
||||
**anytype_1** | [**object**](.md) | | [optional]
|
||||
**anytype_2** | [**object**](.md) | | [optional]
|
||||
**anytype_3** | [**object**](.md) | | [optional]
|
||||
**map_property** | **HASH[string,string]** | | [optional]
|
||||
**map_of_map_property** | **HASH[string,HASH[string,string]]** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||
[**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
|
||||
[**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
|
||||
@ -24,12 +24,10 @@ Method | HTTP request | Description
|
||||
[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
# **create_xml_item**
|
||||
> create_xml_item(xml_item => $xml_item)
|
||||
# **fake_health_get**
|
||||
> HealthCheckResult fake_health_get()
|
||||
|
||||
creates an XmlItem
|
||||
|
||||
this route creates an XmlItem
|
||||
Health check endpoint
|
||||
|
||||
### Example
|
||||
```perl
|
||||
@ -38,25 +36,22 @@ use WWW::OpenAPIClient::FakeApi;
|
||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
);
|
||||
|
||||
my $xml_item = WWW::OpenAPIClient::Object::XmlItem->new(); # XmlItem | XmlItem Body
|
||||
|
||||
eval {
|
||||
$api_instance->create_xml_item(xml_item => $xml_item);
|
||||
my $result = $api_instance->fake_health_get();
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->create_xml_item: $@\n";
|
||||
warn "Exception when calling FakeApi->fake_health_get: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body |
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
[**HealthCheckResult**](HealthCheckResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -64,8 +59,8 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
@ -110,13 +105,13 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **fake_outer_composite_serialize**
|
||||
> OuterComposite fake_outer_composite_serialize(body => $body)
|
||||
> OuterComposite fake_outer_composite_serialize(outer_composite => $outer_composite)
|
||||
|
||||
|
||||
|
||||
@ -129,10 +124,10 @@ use WWW::OpenAPIClient::FakeApi;
|
||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
);
|
||||
|
||||
my $body = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
|
||||
my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->fake_outer_composite_serialize(body => $body);
|
||||
my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
@ -144,7 +139,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
**outer_composite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -156,7 +151,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
@ -202,7 +197,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
@ -248,13 +243,13 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **test_body_with_file_schema**
|
||||
> test_body_with_file_schema(body => $body)
|
||||
> test_body_with_file_schema(file_schema_test_class => $file_schema_test_class)
|
||||
|
||||
|
||||
|
||||
@ -267,10 +262,10 @@ use WWW::OpenAPIClient::FakeApi;
|
||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
);
|
||||
|
||||
my $body = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass |
|
||||
my $file_schema_test_class = WWW::OpenAPIClient::Object::FileSchemaTestClass->new(); # FileSchemaTestClass |
|
||||
|
||||
eval {
|
||||
$api_instance->test_body_with_file_schema(body => $body);
|
||||
$api_instance->test_body_with_file_schema(file_schema_test_class => $file_schema_test_class);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->test_body_with_file_schema: $@\n";
|
||||
@ -281,7 +276,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
**file_schema_test_class** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -299,7 +294,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **test_body_with_query_params**
|
||||
> test_body_with_query_params(query => $query, body => $body)
|
||||
> test_body_with_query_params(query => $query, user => $user)
|
||||
|
||||
|
||||
|
||||
@ -311,10 +306,10 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
);
|
||||
|
||||
my $query = "query_example"; # string |
|
||||
my $body = WWW::OpenAPIClient::Object::User->new(); # User |
|
||||
my $user = WWW::OpenAPIClient::Object::User->new(); # User |
|
||||
|
||||
eval {
|
||||
$api_instance->test_body_with_query_params(query => $query, body => $body);
|
||||
$api_instance->test_body_with_query_params(query => $query, user => $user);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->test_body_with_query_params: $@\n";
|
||||
@ -326,7 +321,7 @@ if ($@) {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**query** | **string**| |
|
||||
**body** | [**User**](User.md)| |
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -344,7 +339,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **test_client_model**
|
||||
> Client test_client_model(body => $body)
|
||||
> Client test_client_model(client => $client)
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
@ -357,10 +352,10 @@ use WWW::OpenAPIClient::FakeApi;
|
||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
);
|
||||
|
||||
my $body = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
|
||||
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->test_client_model(body => $body);
|
||||
my $result = $api_instance->test_client_model(client => $client);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
@ -372,7 +367,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -405,6 +400,7 @@ my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
# Configure HTTP basic authorization: http_basic_test
|
||||
username => 'YOUR_USERNAME',
|
||||
password => 'YOUR_PASSWORD',
|
||||
|
||||
);
|
||||
|
||||
my $number = 3.4; # double | None
|
||||
@ -535,6 +531,11 @@ Fake endpoint to test group parameters (optional)
|
||||
use Data::Dumper;
|
||||
use WWW::OpenAPIClient::FakeApi;
|
||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
|
||||
# Configure HTTP basic authorization: bearer_test
|
||||
# Configure bearer access token for authorization: bearer_test
|
||||
access_token => 'YOUR_BEARER_TOKEN',
|
||||
|
||||
);
|
||||
|
||||
my $required_string_group = 56; # int | Required String in group parameters
|
||||
@ -569,7 +570,7 @@ void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[bearer_test](../README.md#bearer_test)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
@ -579,7 +580,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **test_inline_additional_properties**
|
||||
> test_inline_additional_properties(param => $param)
|
||||
> test_inline_additional_properties(request_body => $request_body)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
@ -590,10 +591,10 @@ use WWW::OpenAPIClient::FakeApi;
|
||||
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
|
||||
);
|
||||
|
||||
my $param = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body
|
||||
my $request_body = WWW::OpenAPIClient::Object::HASH[string,string]->new(); # HASH[string,string] | request body
|
||||
|
||||
eval {
|
||||
$api_instance->test_inline_additional_properties(param => $param);
|
||||
$api_instance->test_inline_additional_properties(request_body => $request_body);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->test_inline_additional_properties: $@\n";
|
||||
@ -604,7 +605,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | [**HASH[string,string]**](string.md)| request body |
|
||||
**request_body** | [**HASH[string,string]**](string.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -21,6 +21,8 @@ Name | Type | Description | Notes
|
||||
**date_time** | **DateTime** | | [optional]
|
||||
**uuid** | **string** | | [optional]
|
||||
**password** | **string** | |
|
||||
**pattern_with_digits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
|
||||
**pattern_with_digits_and_delimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -20,7 +20,7 @@ Method | HTTP request | Description
|
||||
|
||||
|
||||
# **create_user**
|
||||
> create_user(body => $body)
|
||||
> create_user(user => $user)
|
||||
|
||||
Create user
|
||||
|
||||
@ -33,10 +33,10 @@ use WWW::OpenAPIClient::UserApi;
|
||||
my $api_instance = WWW::OpenAPIClient::UserApi->new(
|
||||
);
|
||||
|
||||
my $body = WWW::OpenAPIClient::Object::User->new(); # User | Created user object
|
||||
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object
|
||||
|
||||
eval {
|
||||
$api_instance->create_user(body => $body);
|
||||
$api_instance->create_user(user => $user);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling UserApi->create_user: $@\n";
|
||||
@ -47,7 +47,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -59,13 +59,13 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_array_input**
|
||||
> create_users_with_array_input(body => $body)
|
||||
> create_users_with_array_input(user => $user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
@ -76,10 +76,10 @@ use WWW::OpenAPIClient::UserApi;
|
||||
my $api_instance = WWW::OpenAPIClient::UserApi->new(
|
||||
);
|
||||
|
||||
my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
|
||||
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
|
||||
|
||||
eval {
|
||||
$api_instance->create_users_with_array_input(body => $body);
|
||||
$api_instance->create_users_with_array_input(user => $user);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling UserApi->create_users_with_array_input: $@\n";
|
||||
@ -90,7 +90,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**ARRAY[User]**](ARRAY.md)| List of user object |
|
||||
**user** | [**ARRAY[User]**](ARRAY.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -102,13 +102,13 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **create_users_with_list_input**
|
||||
> create_users_with_list_input(body => $body)
|
||||
> create_users_with_list_input(user => $user)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
@ -119,10 +119,10 @@ use WWW::OpenAPIClient::UserApi;
|
||||
my $api_instance = WWW::OpenAPIClient::UserApi->new(
|
||||
);
|
||||
|
||||
my $body = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
|
||||
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
|
||||
|
||||
eval {
|
||||
$api_instance->create_users_with_list_input(body => $body);
|
||||
$api_instance->create_users_with_list_input(user => $user);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling UserApi->create_users_with_list_input: $@\n";
|
||||
@ -133,7 +133,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**ARRAY[User]**](ARRAY.md)| List of user object |
|
||||
**user** | [**ARRAY[User]**](ARRAY.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -145,7 +145,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
@ -325,7 +325,7 @@ No authorization required
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **update_user**
|
||||
> update_user(username => $username, body => $body)
|
||||
> update_user(username => $username, user => $user)
|
||||
|
||||
Updated user
|
||||
|
||||
@ -339,10 +339,10 @@ my $api_instance = WWW::OpenAPIClient::UserApi->new(
|
||||
);
|
||||
|
||||
my $username = "username_example"; # string | name that need to be deleted
|
||||
my $body = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object
|
||||
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object
|
||||
|
||||
eval {
|
||||
$api_instance->update_user(username => $username, body => $body);
|
||||
$api_instance->update_user(username => $username, user => $user);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling UserApi->update_user: $@\n";
|
||||
@ -354,7 +354,7 @@ if ($@) {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **string**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -366,7 +366,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# To test special tags
|
||||
#
|
||||
# @param Client $body client model (required)
|
||||
# @param Client $client client model (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'client' => {
|
||||
data_type => 'Client',
|
||||
description => 'client model',
|
||||
required => '1',
|
||||
@ -73,9 +73,9 @@ sub new {
|
||||
sub call_123_test_special_tags {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling call_123_test_special_tags");
|
||||
# verify the required parameter 'client' is set
|
||||
unless (exists $args{'client'}) {
|
||||
croak("Missing the required parameter 'client' when calling call_123_test_special_tags");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -95,8 +95,8 @@ sub call_123_test_special_tags {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'client'}) {
|
||||
$_body_data = $args{'client'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -348,6 +348,12 @@ sub update_params_for_auth {
|
||||
$query_params->{'api_key_query'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'bearer_test') {
|
||||
// this endpoint requires Bearer (JWT) authentication (access token)
|
||||
if ($self->{config}{access_token}) {
|
||||
$headers['Authorization'] = 'Bearer ' . $self->{config}{access_token};
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'http_basic_test') {
|
||||
if ($self->{config}{username} || $self->{config}{password}) {
|
||||
$header_params->{'Authorization'} = 'Basic ' . encode_base64($self->{config}{username} . ":" . $self->{config}{password});
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -49,65 +49,53 @@ sub new {
|
||||
|
||||
|
||||
#
|
||||
# create_xml_item
|
||||
# fake_health_get
|
||||
#
|
||||
# creates an XmlItem
|
||||
# Health check endpoint
|
||||
#
|
||||
# @param XmlItem $xml_item XmlItem Body (required)
|
||||
{
|
||||
my $params = {
|
||||
'xml_item' => {
|
||||
data_type => 'XmlItem',
|
||||
description => 'XmlItem Body',
|
||||
required => '1',
|
||||
},
|
||||
};
|
||||
__PACKAGE__->method_documentation->{ 'create_xml_item' } = {
|
||||
summary => 'creates an XmlItem',
|
||||
__PACKAGE__->method_documentation->{ 'fake_health_get' } = {
|
||||
summary => 'Health check endpoint',
|
||||
params => $params,
|
||||
returns => undef,
|
||||
returns => 'HealthCheckResult',
|
||||
};
|
||||
}
|
||||
# @return void
|
||||
# @return HealthCheckResult
|
||||
#
|
||||
sub create_xml_item {
|
||||
sub fake_health_get {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'xml_item' is set
|
||||
unless (exists $args{'xml_item'}) {
|
||||
croak("Missing the required parameter 'xml_item' when calling create_xml_item");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/fake/create_xml_item';
|
||||
my $_resource_path = '/fake/health';
|
||||
|
||||
my $_method = 'POST';
|
||||
my $_method = 'GET';
|
||||
my $query_params = {};
|
||||
my $header_params = {};
|
||||
my $form_params = {};
|
||||
|
||||
# 'Accept' and 'Content-Type' header
|
||||
my $_header_accept = $self->{api_client}->select_header_accept();
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16');
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'xml_item'}) {
|
||||
$_body_data = $args{'xml_item'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
my $auth_settings = [qw()];
|
||||
|
||||
# make the API Call
|
||||
$self->{api_client}->call_api($_resource_path, $_method,
|
||||
my $response = $self->{api_client}->call_api($_resource_path, $_method,
|
||||
$query_params, $form_params,
|
||||
$header_params, $_body_data, $auth_settings);
|
||||
if (!$response) {
|
||||
return;
|
||||
}
|
||||
my $_response_object = $self->{api_client}->deserialize('HealthCheckResult', $response);
|
||||
return $_response_object;
|
||||
}
|
||||
|
||||
#
|
||||
# fake_outer_boolean_serialize
|
||||
@ -147,7 +135,7 @@ sub fake_outer_boolean_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
@ -174,10 +162,10 @@ sub fake_outer_boolean_serialize {
|
||||
#
|
||||
#
|
||||
#
|
||||
# @param OuterComposite $body Input composite as post body (optional)
|
||||
# @param OuterComposite $outer_composite Input composite as post body (optional)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'outer_composite' => {
|
||||
data_type => 'OuterComposite',
|
||||
description => 'Input composite as post body',
|
||||
required => '0',
|
||||
@ -207,12 +195,12 @@ sub fake_outer_composite_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'outer_composite'}) {
|
||||
$_body_data = $args{'outer_composite'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -267,7 +255,7 @@ sub fake_outer_number_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
@ -327,7 +315,7 @@ sub fake_outer_string_serialize {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
@ -354,10 +342,10 @@ sub fake_outer_string_serialize {
|
||||
#
|
||||
#
|
||||
#
|
||||
# @param FileSchemaTestClass $body (required)
|
||||
# @param FileSchemaTestClass $file_schema_test_class (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'file_schema_test_class' => {
|
||||
data_type => 'FileSchemaTestClass',
|
||||
description => '',
|
||||
required => '1',
|
||||
@ -374,9 +362,9 @@ sub fake_outer_string_serialize {
|
||||
sub test_body_with_file_schema {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_body_with_file_schema");
|
||||
# verify the required parameter 'file_schema_test_class' is set
|
||||
unless (exists $args{'file_schema_test_class'}) {
|
||||
croak("Missing the required parameter 'file_schema_test_class' when calling test_body_with_file_schema");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -396,8 +384,8 @@ sub test_body_with_file_schema {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'file_schema_test_class'}) {
|
||||
$_body_data = $args{'file_schema_test_class'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -416,7 +404,7 @@ sub test_body_with_file_schema {
|
||||
#
|
||||
#
|
||||
# @param string $query (required)
|
||||
# @param User $body (required)
|
||||
# @param User $user (required)
|
||||
{
|
||||
my $params = {
|
||||
'query' => {
|
||||
@ -424,7 +412,7 @@ sub test_body_with_file_schema {
|
||||
description => '',
|
||||
required => '1',
|
||||
},
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'User',
|
||||
description => '',
|
||||
required => '1',
|
||||
@ -446,9 +434,9 @@ sub test_body_with_query_params {
|
||||
croak("Missing the required parameter 'query' when calling test_body_with_query_params");
|
||||
}
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_body_with_query_params");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling test_body_with_query_params");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -473,8 +461,8 @@ sub test_body_with_query_params {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -492,10 +480,10 @@ sub test_body_with_query_params {
|
||||
#
|
||||
# To test \"client\" model
|
||||
#
|
||||
# @param Client $body client model (required)
|
||||
# @param Client $client client model (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'client' => {
|
||||
data_type => 'Client',
|
||||
description => 'client model',
|
||||
required => '1',
|
||||
@ -512,9 +500,9 @@ sub test_body_with_query_params {
|
||||
sub test_client_model {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_client_model");
|
||||
# verify the required parameter 'client' is set
|
||||
unless (exists $args{'client'}) {
|
||||
croak("Missing the required parameter 'client' when calling test_client_model");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -534,8 +522,8 @@ sub test_client_model {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'client'}) {
|
||||
$_body_data = $args{'client'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -1022,7 +1010,7 @@ sub test_group_parameters {
|
||||
|
||||
my $_body_data;
|
||||
# authentication setting, if any
|
||||
my $auth_settings = [qw()];
|
||||
my $auth_settings = [qw(bearer_test )];
|
||||
|
||||
# make the API Call
|
||||
$self->{api_client}->call_api($_resource_path, $_method,
|
||||
@ -1036,10 +1024,10 @@ sub test_group_parameters {
|
||||
#
|
||||
# test inline additionalProperties
|
||||
#
|
||||
# @param HASH[string,string] $param request body (required)
|
||||
# @param HASH[string,string] $request_body request body (required)
|
||||
{
|
||||
my $params = {
|
||||
'param' => {
|
||||
'request_body' => {
|
||||
data_type => 'HASH[string,string]',
|
||||
description => 'request body',
|
||||
required => '1',
|
||||
@ -1056,9 +1044,9 @@ sub test_group_parameters {
|
||||
sub test_inline_additional_properties {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'param' is set
|
||||
unless (exists $args{'param'}) {
|
||||
croak("Missing the required parameter 'param' when calling test_inline_additional_properties");
|
||||
# verify the required parameter 'request_body' is set
|
||||
unless (exists $args{'request_body'}) {
|
||||
croak("Missing the required parameter 'request_body' when calling test_inline_additional_properties");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -1078,8 +1066,8 @@ sub test_inline_additional_properties {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'param'}) {
|
||||
$_body_data = $args{'param'};
|
||||
if ( exists $args{'request_body'}) {
|
||||
$_body_data = $args{'request_body'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# To test class name in snake case
|
||||
#
|
||||
# @param Client $body client model (required)
|
||||
# @param Client $client client model (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'client' => {
|
||||
data_type => 'Client',
|
||||
description => 'client model',
|
||||
required => '1',
|
||||
@ -73,9 +73,9 @@ sub new {
|
||||
sub test_classname {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling test_classname");
|
||||
# verify the required parameter 'client' is set
|
||||
unless (exists $args{'client'}) {
|
||||
croak("Missing the required parameter 'client' when calling test_classname");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -95,8 +95,8 @@ sub test_classname {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'client'}) {
|
||||
$_body_data = $args{'client'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -161,79 +161,16 @@ __PACKAGE__->class_documentation({description => '',
|
||||
} );
|
||||
|
||||
__PACKAGE__->method_documentation({
|
||||
'map_string' => {
|
||||
'map_property' => {
|
||||
datatype => 'HASH[string,string]',
|
||||
base_name => 'map_string',
|
||||
base_name => 'map_property',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_number' => {
|
||||
datatype => 'HASH[string,double]',
|
||||
base_name => 'map_number',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_integer' => {
|
||||
datatype => 'HASH[string,int]',
|
||||
base_name => 'map_integer',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_boolean' => {
|
||||
datatype => 'HASH[string,boolean]',
|
||||
base_name => 'map_boolean',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_array_integer' => {
|
||||
datatype => 'HASH[string,ARRAY[int]]',
|
||||
base_name => 'map_array_integer',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_array_anytype' => {
|
||||
datatype => 'HASH[string,ARRAY[object]]',
|
||||
base_name => 'map_array_anytype',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_map_string' => {
|
||||
'map_of_map_property' => {
|
||||
datatype => 'HASH[string,HASH[string,string]]',
|
||||
base_name => 'map_map_string',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'map_map_anytype' => {
|
||||
datatype => 'HASH[string,HASH[string,object]]',
|
||||
base_name => 'map_map_anytype',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'anytype_1' => {
|
||||
datatype => 'object',
|
||||
base_name => 'anytype_1',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'anytype_2' => {
|
||||
datatype => 'object',
|
||||
base_name => 'anytype_2',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'anytype_3' => {
|
||||
datatype => 'object',
|
||||
base_name => 'anytype_3',
|
||||
base_name => 'map_of_map_property',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
@ -241,31 +178,13 @@ __PACKAGE__->method_documentation({
|
||||
});
|
||||
|
||||
__PACKAGE__->openapi_types( {
|
||||
'map_string' => 'HASH[string,string]',
|
||||
'map_number' => 'HASH[string,double]',
|
||||
'map_integer' => 'HASH[string,int]',
|
||||
'map_boolean' => 'HASH[string,boolean]',
|
||||
'map_array_integer' => 'HASH[string,ARRAY[int]]',
|
||||
'map_array_anytype' => 'HASH[string,ARRAY[object]]',
|
||||
'map_map_string' => 'HASH[string,HASH[string,string]]',
|
||||
'map_map_anytype' => 'HASH[string,HASH[string,object]]',
|
||||
'anytype_1' => 'object',
|
||||
'anytype_2' => 'object',
|
||||
'anytype_3' => 'object'
|
||||
'map_property' => 'HASH[string,string]',
|
||||
'map_of_map_property' => 'HASH[string,HASH[string,string]]'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
'map_string' => 'map_string',
|
||||
'map_number' => 'map_number',
|
||||
'map_integer' => 'map_integer',
|
||||
'map_boolean' => 'map_boolean',
|
||||
'map_array_integer' => 'map_array_integer',
|
||||
'map_array_anytype' => 'map_array_anytype',
|
||||
'map_map_string' => 'map_map_string',
|
||||
'map_map_anytype' => 'map_map_anytype',
|
||||
'anytype_1' => 'anytype_1',
|
||||
'anytype_2' => 'anytype_2',
|
||||
'anytype_3' => 'anytype_3'
|
||||
'map_property' => 'map_property',
|
||||
'map_of_map_property' => 'map_of_map_property'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -31,6 +31,9 @@ use Date::Parse;
|
||||
use DateTime;
|
||||
|
||||
use WWW::OpenAPIClient::Object::OuterEnum;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumDefaultValue;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumInteger;
|
||||
use WWW::OpenAPIClient::Object::OuterEnumIntegerDefaultValue;
|
||||
|
||||
use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
@ -47,7 +50,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -197,6 +200,27 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'outer_enum_integer' => {
|
||||
datatype => 'OuterEnumInteger',
|
||||
base_name => 'outerEnumInteger',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'outer_enum_default_value' => {
|
||||
datatype => 'OuterEnumDefaultValue',
|
||||
base_name => 'outerEnumDefaultValue',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'outer_enum_integer_default_value' => {
|
||||
datatype => 'OuterEnumIntegerDefaultValue',
|
||||
base_name => 'outerEnumIntegerDefaultValue',
|
||||
description => '',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->openapi_types( {
|
||||
@ -204,7 +228,10 @@ __PACKAGE__->openapi_types( {
|
||||
'enum_string_required' => 'string',
|
||||
'enum_integer' => 'int',
|
||||
'enum_number' => 'double',
|
||||
'outer_enum' => 'OuterEnum'
|
||||
'outer_enum' => 'OuterEnum',
|
||||
'outer_enum_integer' => 'OuterEnumInteger',
|
||||
'outer_enum_default_value' => 'OuterEnumDefaultValue',
|
||||
'outer_enum_integer_default_value' => 'OuterEnumIntegerDefaultValue'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
@ -212,7 +239,10 @@ __PACKAGE__->attribute_map( {
|
||||
'enum_string_required' => 'enum_string_required',
|
||||
'enum_integer' => 'enum_integer',
|
||||
'enum_number' => 'enum_number',
|
||||
'outer_enum' => 'outerEnum'
|
||||
'outer_enum' => 'outerEnum',
|
||||
'outer_enum_integer' => 'outerEnumInteger',
|
||||
'outer_enum_default_value' => 'outerEnumDefaultValue',
|
||||
'outer_enum_integer_default_value' => 'outerEnumIntegerDefaultValue'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -252,6 +252,20 @@ __PACKAGE__->method_documentation({
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'pattern_with_digits' => {
|
||||
datatype => 'string',
|
||||
base_name => 'pattern_with_digits',
|
||||
description => 'A string that is a 10 digit number. Can have leading zeros.',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
'pattern_with_digits_and_delimiter' => {
|
||||
datatype => 'string',
|
||||
base_name => 'pattern_with_digits_and_delimiter',
|
||||
description => 'A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
});
|
||||
|
||||
__PACKAGE__->openapi_types( {
|
||||
@ -267,7 +281,9 @@ __PACKAGE__->openapi_types( {
|
||||
'date' => 'DateTime',
|
||||
'date_time' => 'DateTime',
|
||||
'uuid' => 'string',
|
||||
'password' => 'string'
|
||||
'password' => 'string',
|
||||
'pattern_with_digits' => 'string',
|
||||
'pattern_with_digits_and_delimiter' => 'string'
|
||||
} );
|
||||
|
||||
__PACKAGE__->attribute_map( {
|
||||
@ -283,7 +299,9 @@ __PACKAGE__->attribute_map( {
|
||||
'date' => 'date',
|
||||
'date_time' => 'dateTime',
|
||||
'uuid' => 'uuid',
|
||||
'password' => 'password'
|
||||
'password' => 'password',
|
||||
'pattern_with_digits' => 'pattern_with_digits',
|
||||
'pattern_with_digits_and_delimiter' => 'pattern_with_digits_and_delimiter'
|
||||
} );
|
||||
|
||||
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -47,7 +47,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -48,7 +48,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -46,7 +46,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -114,20 +114,13 @@ sub from_hash {
|
||||
# loop through attributes and use openapi_types to deserialize the data
|
||||
while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
|
||||
my $_json_attribute = $self->attribute_map->{$_key};
|
||||
if ($_type =~ /^array\[(.+)\]$/i) { # array
|
||||
my $_subclass = $1;
|
||||
if ($_type =~ /^array\[/i) { # array
|
||||
my $_subclass = substr($_type, 6, -1);
|
||||
my @_array = ();
|
||||
foreach my $_element (@{$hash->{$_json_attribute}}) {
|
||||
push @_array, $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \@_array;
|
||||
} elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash
|
||||
my $_subclass = $1;
|
||||
my %_hash = ();
|
||||
while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) {
|
||||
$_hash{$_key} = $self->_deserialize($_subclass, $_element);
|
||||
}
|
||||
$self->{$_key} = \%_hash;
|
||||
} elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
|
||||
$self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
|
||||
} else {
|
||||
@ -145,7 +138,7 @@ sub _deserialize {
|
||||
|
||||
if ($type eq 'DateTime') {
|
||||
return DateTime->from_epoch(epoch => str2time($data));
|
||||
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
|
||||
} elsif ( grep {$type=~/^(ARRAY\[|HASH\[string,)?$_(\])?$/} ('int', 'double', 'string', 'boolean') ) {
|
||||
return $data;
|
||||
} else { # hash(model)
|
||||
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# Add a new pet to the store
|
||||
#
|
||||
# @param Pet $body Pet object that needs to be added to the store (required)
|
||||
# @param Pet $pet Pet object that needs to be added to the store (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'pet' => {
|
||||
data_type => 'Pet',
|
||||
description => 'Pet object that needs to be added to the store',
|
||||
required => '1',
|
||||
@ -73,9 +73,9 @@ sub new {
|
||||
sub add_pet {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling add_pet");
|
||||
# verify the required parameter 'pet' is set
|
||||
unless (exists $args{'pet'}) {
|
||||
croak("Missing the required parameter 'pet' when calling add_pet");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -95,8 +95,8 @@ sub add_pet {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'pet'}) {
|
||||
$_body_data = $args{'pet'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -385,10 +385,10 @@ sub get_pet_by_id {
|
||||
#
|
||||
# Update an existing pet
|
||||
#
|
||||
# @param Pet $body Pet object that needs to be added to the store (required)
|
||||
# @param Pet $pet Pet object that needs to be added to the store (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'pet' => {
|
||||
data_type => 'Pet',
|
||||
description => 'Pet object that needs to be added to the store',
|
||||
required => '1',
|
||||
@ -405,9 +405,9 @@ sub get_pet_by_id {
|
||||
sub update_pet {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling update_pet");
|
||||
# verify the required parameter 'pet' is set
|
||||
unless (exists $args{'pet'}) {
|
||||
croak("Missing the required parameter 'pet' when calling update_pet");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -427,8 +427,8 @@ sub update_pet {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'pet'}) {
|
||||
$_body_data = $args{'pet'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -232,10 +232,10 @@ sub get_order_by_id {
|
||||
#
|
||||
# Place an order for a pet
|
||||
#
|
||||
# @param Order $body order placed for purchasing the pet (required)
|
||||
# @param Order $order order placed for purchasing the pet (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'order' => {
|
||||
data_type => 'Order',
|
||||
description => 'order placed for purchasing the pet',
|
||||
required => '1',
|
||||
@ -252,9 +252,9 @@ sub get_order_by_id {
|
||||
sub place_order {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling place_order");
|
||||
# verify the required parameter 'order' is set
|
||||
unless (exists $args{'order'}) {
|
||||
croak("Missing the required parameter 'order' when calling place_order");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -270,12 +270,12 @@ sub place_order {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'order'}) {
|
||||
$_body_data = $args{'order'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
@ -4,7 +4,7 @@ OpenAPI Petstore
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
|
||||
@ -53,10 +53,10 @@ sub new {
|
||||
#
|
||||
# Create user
|
||||
#
|
||||
# @param User $body Created user object (required)
|
||||
# @param User $user Created user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'User',
|
||||
description => 'Created user object',
|
||||
required => '1',
|
||||
@ -73,9 +73,9 @@ sub new {
|
||||
sub create_user {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling create_user");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling create_user");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -91,12 +91,12 @@ sub create_user {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -114,10 +114,10 @@ sub create_user {
|
||||
#
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param ARRAY[User] $body List of user object (required)
|
||||
# @param ARRAY[User] $user List of user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'ARRAY[User]',
|
||||
description => 'List of user object',
|
||||
required => '1',
|
||||
@ -134,9 +134,9 @@ sub create_user {
|
||||
sub create_users_with_array_input {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling create_users_with_array_input");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling create_users_with_array_input");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -152,12 +152,12 @@ sub create_users_with_array_input {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -175,10 +175,10 @@ sub create_users_with_array_input {
|
||||
#
|
||||
# Creates list of users with given input array
|
||||
#
|
||||
# @param ARRAY[User] $body List of user object (required)
|
||||
# @param ARRAY[User] $user List of user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'ARRAY[User]',
|
||||
description => 'List of user object',
|
||||
required => '1',
|
||||
@ -195,9 +195,9 @@ sub create_users_with_array_input {
|
||||
sub create_users_with_list_input {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling create_users_with_list_input");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling create_users_with_list_input");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -213,12 +213,12 @@ sub create_users_with_list_input {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
@ -493,7 +493,7 @@ sub logout_user {
|
||||
# Updated user
|
||||
#
|
||||
# @param string $username name that need to be deleted (required)
|
||||
# @param User $body Updated user object (required)
|
||||
# @param User $user Updated user object (required)
|
||||
{
|
||||
my $params = {
|
||||
'username' => {
|
||||
@ -501,7 +501,7 @@ sub logout_user {
|
||||
description => 'name that need to be deleted',
|
||||
required => '1',
|
||||
},
|
||||
'body' => {
|
||||
'user' => {
|
||||
data_type => 'User',
|
||||
description => 'Updated user object',
|
||||
required => '1',
|
||||
@ -523,9 +523,9 @@ sub update_user {
|
||||
croak("Missing the required parameter 'username' when calling update_user");
|
||||
}
|
||||
|
||||
# verify the required parameter 'body' is set
|
||||
unless (exists $args{'body'}) {
|
||||
croak("Missing the required parameter 'body' when calling update_user");
|
||||
# verify the required parameter 'user' is set
|
||||
unless (exists $args{'user'}) {
|
||||
croak("Missing the required parameter 'user' when calling update_user");
|
||||
}
|
||||
|
||||
# parse inputs
|
||||
@ -541,7 +541,7 @@ sub update_user {
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
|
||||
|
||||
# path params
|
||||
if ( exists $args{'username'}) {
|
||||
@ -552,8 +552,8 @@ sub update_user {
|
||||
|
||||
my $_body_data;
|
||||
# body params
|
||||
if ( exists $args{'body'}) {
|
||||
$_body_data = $args{'body'};
|
||||
if ( exists $args{'user'}) {
|
||||
$_body_data = $args{'user'};
|
||||
}
|
||||
|
||||
# authentication setting, if any
|
||||
|
Loading…
x
Reference in New Issue
Block a user