add nullable support to perl api parameter (#1690)

This commit is contained in:
William Cheng 2018-12-17 17:11:23 +08:00 committed by GitHub
parent d7d994620c
commit 81cf611aa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,7 @@ sub {{operationId}} {
my ($self, %args) = @_;
{{#allParams}}
{{^isNullable}}
{{#required}}
# verify the required parameter '{{paramName}}' is set
unless (exists $args{'{{paramName}}'}) {
@ -73,6 +74,7 @@ sub {{operationId}} {
}
{{/required}}
{{/isNullable}}
{{/allParams}}
# parse inputs
my $_resource_path = '{{{path}}}';