Skip to content

Commit

Permalink
add nullable support to perl api parameter (#1690)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Dec 17, 2018
1 parent d7d9946 commit 81cf611
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ sub {{operationId}} {
my ($self, %args) = @_;
{{#allParams}}
{{^isNullable}}
{{#required}}
# verify the required parameter '{{paramName}}' is set
unless (exists $args{'{{paramName}}'}) {
croak("Missing the required parameter '{{paramName}}' when calling {{operationId}}");
}

{{/required}}
{{/isNullable}}
{{/allParams}}
# parse inputs
my $_resource_path = '{{{path}}}';
Expand Down

0 comments on commit 81cf611

Please sign in to comment.