{"action":"created","issue":{"url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/39","labels_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/39/comments","events_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/39/events","html_url":"https://github.com/holidayextras/jsonapi-server/pull/39","id":117312017,"number":39,"title":"Foreign query validation","user":{"login":"hxoliverrumbelow","id":3088374,"avatar_url":"https://avatars.githubusercontent.com/u/3088374?v=3","gravatar_id":"","url":"https://api.github.com/users/hxoliverrumbelow","html_url":"https://github.com/hxoliverrumbelow","followers_url":"https://api.github.com/users/hxoliverrumbelow/followers","following_url":"https://api.github.com/users/hxoliverrumbelow/following{/other_user}","gists_url":"https://api.github.com/users/hxoliverrumbelow/gists{/gist_id}","starred_url":"https://api.github.com/users/hxoliverrumbelow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hxoliverrumbelow/subscriptions","organizations_url":"https://api.github.com/users/hxoliverrumbelow/orgs","repos_url":"https://api.github.com/users/hxoliverrumbelow/repos","events_url":"https://api.github.com/users/hxoliverrumbelow/events{/privacy}","received_events_url":"https://api.github.com/users/hxoliverrumbelow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-17T09:07:02Z","updated_at":"2015-11-17T10:32:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/holidayextras/jsonapi-server/pulls/39","html_url":"https://github.com/holidayextras/jsonapi-server/pull/39","diff_url":"https://github.com/holidayextras/jsonapi-server/pull/39.diff","patch_url":"https://github.com/holidayextras/jsonapi-server/pull/39.patch"},"body":"This prevents some erroneous queries from getting as far as resource handlers, for example:\r\n\r\nThis should function correctly and result in 2x resources:\r\nhttp://localhost:16006/rest/articles/?relationships[photos]=aab14844-97e7-401c-98c8-0bd5ec922d93\r\n\r\nThese three queries are invalid and should give sensible errors:\r\n\r\nhttp://localhost:16006/rest/articles/?relationships[photo]=aab14844-97e7-401c-98c8-0bd5ec922d93\r\n`403 - \"Requested relation \"photo\" does not exist on articles\"`\r\n\r\nhttp://localhost:16006/rest/articles/?relationships[content]=aab14844-97e7-401c-98c8-0bd5ec922d93\r\n`403 - \"Requested relation \"content\" does not exist on articles\"`\r\n\r\nhttp://localhost:16006/rest/comments/?relationships[article]=aab14844-97e7-401c-98c8-0bd5ec922d93\r\n`403 - \"Requested relation \"article\" is a foreign reference and does not exist on comments\"`"},"comment":{"url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/comments/157331168","html_url":"https://github.com/holidayextras/jsonapi-server/pull/39#issuecomment-157331168","issue_url":"https://api.github.com/repos/holidayextras/jsonapi-server/issues/39","id":157331168,"user":{"login":"DuncanFenning","id":4907461,"avatar_url":"https://avatars.githubusercontent.com/u/4907461?v=3","gravatar_id":"","url":"https://api.github.com/users/DuncanFenning","html_url":"https://github.com/DuncanFenning","followers_url":"https://api.github.com/users/DuncanFenning/followers","following_url":"https://api.github.com/users/DuncanFenning/following{/other_user}","gists_url":"https://api.github.com/users/DuncanFenning/gists{/gist_id}","starred_url":"https://api.github.com/users/DuncanFenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuncanFenning/subscriptions","organizations_url":"https://api.github.com/users/DuncanFenning/orgs","repos_url":"https://api.github.com/users/DuncanFenning/repos","events_url":"https://api.github.com/users/DuncanFenning/events{/privacy}","received_events_url":"https://api.github.com/users/DuncanFenning/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T10:32:49Z","updated_at":"2015-11-17T10:32:49Z","body":"Nice :+1: "}}