Skip to content

Commit

Permalink
OpenAPITools#582 Fixed the generation of model properties whose data …
Browse files Browse the repository at this point in the history
…type is a composed (allOf) schema. Before this fix, the data type name of the generated property was that of the first model participating in the allOf clause. After this fix the property data type is again as expected: the one of the composed schema and not one of its parents.
  • Loading branch information
Rubén Martínez committed Aug 1, 2018
1 parent 82156b6 commit 61a439e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ public static Schema unaliasSchema(Map<String, Schema> allSchemas, Schema schema
} else if (isStringSchema(ref) && (ref.getEnum() != null && !ref.getEnum().isEmpty())) {
// top-level enum class
return schema;
} else if (isMapSchema(ref) || isArraySchema(ref)) { // map/array def should be created as models
} else if (isMapSchema(ref) || isArraySchema(ref) || isComposedSchema(ref)) { // map/array def should be created as models
return schema;
} else {
return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref())));
Expand Down

0 comments on commit 61a439e

Please sign in to comment.