{"action":"created","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/571","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/571/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/571/events","html_url":"https://github.com/cerebris/jsonapi-resources/pull/571","id":122131405,"number":571,"title":"Rebased / updated @AKHarris' \"custom links defined per resource\"","user":{"login":"reidab","id":13192,"avatar_url":"https://avatars.githubusercontent.com/u/13192?v=3","gravatar_id":"","url":"https://api.github.com/users/reidab","html_url":"https://github.com/reidab","followers_url":"https://api.github.com/users/reidab/followers","following_url":"https://api.github.com/users/reidab/following{/other_user}","gists_url":"https://api.github.com/users/reidab/gists{/gist_id}","starred_url":"https://api.github.com/users/reidab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reidab/subscriptions","organizations_url":"https://api.github.com/users/reidab/orgs","repos_url":"https://api.github.com/users/reidab/repos","events_url":"https://api.github.com/users/reidab/events{/privacy}","received_events_url":"https://api.github.com/users/reidab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-14T21:06:45Z","updated_at":"2015-12-15T14:30:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/pulls/571","html_url":"https://github.com/cerebris/jsonapi-resources/pull/571","diff_url":"https://github.com/cerebris/jsonapi-resources/pull/571.diff","patch_url":"https://github.com/cerebris/jsonapi-resources/pull/571.patch"},"body":"A quick attempt to resurrect @AKHarris' PR #486 :smile: \r\n\r\nThis branch rebases the changes from #486 onto the current master, fixing merge conflicts, and updates the `custom_link` lambda to receive `ResourceSerializer#custom_generation_options`, per [this comment](https://github.com/cerebris/jsonapi-resources/pull/486#issuecomment-152297638)."},"comment":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/comments/164780769","html_url":"https://github.com/cerebris/jsonapi-resources/pull/571#issuecomment-164780769","issue_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/571","id":164780769,"user":{"login":"AKHarris","id":5504772,"avatar_url":"https://avatars.githubusercontent.com/u/5504772?v=3","gravatar_id":"","url":"https://api.github.com/users/AKHarris","html_url":"https://github.com/AKHarris","followers_url":"https://api.github.com/users/AKHarris/followers","following_url":"https://api.github.com/users/AKHarris/following{/other_user}","gists_url":"https://api.github.com/users/AKHarris/gists{/gist_id}","starred_url":"https://api.github.com/users/AKHarris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AKHarris/subscriptions","organizations_url":"https://api.github.com/users/AKHarris/orgs","repos_url":"https://api.github.com/users/AKHarris/repos","events_url":"https://api.github.com/users/AKHarris/events{/privacy}","received_events_url":"https://api.github.com/users/AKHarris/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T14:30:04Z","updated_at":"2015-12-15T14:30:04Z","body":"@reidab I started initially by implementing `custom_link` as a DSL but I've (fairly lately) become a big fan of using primitive data types by default. I really like Hashes, and the example above seems is clear and elegant to me. It also encourages me to look at the `link_builder` object to understand `#self_link` and any other methods that may be useful to me (and encouraging users of a library to look at source code is a plus imo).\r\n\r\nAnd then maybe the DSL should emerge from use cases (perhaps the `raw` becomes super common and should thus have some shorthand for building it).\r\n\r\nThese are just a few of my immediate thoughts."}}