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

blueprint prefix, route wildcard, and params not cooperating #2883

Closed
stebl opened this issue Apr 27, 2015 · 3 comments
Closed

blueprint prefix, route wildcard, and params not cooperating #2883

stebl opened this issue Apr 27, 2015 · 3 comments
Labels
blueprints Issue only occurs when using the blueprint API question

Comments

@stebl
Copy link

stebl commented Apr 27, 2015

I think these are all the relevant steps...

  1. Turn on the blueprints prefix, ex 'v1'
  2. to work around prefixing in routes, I did 'get /v*/myModel/:id/someRoute': 'myController:someRoute'
  3. call the route GET /v1/myModel/8/someRoute
  4. req.params.all() returns { '0': '8', id: '1' }
@tjwebb tjwebb added question blueprints Issue only occurs when using the blueprint API labels Apr 27, 2015
@sgress454
Copy link
Member

I'm not sure what you're going for with the /v*. Are you trying to do API versioning? Does this issue help?

@stebl
Copy link
Author

stebl commented May 4, 2015

Yes, sorry for the lack of clarity.

I was trying to do versioning with the URL. I wanted to avoid re-writing the routes file in a version bump, so I was using the wildcard.

Yes I believe that issue is a workable solution. Will try and implement that this week.

@sgress454
Copy link
Member

Very good. As for the issue with req.params.all, that is...odd, but seems like a general Express router issue, so I'll close this one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blueprints Issue only occurs when using the blueprint API question
Development

No branches or pull requests

3 participants