cypher
2 years agoOccasional Visitor
How does validation work? Path or method first?
Hi, Everyone!
We're currently using Swagger 2.0 as our YAML configuration file.
Let's say, I have these two paths:
Path A
GET https://my-gateway.com/client/{client-id}
Path B:
POST https://my-gateway.com/client/addNewClient
As a tester, I want to verify my gateway returns correct error messages on Path B:
I want to produce - 404 Error Not Found
POST https://my-gateway.com/client/addNewClientzzz
I'm receiving 405 instead of 404, possibly because it falls under Path A, and treats 'addNewClientzzz' as {client-id} (path parameter).
Just wondering if this is an expected behavior? Does it check first the path, and not the method?