Closed davidyell closed 9 months ago
Try adding an assertValidRequest()
before validating the response. It will maybe tell you what's going wrong
Awesome, thanks for the quick reply. That assertion has highlighted that I had accidentally missed the prefix from path names. However the response assertion is still passing, even with a totally garbage response.
Does this validator support allOf
etc?
Nevermind, I'll try a different validator. Thanks for the replies
You can try future v2 requiring hotmeteor/spectator:dev-master There is still some improvements to make but we are working on it.
I am running Laravel 10 with an OpenAPI 3.0.3 version specification and no matter how hard I try and break both the spec and the code generating the response, the
$response->assertValidResponse(200);
always passes the test.What am I missing? I am testing by commenting out properties from my Resource class, which is serialized to json, and the test still passes.
I have my spec at
./openapi.yaml
and have added to my.env.testing
file, perhaps I misconfigured the project?Do I have to clear my application cache when making changes to my test or openapi spec?