pyramid_swagger icon indicating copy to clipboard operation
pyramid_swagger copied to clipboard

pyramid_swagger should return 405 if it finds a route, but no matching method

Open striglia opened this issue 9 years ago • 0 comments

See https://http.cat/405

If pyramid_swagger is configured to be strict, we can assume that any incoming request needs to match a resource and method in our Swagger spec. If it matches neither, we currently return a 404. If it matches just the resource but not a method, we ought to return 405.

This should be simple -- a quick additional test to cover this behavior and a slight alteration to our main tween resolving the proper path and reacting to not finding a perfect match.

striglia avatar Jul 21 '16 08:07 striglia