pactflow / swagger-mock-validator

Other
14 stars 5 forks source link

fix: ignore security requirements when unsuccessful #30

Closed vwong closed 1 year ago

mefellows commented 1 year ago

A general 404 can't be supported because the OAS doesn't have one (or does it?)

Are you saying that in the case a user doesn't define a 404 in the OAS, but expects one in the Pact it would fail the check? If so, that is sensible to me. We should only allow it to pass where an explicit status code exists in the OAS, I think.

vwong commented 1 year ago

As I understand OAS, you can attach responses to specific routes only, there is no catch-all route. So, if there is a 404 response for a given route, then we'll match it accordingly, but we can't catch-all 404s.