{"action":"opened","issue":{"url":"https://api.github.com/repos/plexus/yaks/issues/87","labels_url":"https://api.github.com/repos/plexus/yaks/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/plexus/yaks/issues/87/comments","events_url":"https://api.github.com/repos/plexus/yaks/issues/87/events","html_url":"https://github.com/plexus/yaks/issues/87","id":74391516,"number":87,"title":"Collection+JSON self link behavior","user":{"login":"plexus","id":32212,"avatar_url":"https://avatars.githubusercontent.com/u/32212?v=3","gravatar_id":"","url":"https://api.github.com/users/plexus","html_url":"https://github.com/plexus","followers_url":"https://api.github.com/users/plexus/followers","following_url":"https://api.github.com/users/plexus/following{/other_user}","gists_url":"https://api.github.com/users/plexus/gists{/gist_id}","starred_url":"https://api.github.com/users/plexus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plexus/subscriptions","organizations_url":"https://api.github.com/users/plexus/orgs","repos_url":"https://api.github.com/users/plexus/repos","events_url":"https://api.github.com/users/plexus/events{/privacy}","received_events_url":"https://api.github.com/users/plexus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-08T14:59:33Z","updated_at":"2015-05-08T14:59:33Z","closed_at":null,"body":"It seems we were having some issues with acceptance tests not actually working as intended. I'm working on a PR that fixes that. It seems we had some CJ behavior that's in conflict with some of the acceptance examples but that wasn't caught before, and that I think we have to revisit.\r\n\r\nThe question is how to treat \"self\" links. CJ has a generic \"links\" collection on each resource, but also a \"href\". At the moment we render a self link at the top level as a generic self link, and at lower levels as href. I think both of these are wrong.\r\n\r\n@mamund clarifies here: https://groups.google.com/d/msg/collectionjson/RHcw72kHUno/hzF3WSbn-ZsJ\r\n\r\n> yes, the top link SHOULD be the *collection* URL, which will not always be the *self* URL.\r\n\r\nIn Collection+JSON a singular resource is represented as a collection of one. So the way I interpret this is: If we're rendering a \"real\" collection (a `Yaks::CollectionResource`), then render a self link as \"href\", and not under \"links\". If we render a singular resource (`Yaks::Resource`), render it as a self link under \"links\", and not as \"href\".\r\n\r\nDoes that make sense? @carlesjove @mamund any input you can give on this? Thanks!"}}