chibisov / drf-extensions

DRF-extensions is a collection of custom extensions for Django REST Framework
http://chibisov.github.io/drf-extensions/docs
MIT License
1.47k stars 208 forks source link

"GitHub Style" Nested Routing #53

Closed cancan101 closed 6 years ago

cancan101 commented 10 years ago

Support for GitHub style nested routing:

/<userId>/<reposId>/...

this instead of:

/<userId>/repositories/<reposId>/...
kevin-brown commented 10 years ago

This sounds similar to https://github.com/tomchristie/django-rest-framework/issues/1978#issuecomment-61966453, which was recently rejected from the core.

cancan101 commented 10 years ago

So what are thoughts on adding this sort of feature to drf-extensions?

chibisov commented 10 years ago

Do you have any suggestions about router interfaces for this feature?

cancan101 commented 9 years ago

Maybe add a parameter to the router: collapse that specifies not adding the intermediate hierarchy.

cancan101 commented 9 years ago

There are some corner cases ie you would have issues if you wanted to support: groups/<group_id>/users/<user_id> AND groups/<group_id>/<user_id> since the user could not be named users.

auvipy commented 8 years ago

+1 and contributions are wellcome