mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
update null comparison for query params in Java
to make it clear and also allow a query parameter to be set with string value: "null" (4 characters string)
This commit is contained in:
parent
c96853d5aa
commit
b2da6dc8a2
@ -58,7 +58,7 @@ public class {{classname}} {
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
{{#queryParams}}if(!"null".equals(String.valueOf({{paramName}})))
|
||||
{{#queryParams}}if ({{paramName}} != null)
|
||||
queryParams.put("{{baseName}}", String.valueOf({{paramName}}));
|
||||
{{/queryParams}}
|
||||
{{#headerParams}}headerParams.put("{{baseName}}", {{paramName}});
|
||||
|
Loading…
Reference in New Issue
Block a user