{"action":"created","issue":{"url":"https://api.github.com/repos/rs/rest-layer/issues/30","repository_url":"https://api.github.com/repos/rs/rest-layer","labels_url":"https://api.github.com/repos/rs/rest-layer/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/rs/rest-layer/issues/30/comments","events_url":"https://api.github.com/repos/rs/rest-layer/issues/30/events","html_url":"https://github.com/rs/rest-layer/pull/30","id":171230478,"number":30,"title":"Initial JSONSchema Work","user":{"login":"yanfali","id":2275667,"avatar_url":"https://avatars.githubusercontent.com/u/2275667?v=3","gravatar_id":"","url":"https://api.github.com/users/yanfali","html_url":"https://github.com/yanfali","followers_url":"https://api.github.com/users/yanfali/followers","following_url":"https://api.github.com/users/yanfali/following{/other_user}","gists_url":"https://api.github.com/users/yanfali/gists{/gist_id}","starred_url":"https://api.github.com/users/yanfali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanfali/subscriptions","organizations_url":"https://api.github.com/users/yanfali/orgs","repos_url":"https://api.github.com/users/yanfali/repos","events_url":"https://api.github.com/users/yanfali/events{/privacy}","received_events_url":"https://api.github.com/users/yanfali/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":33,"created_at":"2016-08-15T18:27:35Z","updated_at":"2016-08-17T05:36:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rs/rest-layer/pulls/30","html_url":"https://github.com/rs/rest-layer/pull/30","diff_url":"https://github.com/rs/rest-layer/pull/30.diff","patch_url":"https://github.com/rs/rest-layer/pull/30.patch"},"body":"About this PR:\r\n\r\n- serve as a basis for discussion about whether this is something that\r\n  should be part of schema\r\n- resolve issues about efficiency and general approach\r\n- discuss API naming\r\n- serve as an initial implementation - this is incomplete but covers\r\n  many common uses\r\n- demonstrate some unit tests with the knowledge that the goconvey dependency needs\r\n  to be removed\r\n- doesn't generate errors - simply ignores elements it doesn't understand. I assume if something is valid Schema it should not have errors.\r\n\r\nThe API is extremely simple and returns a string as it's default output:\r\n\r\n```\r\njsonSchema := jsonschema.SchemaToJSONSchema(&mySchema)\r\n```\r\n\r\nI use this as the output to a handler. By using a string I can embed it within other json documents, as it is itself valid JSON. It doesn't attempt to pretty print anything, just pass a valid well formed JSON document back to the caller.\r\n\r\nAs stated, it is an *incomplete* implementation, but it does work for a lot of common use cases and I think could be easily extended to cover many of the other use cases the JSONSchema spec encompasses. I have not tried to use this to generate code via a JSONSchema tool yet; but adding something like ```https://github.com/xeipuuv/gojsonschema``` as a unit test would be fairly easy."},"comment":{"url":"https://api.github.com/repos/rs/rest-layer/issues/comments/240317928","html_url":"https://github.com/rs/rest-layer/pull/30#issuecomment-240317928","issue_url":"https://api.github.com/repos/rs/rest-layer/issues/30","id":240317928,"user":{"login":"rs","id":68232,"avatar_url":"https://avatars.githubusercontent.com/u/68232?v=3","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T05:36:49Z","updated_at":"2016-08-17T05:36:49Z","body":"I have no experience with JSON Schema, so I can't really juge if we are sticking to the spec with this implementation. In term of code structure, I'm aligned.\r\n\r\nSo what's next? Is your plan to fulfill the implementation of the spec?"}}
{"actor":{"display_login":"rs"}}