{"action":"created","issue":{"url":"https://api.github.com/repos/github/gsoc/issues/13","labels_url":"https://api.github.com/repos/github/gsoc/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/github/gsoc/issues/13/comments","events_url":"https://api.github.com/repos/github/gsoc/issues/13/events","html_url":"https://github.com/github/gsoc/issues/13","id":59677806,"number":13,"title":"About the hypermedia idea of Hub","user":{"login":"shanzi","id":557294,"avatar_url":"https://avatars.githubusercontent.com/u/557294?v=3","gravatar_id":"","url":"https://api.github.com/users/shanzi","html_url":"https://github.com/shanzi","followers_url":"https://api.github.com/users/shanzi/followers","following_url":"https://api.github.com/users/shanzi/following{/other_user}","gists_url":"https://api.github.com/users/shanzi/gists{/gist_id}","starred_url":"https://api.github.com/users/shanzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanzi/subscriptions","organizations_url":"https://api.github.com/users/shanzi/orgs","repos_url":"https://api.github.com/users/shanzi/repos","events_url":"https://api.github.com/users/shanzi/events{/privacy}","received_events_url":"https://api.github.com/users/shanzi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-03T17:44:45Z","updated_at":"2015-03-07T08:51:03Z","closed_at":"2015-03-06T04:03:32Z","body":"After skimmed over the source code of go-octokit and some related material, I found the key problem makes the client not eligible may stands in Golang's characteristic of static typing. \r\n\r\nLack of meta programing seems not only lead to code redundancy, but also prevents the implementation of a general library that can be used for other APIs.\r\n\r\nBut as soon as I see the word _hypermedia_, I thought of a very similar thing: _hyper json schema_ ([a good article about it](https://brandur.org/elegant-apis)) . Tool chains around hyper json schema are rich and it also has some abilities to define nested restful resource.\r\n\r\nIn fact, there already exists a Go library that translates hyper json schema into API client in Golang: [Schematic](https://github.com/interagent/schematic). It has been used by the heroku's fast CLI client [hk](https://github.com/heroku/hk) as the generator of API agent.\r\n\r\nI guess [Schematic](https://github.com/interagent/schematic) may not be a good solution for [Hub](https://github.com/github/hub) because of the following problems:\r\n\r\n1. Hyperlinks is predefined in hyper json schema other than response to what the API gives, so it is not as flexible\r\n2. The protocol generated is not compatible with go-octokit and migration means a lot of modification of [Hub](https://github.com/github/hub)\r\n3. Lack of API discoverability\r\n\r\nBut I still regard hyper json schema a good choice and maybe generated go code (with some tweak) is better than current hand writing redundantly code.\r\n\r\nSo, is it acceptable to transform go-octokit from human writing to generated? Maybe at first a generated client with exactly same interface and generally changed to one with more elegant protocol along with Hub?\r\n\r\nBTW: I still have some other elementary ideas but I'm not sure is it suitable to discuss them in a public place like issues. Maybe email in private is better? "},"comment":{"url":"https://api.github.com/repos/github/gsoc/issues/comments/77680087","html_url":"https://github.com/github/gsoc/issues/13#issuecomment-77680087","issue_url":"https://api.github.com/repos/github/gsoc/issues/13","id":77680087,"user":{"login":"mislav","id":887,"avatar_url":"https://avatars.githubusercontent.com/u/887?v=3","gravatar_id":"","url":"https://api.github.com/users/mislav","html_url":"https://github.com/mislav","followers_url":"https://api.github.com/users/mislav/followers","following_url":"https://api.github.com/users/mislav/following{/other_user}","gists_url":"https://api.github.com/users/mislav/gists{/gist_id}","starred_url":"https://api.github.com/users/mislav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mislav/subscriptions","organizations_url":"https://api.github.com/users/mislav/orgs","repos_url":"https://api.github.com/users/mislav/repos","events_url":"https://api.github.com/users/mislav/events{/privacy}","received_events_url":"https://api.github.com/users/mislav/received_events","type":"User","site_admin":true},"created_at":"2015-03-07T08:51:03Z","updated_at":"2015-03-07T08:51:03Z","body":"On Fri, Mar 6, 2015 at 7:22 AM, Brandon Keepers <notifications@github.com>\nwrote:\n\n> Hi @shanzi <https://github.com/shanzi>, sorry for the delay in\n> responding. I think @mislav <https://github.com/mislav> is traveling this\n> week.\n>\n> That is true. Sad to hear that we had to drop this project in the\nmeantime. However, we can come up with some new ones!\n"}}