add any type support in perl client gen (#17654)

This commit is contained in:
William Cheng 2024-01-20 14:27:07 +08:00 committed by GitHub
parent 5b6b082504
commit 50ae17b197
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -140,6 +140,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("set", "ARRAY");
typeMapping.put("map", "HASH");
typeMapping.put("object", "object");
typeMapping.put("AnyType", "object");
typeMapping.put("binary", "string");
typeMapping.put("file", "string");
typeMapping.put("ByteArray", "string");

View File

@ -407,7 +407,7 @@ use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $request_body = WWW::OpenAPIClient::Object::HASH[string,AnyType]->new(); # HASH[string,AnyType] | request body
my $request_body = WWW::OpenAPIClient::Object::HASH[string,object]->new(); # HASH[string,object] | request body
eval {
$api_instance->test_additional_properties_reference(request_body => $request_body);
@ -421,7 +421,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**request_body** | [**HASH[string,AnyType]**](AnyType.md)| request body |
**request_body** | [**HASH[string,object]**](object.md)| request body |
### Return type

View File

@ -539,11 +539,11 @@ sub fake_property_enum_integer_serialize {
#
# test referenced additionalProperties
#
# @param HASH[string,AnyType] $request_body request body (required)
# @param HASH[string,object] $request_body request body (required)
{
my $params = {
'request_body' => {
data_type => 'HASH[string,AnyType]',
data_type => 'HASH[string,object]',
description => 'request body',
required => '1',
},

View File

@ -30,7 +30,6 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::OpenAPIClient::Object::AnyType;
use base ("Class::Accessor", "Class::Data::Inheritable");