Closed marcelthole closed 2 years ago
- To help static code analysis tools a
assert($responseContent instanceof MediaType);
is required as quickfix
keep in mind however, that this is just annotation, adding a reference here would probably still be possible in an openapi document even though it would not be strictly valid due to the spec. So your code should still to the type check.
IS
the
@property
definition in the\cebe\openapi\spec\Response
class is* @property MediaType[]|Reference[] $content
But this property can only contain a MediaType and no Reference
See https://github.com/OAI/OpenAPI-Specification/blob/3.0.2/versions/3.0.2.md#responseObject and https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#response-object
To help static code analysis tools a
assert($responseContent instanceof MediaType);
is required as quickfixShould
MediaType
because aReference
is not allowed there