Skip to content

Commit

Permalink
ci: fixed pojo template (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
emajo authored Jun 15, 2022
1 parent 957a911 commit 9f62588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/openapi-generator/java/pojo.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/isArray}}
{{^isContainer}}
{{#isString}}
if (({{^isRequired}}jsonObj.get("{{{baseName}}}") != null && {{^isRequired}}jsonObj.get("{{{baseName}}}").isJsonNull()) && {{/isRequired}}!jsonObj.get("{{{baseName}}}").isJsonPrimitive()) {
if (({{^isRequired}}jsonObj.get("{{{baseName}}}") != null && jsonObj.get("{{{baseName}}}").isJsonNull()) && {{/isRequired}}!jsonObj.get("{{{baseName}}}").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `{{{baseName}}}` to be a primitive type in the JSON string but got `%s`", jsonObj.get("{{{baseName}}}").toString()));
}
{{/isString}}
Expand Down

0 comments on commit 9f62588

Please sign in to comment.