我关注http://jsonapi.org/format/#document-top-level
我注意到以下端点(路线):
/articles/1/relationships/author
在 Rails 中,这条路线将如何构建routes.rb
?
resources :articles do
# What goes here?
# Should relationship be a namespace or other?
# I guess author can be defined as a collection, or just a simple get
end
relationships
不需要 7 个 RESTFUL 动作中的任何一个。