Skip to content

Commit b710270

Browse files
Adding Gonzalo's comment
Co-authored-by: Gonzalo Muñoz <[email protected]>
1 parent 824ad70 commit b710270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/wrapper/QuarkusJavaClientCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo
154154
// Property is a `type: object` without `additionalProperties: true`, without `properties`, but has `default` values set!
155155
// In this peculiar situation, the template will try to initialize a Java Object with such values, and it will fail to compile.
156156
// See https://github.com/quarkiverse/quarkus-openapi-generator/issues/1185 for more context.
157-
if (p.getType().equals("object") && p.getDefault() != null && p.getAdditionalProperties() == null
157+
if ("object".equals(p.getType()) && p.getDefault() != null && p.getAdditionalProperties() == null
158158
&& p.getItems() == null) {
159159
p.setAdditionalProperties(true);
160160
}

0 commit comments

Comments
 (0)