Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path matching will incorrectly match a request which ends with a valid operation path to that operation rather than return a 404 #39

Open
jongeorge1 opened this issue May 21, 2020 · 1 comment
Assignees

Comments

@jongeorge1
Copy link
Contributor

Path matching appears to be incorrectly matching operations where the operation template provided in the OpenAPI definition matches the end of the requested path.

For example, if the operation in the YAML template is

  /thing1/thing2::
    get:

and the requested path is /a/b/c/thing1/thing2, then the OpenApiDocumentProvider.GetOperationPathTemplate method will erroneously return the operation as a match for the request.

@jongeorge1 jongeorge1 changed the title Path matching will match a partial path rather than return a 404 Path matching will incorrectly match a request which ends with a valid operation path to that operation rather than return a 404 May 21, 2020
jongeorge1 added a commit that referenced this issue May 21, 2020
@jongeorge1 jongeorge1 linked a pull request May 21, 2020 that will close this issue
@jongeorge1
Copy link
Contributor Author

jongeorge1 commented May 21, 2020

I've added some failing specs in #40 to illustrate this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants