-
Notifications
You must be signed in to change notification settings - Fork 140
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
Bug -
parameter separator logic
#147
Comments
In #27, this feature was actually coded with - as a separator, so it's working as expected. We can potentially change this in a semver-major (one is due soon), but it 's not clear how if we want to retain similar functionality (having a part of a segment being parametric). |
Thanks for the background @mcollina. So, what's the expected behavior of |
I looked at https://github.com/delvedor/find-my-way/blob/master/test/issue-17.test.js and realized that my first example would make What do you think about wrapping a param to indicate that it should be taken literally? e.g. |
That would work. |
Hello, What's the next step?? |
Somebody that needs this feature should work on it ;) |
I've got a situation where I'm taking an OpenAPI v3 doc, parsing it, and registering its paths in find-my-way via fastify.
However, I'm facing a problem where the OpenAPI doc has path parameters in the format
{some-param}
. I convert those to:some-param
for find-my-way, but they're then interpreted as a parametersome
+ a path segmentparam
. This is caused by this parsing logic: https://github.com/delvedor/find-my-way/blob/master/index.js#L131I'll submit a PR, but I think that logic should ensure that the
-
character is followed by a:
to indicate the second parameter. Otherwise, it should be assumed that it's just a continuation of the original parameter up to the next/
.The text was updated successfully, but these errors were encountered: