Skip to content

Commit 9c766a3

Browse files
authored
add nullable support to perl api parameter (OpenAPITools#1690)
1 parent a152609 commit 9c766a3

File tree

1 file changed

+2
-0
lines changed
  • modules/openapi-generator/src/main/resources/perl

1 file changed

+2
-0
lines changed

modules/openapi-generator/src/main/resources/perl/api.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ sub {{operationId}} {
6666
my ($self, %args) = @_;
6767
6868
{{#allParams}}
69+
{{^isNullable}}
6970
{{#required}}
7071
# verify the required parameter '{{paramName}}' is set
7172
unless (exists $args{'{{paramName}}'}) {
7273
croak("Missing the required parameter '{{paramName}}' when calling {{operationId}}");
7374
}
7475

7576
{{/required}}
77+
{{/isNullable}}
7678
{{/allParams}}
7779
# parse inputs
7880
my $_resource_path = '{{{path}}}';

0 commit comments

Comments
 (0)