Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include self links are wrong #27

Open
rgant opened this issue Feb 24, 2016 · 3 comments
Open

Include self links are wrong #27

rgant opened this issue Feb 24, 2016 · 3 comments

Comments

@rgant
Copy link

rgant commented Feb 24, 2016

For the request http://localhost:8080/v1/books/7?include=author I get the following for the included key:

{
    "data": "...",
    "included": [{
        "id": "2",
        "type": "authors",
        "attributes": {
            "name": "J. K. Rowling",
            "date_of_birth": "1965-07-31",
            "date_of_death": null,
            "created_at": "2016-02-24 17:56:52",
            "updated_at": "2016-02-24 17:56:52"
        },
        "relationships": {
            "books": {
                "links": {
                    "self": "/v1/books/2/relationships/books",
                    "related": "/v1/books/2/books"
                }
            },
            "photos": {
                "links": {
                    "self": "/v1/books/2/relationships/photos",
                    "related": "/v1/books/2/photos"
                }
            }
        },
        "links": {
            "self": "/v1/books/2"
        }
    }]
}

I believe that the included.links.self should be "/v1/authors/2" instead of "/v1/books/2"

@sgraham785
Copy link

+1 ...i get the same return

@sgraham785
Copy link

anyone patch this up yet?

@jamesplease
Copy link
Member

PRs welcome ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants