Our api will have a reusable /posts
subroute that will apply to different top-level routes.
For example:
/me/posts
/users/{user-id}/posts
...
Example for posts:
/posts
/{post-id}
/likes
/comments
/{comment-id}
...
Posts will have fixed subroutes, parameters etc as well.
What is the standard way to define such a default, reusable subroute with RAML?
Of course, one could decide to turn this around and make a /posts endpoint, but I don't think that the API definition should be changed based on RAML capabilities. Also, I should be able to have multiple endpoints pointing to the same resource, if I wanted it to.
If you have an answer, please share an example according the requirements.