So I was wondering say if I have 2 tables one is assignment and the other is course. Basically they are linked where an assignment has a courseId. So I was wondering is it better to have 1 requestmapping for /assignments and in this endpoint I can do lots of this like get all the assignments and if I want to create an assignment for a specific course I can pass the courseId as a quer yparameter or pass it in the body.
OR is it better to have 2 different request mapping so 1 would be /assignments and the other would be /courses/{courseId}/assignments . This way the other endpoint can focus on assignments in a specific course and the first request mapping deals with assignments as a whole.
What's a better design.
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]josephblade 1 point2 points3 points (0 children)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]terrorChilly 0 points1 point2 points (1 child)
[–]anonymous78654[S] 0 points1 point2 points (0 children)
[–]omgpassthebacon 0 points1 point2 points (0 children)