fromYaml($yaml)->getRoutedRequestValidator(); $psrRequest = new ServerRequest( 'POST', 'http://localhost:8000/api/v1/products.create', ['Content-Type' => 'application/json'], <<expectException(ValidationFailed::class); $validator->validate($address, $psrRequest); } }