You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case the api has path parameters the FindRoute is unable to distinguish between "Path not found" and "Path doesn't support the HTTP method". Seems becasue of the way call "root.Match(method + " " + remainingPath)" and subsequently "swagger.Paths[remainingPath]"
Is this understanding correct ? If so is there any plan of fixing this
.... either the root.Match has to be without "method" and method later validated in pathItem.GetOperation (anyways being done).
The text was updated successfully, but these errors were encountered:
Note that I should be dusting off #210 soon but this PR suffers the issue you mention.
I am not aware of cases that make these errors indistinguishable in the current API. Do you have an example spec and requests that would show this? thanks
For example in spec if we have an api like "/api/cards" which is only supported for "get" and in case a post is sent curl -X POST http://server-name/api/cards" is sent it reports as "Path doesn't support the HTTP method" but if the api is like "/api/cards/{card-id}" then for the traffic curl -X POST http://server-name/api/cards/10" it gets reported as "route not found"
I understand you'd rather get a badmethod in the second case, correct? So you would prefer a triplet of errors: "bad method", "bad path" and "bad method and path"?
In case the api has path parameters the FindRoute is unable to distinguish between "Path not found" and "Path doesn't support the HTTP method". Seems becasue of the way call "root.Match(method + " " + remainingPath)" and subsequently "swagger.Paths[remainingPath]"
Is this understanding correct ? If so is there any plan of fixing this
.... either the root.Match has to be without "method" and method later validated in pathItem.GetOperation (anyways being done).
The text was updated successfully, but these errors were encountered: