我正在创建一个API,我希望POST
和GET
来自父对象的子对象。例如:
GET challenge/1/solutions
= [Listof Solutions] filtered with challenge_id=1
GET challenge/1/solution/1
= Solution with id=1 filtered with challenge_id=1
POST challenge/1/solution
= Add to Solution with challenge_id=1
solution
个网址仅返回用户提交的解决方案。上面的URL用于访问每个挑战的解决方案列表。
我需要这个解决方案来应用于多个子对象。