I'm attempting to send a PATCH request as follows, convert it to PSR7 and then validate the request using OpenAPI PSR-7 Message (HTTP Request/Response) Validator, which fails with the following message, "Schema(or data) validation failed: All of the required rules must pass for { }".
I suspect its the request itself, or how I'm using the Symfony PSR bridge.
curl -X PATCH "http://local.domain/api/v1/path/a60360dc-a32e-49a1-bf03-20bf8c2bbbdf" -H "Content-Type: application/json" -H "Accept: application/json" -d '{"property":"value"}'
And converting the HttpFoundation to PSR7 as follows:
$psr17Factory = new \GuzzleHttp\Psr7\HttpFactory();
$psrHttpFactory = new \Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory);
/** @var \Symfony\Component\HttpFoundation\Request $request */
$psrRequest = $psrHttpFactory->createRequest($request);
When debugging, the request $body from PsrHttpFactory::createRequest() here (note the 2.2.0 version), appears as seen in the attached screenshot.
However, after the conversion, I get the following. $psrRequest->getParsedBody() is an empty array. $psrRequest->getBody()->getContents() is an empty string.
