OneOf nested inside a AllOf not supported
georgeboot opened this issue · 0 comments
georgeboot commented
I have a generic schema that applies to every response (GenericResponseSchema
). I also have a couple of specific response types (FirstSpecificResponseSchema
and SecondSpecificResponseSchema
).
I want to do the following:
return Response::ok()->description('Successful response')->content(
MediaType::create()->mediaType('application/geo+json')->schema(
AllOf::create()->schemas(
GenericResponseSchema::ref(),
OneOf::create()->schemas(
FirstSpecificResponseSchema::ref(),
SecondSpecificResponseSchema::ref(),
)
)
)
);
But this does not work, because AllOf::schemas()
only takes Schema
, not OneOf
.