From 81cf611aa4ab70fa849dd6848684f177a810f0f9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 17 Dec 2018 17:11:23 +0800 Subject: [PATCH] add nullable support to perl api parameter (#1690) --- modules/openapi-generator/src/main/resources/perl/api.mustache | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/perl/api.mustache b/modules/openapi-generator/src/main/resources/perl/api.mustache index e7e2c7db6705..a0f6a5c33592 100644 --- a/modules/openapi-generator/src/main/resources/perl/api.mustache +++ b/modules/openapi-generator/src/main/resources/perl/api.mustache @@ -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}}}';