http://jsonapi.org1.通篇没有讲如何create relationship的。
一种方法是认为relationship也是resource,拿post和comment举例,post也是comment的links
```
POST /comments
{
content: ”xxxx",
links: {
posts: "1"
}
}
```
还有一种就是create relationship.
```
POST /posts/1/comments
{
comments: {
content: "xxx"
}
}
```
还有就是分2步,先创建comment,然后再updating posts/1的relationship,这样api比较啰嗦。
你们会选哪种?