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

Example of Nested paths #230

Open
Shpadoinkle opened this issue Mar 16, 2022 · 1 comment
Open

Example of Nested paths #230

Shpadoinkle opened this issue Mar 16, 2022 · 1 comment
Labels

Comments

@Shpadoinkle
Copy link

Shpadoinkle commented Mar 16, 2022

It would be great to get an example of how to create a nested path.

ie- /users/:userId/posts

with posts having its own post/patch functionality

I have been attempting the example in customMethods but i'm not sure if this achieves what i need it to. I can't get anything to appear in the docs and requests result in a 404.

And if i try to follow the example at https://docs.feathersjs.com/help/faq.html#how-do-i-do-nested-or-custom-routes
I receive the error Invalid reference token: :userid if i follow the example

@Mairu
Copy link
Collaborator

Mairu commented Mar 16, 2022

Hi, I added a nested path example to my test repository.

https://github.com/Mairu/feathersjs-swagger-tests/blob/feathers-v4/src/services/users/posts/posts.service.js

I did not test it too much, but the creation and reading of posts of a user were working.

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

No branches or pull requests

2 participants