Skip to content

Commit

Permalink
fixed build error when array type is present on ref schema
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMario committed Nov 23, 2021
1 parent 6ae37b1 commit b02bdc8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.PathItem;
import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
Expand Down Expand Up @@ -474,7 +475,7 @@ public CodegenProperty fromProperty(String name, Schema propertySchema) {
CodegenProperty codegenProperty = super.fromProperty(name, propertySchema);
if (propertySchema != null && propertySchema.get$ref() != null) {
Schema refSchema = OpenAPIUtil.getSchemaFromRefSchema(propertySchema, this.openAPI);
if (refSchema != null && !isObjectSchema(refSchema) && refSchema.getEnum() == null) {
if (refSchema != null && !isObjectSchema(refSchema) && !(refSchema instanceof ArraySchema) && refSchema.getEnum() == null) {
setSchemaProperties(name, codegenProperty, refSchema);
processPropertySchemaTypes(name, codegenProperty, refSchema);
}
Expand Down

0 comments on commit b02bdc8

Please sign in to comment.