Found in #35, when including a resource, it should be the relationship name that is used and not the type. Using the json:api example of blog/author:
GET /articles?include=author
{
"data": [{
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON API paints my bikeshed!"
},
"links": {
"self": "http://example.com/articles/1"
},
"relationships": {
"author": {
"links": {
"self": "http://example.com/articles/1/relationships/author",
"related": "http://example.com/articles/1/author"
},
"data": { "type": "people", "id": "9" }
},
}
}],
"included": [{
"type": "people",
"id": "9",
"attributes": {
"first-name": "Dan",
"last-name": "Gebhardt",
"twitter": "dgeb"
},
"links": {
"self": "http://example.com/people/9"
}
}
}
In ResourceMapping.cs the line:
var relationship = currentMapping.Relationships.SingleOrDefault(x => x.RelatedBaseResourceType == part);
Should be checking against a resource name not the underlying type.
Found in #35, when including a resource, it should be the relationship name that is used and not the type. Using the json:api example of blog/author:
In
ResourceMapping.csthe line:var relationship = currentMapping.Relationships.SingleOrDefault(x => x.RelatedBaseResourceType == part);Should be checking against a resource name not the underlying type.