allOf Inheritance is broken in schema with more than two layers hierarchy
Created by: globalstick
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
In schema hierarchy with more, than two layers by Code Generation all classes in parent classes tree are merged within child class.
For example, if you try to generate a model classes from SchemaC, which allOfs SchemaB (with discrimanator), and SchemaB (with discrimanator) allofs SchemaA (with discrimanator), you will get Java class SchemaC, which contains all attributes of SchemaC, SchemaB and SchemaA instead of extending class SchemaB. SchemaC does not extend any class at all. Could you please solve this issue. Some example code is down there (without root yaml file)
openapi-generator version
4.4.2