DINA-Web / guidelines

Guidelines on how to create, test and deploy modules within the DINA-project
2 stars 1 forks source link

API:Guidelines , adhering to jsonapi.org - the 'relationsships'-tag ? #30

Open Inkimar opened 8 years ago

Inkimar commented 8 years ago

the http://jsonapi.org/ ( http://jsonapi.org/format/ ) describes the tag 'relationships'

relationships: a relationships object describing relationships between the resource and other JSON API resources.

// ... { "type": "articles", "id": "1", "attributes": { "title": "Rails is Omakase" }, "relationships": { "author": { "links": { "self": "/articles/1/relationships/author", "related": "/articles/1/author" }, "data": { "type": "people", "id": "9" } } } } // ...

We are not using the tag 'relationships' .

The question is; should we use the 'relationships' -tag in the 'meta' - and 'data' - section ?

gnewton commented 8 years ago

I think we should use this. All of the relations listed in the guideline could be included as far as I can see.