Open sebastianheinig opened 3 months ago
I think I see how this is happening. There are two related issues here:
allOf
with two schemas but only one of them is nullable, a strict OpenAPI validator would say that the result is not nullable. That is, a null value would not be a valid RelatedItem, because it would satisfy RelatedItemSuper but would not satisfy the non-nullable inline schema with propertyB. The fix for that would just be to make the inline schema nullable too; unfortunately it still wouldn't work with the current generator, due to the implementation issue I mentioned.
Describe the bug When using a schema that contains an "allOf" reference to a nullable object, the generation fails with the message "Cannot take allOf a non-object".
OpenAPI Spec File Document to recreate:
A real world example can be found here.
Desktop (please complete the following information):
Additional context Changing "nullable" to "false" on "RelatedItem" in the above example works but does not seem to be a suitable solution as the construct used is legitimate, or is it not?