From 767b64d4c13997a615586cbc03483d58d15a635d Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Sat, 9 Mar 2024 12:01:23 +0100 Subject: [PATCH] fix: enum usage for body params --- templates/dart/base/utils.twig | 2 +- templates/flutter/base/utils.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/dart/base/utils.twig b/templates/dart/base/utils.twig index 8d58c497f..df33f1a33 100644 --- a/templates/dart/base/utils.twig +++ b/templates/dart/base/utils.twig @@ -1,6 +1,6 @@ {% macro map_parameter(parameters) %} {% for parameter in parameters %} -'{{ parameter.name }}': {{ parameter.name | caseCamel | overrideIdentifier }}, +'{{ parameter.name }}': {{ parameter.name | caseCamel | overrideIdentifier }}{% if parameter.enumValues | length > 0 %}{% if not parameter.required %}?{% endif %}.value{% endif %}, {% endfor %} {% endmacro %} diff --git a/templates/flutter/base/utils.twig b/templates/flutter/base/utils.twig index 73a0fe950..392795575 100644 --- a/templates/flutter/base/utils.twig +++ b/templates/flutter/base/utils.twig @@ -1,6 +1,6 @@ {%- macro map_parameter(parameters) -%} {%- for parameter in parameters ~%} - '{{ parameter.name }}': {{ parameter.name | caseCamel | overrideIdentifier }}, + '{{ parameter.name }}': {{ parameter.name | caseCamel | overrideIdentifier }}{% if parameter.enumValues | length > 0 %}{% if not parameter.required %}?{% endif %}.value{% endif %}, {%- endfor ~%} {%- endmacro ~%}