Skip to content

Commit d6e891b

Browse files
check if enum_values are existing
If no enum_values are given for in a serverUrl, the check must be ignored.
1 parent 64d9719 commit d6e891b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/resources/csharp/Configuration.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ namespace {{packageName}}.Client
603603
604604
if (inputVariables.ContainsKey(variable.Key))
605605
{
606-
if (((List<string>)serverVariables["enum_values"]).Contains(inputVariables[variable.Key]))
606+
if (!serverVariables.ContainsKey("enum_values") || ((List<string>)serverVariables["enum_values"]).Contains(inputVariables[variable.Key]))
607607
{
608608
url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]);
609609
}

0 commit comments

Comments
 (0)