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

Route with a . (period) between parameters #192

Closed
kissmygritts opened this issue Jun 10, 2021 · 2 comments · Fixed by #193
Closed

Route with a . (period) between parameters #192

kissmygritts opened this issue Jun 10, 2021 · 2 comments · Fixed by #193

Comments

@kissmygritts
Copy link

I've looked over the tests here: https://github.com/delvedor/find-my-way/blob/master/test/issue-17.test.js and I they all seem to check that parameters are successfully parsed when separated for a hyphen.

Is there a solution for a route like this? /features/:table/:id.:format I get the following for the parameters:

{
    "table": "table",
    "id.:format": "1.geojson"
}
@mcollina
Copy link
Collaborator

Ouch! I don't think this is supported, would you like to send a PR?

@kissmygritts
Copy link
Author

I'll see what I can do, but I can't make any promises.

I did find a work around. In my case the id will always be a number so the following works:
/features/:table/:id(\\d+).:format

{
    "table": "table",
    "id": 1,
    "format": "geojson"
}

Thanks for the quick reply.

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

Successfully merging a pull request may close this issue.

2 participants