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

Cannot validate path parameters encoded with new router #397

Closed
rtfpessoa opened this issue Aug 10, 2021 · 2 comments · Fixed by #400
Closed

Cannot validate path parameters encoded with new router #397

rtfpessoa opened this issue Aug 10, 2021 · 2 comments · Fixed by #400

Comments

@rtfpessoa
Copy link
Contributor

rtfpessoa commented Aug 10, 2021

Hi,

My paths are not being validated correctly with the new mux router.

Seems like the problem is here https://github.com/getkin/kin-openapi/blob/master/routers/gorillamux/router.go#L59

Any reason to not use the encoded path originally?

e.g.:

/my/pa%2Fram/path should match the route /my/{param}/path but it does not.

@fenollp
Copy link
Collaborator

fenollp commented Aug 10, 2021

Sounds like an issue specific to the encoding of / being %2F.

If you can use the originally encoded path and solve this issue for you I can help you with the pull request.

@rtfpessoa
Copy link
Contributor Author

@fenollp Not sure I got exactly what you meant, but I got a PR working.

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