Are you able to have links for data entries for real

Am I allowed to have links inside of my data array inside Relationships?

my goal here is to have direct access to /author/42 if needed or see all possible authors given an article. Is this typical? Or would it be better to not have a link for each author and instead have the client use include=author

{

    "data": {

      "type": "articles",

      "id": "1",

      "attributes": {

        "title": "JSON:API paints my bikeshed!",

        "body": "The shortest article. Ever.",

        "created": "2015-05-22T14:56:29.000Z",

        "updated": "2015-05-22T14:56:28.000Z"

      },

      "relationships": {

        "author": {

            "links": {

                "related": "/articles/1/authors"

            },

            "data": [

                    {

                        "id": "42",

                        "type": "people",

                        "links": {

                            "self": "/author/42" //is this allowed?

                        }

                    }

                ]

        }

      }

    }

That’s not allowed by the current and upcoming (1.1) specifications.

The relationships.author.links.related URL would link to a collection of authors of the article; if the client wanted to receive more details, adding include=author as a query parameter would add all the related authors to the included list at the top-level of the response, and each of those could have it’s own links.self URL.

-Fred

2 Likes