{"action":"created","comment":{"url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/comments/226775877","pull_request_review_id":166688607,"id":226775877,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjc3NTg3Nw==","diff_hunk":"@@ -48,4 +65,58 @@ object Protocol {\n     )\n   }\n \n+  def toJson[T](proto: Protocol[T])(implicit T: Basis[AvroF, T]): Json = {\n+    val withNamespace: Json = Json.fromFields(proto.namespace.map(\"namespace\" -> Json.fromString(_)).toList)\n+\n+    withNamespace deepMerge Json.obj(\n+      \"protocol\" -> Json.fromString(proto.name),\n+      \"types\"    -> Json.fromValues(proto.types.map(scheme.cata(AvroF.toJson))),\n+      \"messages\" -> Json.fromFields(\n+        proto.messages.map(m => m.name -> Message.toJson(m))\n+      )\n+    )\n+  }\n+\n+  def fromFreesFSchema[T](implicit T: Basis[AvroF, T]): Trans[FreesF, AvroF, T] = Trans {\n+    case FreesF.TNull()                => tNull()\n+    case FreesF.TDouble()              => tDouble()\n+    case FreesF.TFloat()               => tFloat()\n+    case FreesF.TInt()                 => tInt()\n+    case FreesF.TLong()                => tLong()\n+    case FreesF.TBoolean()             => tBoolean()\n+    case FreesF.TString()              => tString()\n+    case FreesF.TByteArray()           => tBytes()\n+    case FreesF.TNamedType(name)       => tNamedType(name)\n+    case FreesF.TOption(value)         => tUnion(NonEmptyList(tNull[T]().embed, List(value)))\n+    case FreesF.TList(value)           => tArray(value)\n+    case FreesF.TMap(value)            => tMap(value)\n+    case FreesF.TGeneric(_, _)         => ??? // WAT","path":"src/main/scala/avro/Protocol.scala","position":66,"original_position":61,"commit_id":"ec0c249733d88881450b2a3d4a0c26b7f191f3ff","original_commit_id":"532fdf60d8a6492d2acd0bfc6703f2179b1ad686","user":{"login":"pepegar","id":694179,"node_id":"MDQ6VXNlcjY5NDE3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/694179?v=4","gravatar_id":"","url":"https://api.github.com/users/pepegar","html_url":"https://github.com/pepegar","followers_url":"https://api.github.com/users/pepegar/followers","following_url":"https://api.github.com/users/pepegar/following{/other_user}","gists_url":"https://api.github.com/users/pepegar/gists{/gist_id}","starred_url":"https://api.github.com/users/pepegar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepegar/subscriptions","organizations_url":"https://api.github.com/users/pepegar/orgs","repos_url":"https://api.github.com/users/pepegar/repos","events_url":"https://api.github.com/users/pepegar/events{/privacy}","received_events_url":"https://api.github.com/users/pepegar/received_events","type":"User","site_admin":false},"body":"yeah, it's in my plans, but I need to do some changes to droste's traverse derivation, since its a bit far from flawless so far... (I need traverse to be able to use `M` version of recursion schemes, and I don't want to implement by hand now :))","created_at":"2018-10-19T20:41:31Z","updated_at":"2018-10-19T20:41:32Z","html_url":"https://github.com/higherkindness/skeuomorph/pull/13#discussion_r226775877","pull_request_url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/comments/226775877"},"html":{"href":"https://github.com/higherkindness/skeuomorph/pull/13#discussion_r226775877"},"pull_request":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13"}},"in_reply_to_id":224958269},"pull_request":{"url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13","id":221846298,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxODQ2Mjk4","html_url":"https://github.com/higherkindness/skeuomorph/pull/13","diff_url":"https://github.com/higherkindness/skeuomorph/pull/13.diff","patch_url":"https://github.com/higherkindness/skeuomorph/pull/13.patch","issue_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues/13","number":13,"state":"open","locked":false,"title":"Frees & Avro schema fixes","user":{"login":"pepegar","id":694179,"node_id":"MDQ6VXNlcjY5NDE3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/694179?v=4","gravatar_id":"","url":"https://api.github.com/users/pepegar","html_url":"https://github.com/pepegar","followers_url":"https://api.github.com/users/pepegar/followers","following_url":"https://api.github.com/users/pepegar/following{/other_user}","gists_url":"https://api.github.com/users/pepegar/gists{/gist_id}","starred_url":"https://api.github.com/users/pepegar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepegar/subscriptions","organizations_url":"https://api.github.com/users/pepegar/orgs","repos_url":"https://api.github.com/users/pepegar/repos","events_url":"https://api.github.com/users/pepegar/events{/privacy}","received_events_url":"https://api.github.com/users/pepegar/received_events","type":"User","site_admin":false},"body":"This PR:\r\n\r\n- renames `frees/service.scala` to `frees/protocol.scala` to be homogeneous with avro & protobuf\r\n- deletes `droste` contrib module that has been already contributed to droste.\r\n- adds helper methods to avro ADT\r\n- creates transformer between `AvroF` & `FreesF` schemata\r\n- creates a rendering algebra from `AvroF[A]` to `circe.Json` and creates the renderer from `avro.Protocol[A]` to `circe.Json`.","created_at":"2018-10-10T15:59:55Z","updated_at":"2018-10-19T20:41:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4368bf79f59026080239f3db6b56b9b6964de22f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13/commits","review_comments_url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13/comments","review_comment_url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues/13/comments","statuses_url":"https://api.github.com/repos/higherkindness/skeuomorph/statuses/ec0c249733d88881450b2a3d4a0c26b7f191f3ff","head":{"label":"higherkindness:frees-schema-fixes","ref":"frees-schema-fixes","sha":"ec0c249733d88881450b2a3d4a0c26b7f191f3ff","user":{"login":"higherkindness","id":37459992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NDU5OTky","avatar_url":"https://avatars2.githubusercontent.com/u/37459992?v=4","gravatar_id":"","url":"https://api.github.com/users/higherkindness","html_url":"https://github.com/higherkindness","followers_url":"https://api.github.com/users/higherkindness/followers","following_url":"https://api.github.com/users/higherkindness/following{/other_user}","gists_url":"https://api.github.com/users/higherkindness/gists{/gist_id}","starred_url":"https://api.github.com/users/higherkindness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/higherkindness/subscriptions","organizations_url":"https://api.github.com/users/higherkindness/orgs","repos_url":"https://api.github.com/users/higherkindness/repos","events_url":"https://api.github.com/users/higherkindness/events{/privacy}","received_events_url":"https://api.github.com/users/higherkindness/received_events","type":"Organization","site_admin":false},"repo":{"id":142310903,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzMTA5MDM=","name":"skeuomorph","full_name":"higherkindness/skeuomorph","private":false,"owner":{"login":"higherkindness","id":37459992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NDU5OTky","avatar_url":"https://avatars2.githubusercontent.com/u/37459992?v=4","gravatar_id":"","url":"https://api.github.com/users/higherkindness","html_url":"https://github.com/higherkindness","followers_url":"https://api.github.com/users/higherkindness/followers","following_url":"https://api.github.com/users/higherkindness/following{/other_user}","gists_url":"https://api.github.com/users/higherkindness/gists{/gist_id}","starred_url":"https://api.github.com/users/higherkindness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/higherkindness/subscriptions","organizations_url":"https://api.github.com/users/higherkindness/orgs","repos_url":"https://api.github.com/users/higherkindness/repos","events_url":"https://api.github.com/users/higherkindness/events{/privacy}","received_events_url":"https://api.github.com/users/higherkindness/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/higherkindness/skeuomorph","description":"skema morphisms","fork":false,"url":"https://api.github.com/repos/higherkindness/skeuomorph","forks_url":"https://api.github.com/repos/higherkindness/skeuomorph/forks","keys_url":"https://api.github.com/repos/higherkindness/skeuomorph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/higherkindness/skeuomorph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/higherkindness/skeuomorph/teams","hooks_url":"https://api.github.com/repos/higherkindness/skeuomorph/hooks","issue_events_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues/events{/number}","events_url":"https://api.github.com/repos/higherkindness/skeuomorph/events","assignees_url":"https://api.github.com/repos/higherkindness/skeuomorph/assignees{/user}","branches_url":"https://api.github.com/repos/higherkindness/skeuomorph/branches{/branch}","tags_url":"https://api.github.com/repos/higherkindness/skeuomorph/tags","blobs_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/refs{/sha}","trees_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/higherkindness/skeuomorph/statuses/{sha}","languages_url":"https://api.github.com/repos/higherkindness/skeuomorph/languages","stargazers_url":"https://api.github.com/repos/higherkindness/skeuomorph/stargazers","contributors_url":"https://api.github.com/repos/higherkindness/skeuomorph/contributors","subscribers_url":"https://api.github.com/repos/higherkindness/skeuomorph/subscribers","subscription_url":"https://api.github.com/repos/higherkindness/skeuomorph/subscription","commits_url":"https://api.github.com/repos/higherkindness/skeuomorph/commits{/sha}","git_commits_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/commits{/sha}","comments_url":"https://api.github.com/repos/higherkindness/skeuomorph/comments{/number}","issue_comment_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues/comments{/number}","contents_url":"https://api.github.com/repos/higherkindness/skeuomorph/contents/{+path}","compare_url":"https://api.github.com/repos/higherkindness/skeuomorph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/higherkindness/skeuomorph/merges","archive_url":"https://api.github.com/repos/higherkindness/skeuomorph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/higherkindness/skeuomorph/downloads","issues_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues{/number}","pulls_url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls{/number}","milestones_url":"https://api.github.com/repos/higherkindness/skeuomorph/milestones{/number}","notifications_url":"https://api.github.com/repos/higherkindness/skeuomorph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/higherkindness/skeuomorph/labels{/name}","releases_url":"https://api.github.com/repos/higherkindness/skeuomorph/releases{/id}","deployments_url":"https://api.github.com/repos/higherkindness/skeuomorph/deployments","created_at":"2018-07-25T14:24:23Z","updated_at":"2018-10-19T11:40:36Z","pushed_at":"2018-10-19T20:29:34Z","git_url":"git://github.com/higherkindness/skeuomorph.git","ssh_url":"git@github.com:higherkindness/skeuomorph.git","clone_url":"https://github.com/higherkindness/skeuomorph.git","svn_url":"https://github.com/higherkindness/skeuomorph","homepage":"https://higherkindness.github.io/skeuomorph/","size":829,"stargazers_count":5,"watchers_count":5,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":7,"watchers":5,"default_branch":"master"}},"base":{"label":"higherkindness:master","ref":"master","sha":"20405de6cbac3f9bdf57683b9f566121666d7c71","user":{"login":"higherkindness","id":37459992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NDU5OTky","avatar_url":"https://avatars2.githubusercontent.com/u/37459992?v=4","gravatar_id":"","url":"https://api.github.com/users/higherkindness","html_url":"https://github.com/higherkindness","followers_url":"https://api.github.com/users/higherkindness/followers","following_url":"https://api.github.com/users/higherkindness/following{/other_user}","gists_url":"https://api.github.com/users/higherkindness/gists{/gist_id}","starred_url":"https://api.github.com/users/higherkindness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/higherkindness/subscriptions","organizations_url":"https://api.github.com/users/higherkindness/orgs","repos_url":"https://api.github.com/users/higherkindness/repos","events_url":"https://api.github.com/users/higherkindness/events{/privacy}","received_events_url":"https://api.github.com/users/higherkindness/received_events","type":"Organization","site_admin":false},"repo":{"id":142310903,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzMTA5MDM=","name":"skeuomorph","full_name":"higherkindness/skeuomorph","private":false,"owner":{"login":"higherkindness","id":37459992,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NDU5OTky","avatar_url":"https://avatars2.githubusercontent.com/u/37459992?v=4","gravatar_id":"","url":"https://api.github.com/users/higherkindness","html_url":"https://github.com/higherkindness","followers_url":"https://api.github.com/users/higherkindness/followers","following_url":"https://api.github.com/users/higherkindness/following{/other_user}","gists_url":"https://api.github.com/users/higherkindness/gists{/gist_id}","starred_url":"https://api.github.com/users/higherkindness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/higherkindness/subscriptions","organizations_url":"https://api.github.com/users/higherkindness/orgs","repos_url":"https://api.github.com/users/higherkindness/repos","events_url":"https://api.github.com/users/higherkindness/events{/privacy}","received_events_url":"https://api.github.com/users/higherkindness/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/higherkindness/skeuomorph","description":"skema morphisms","fork":false,"url":"https://api.github.com/repos/higherkindness/skeuomorph","forks_url":"https://api.github.com/repos/higherkindness/skeuomorph/forks","keys_url":"https://api.github.com/repos/higherkindness/skeuomorph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/higherkindness/skeuomorph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/higherkindness/skeuomorph/teams","hooks_url":"https://api.github.com/repos/higherkindness/skeuomorph/hooks","issue_events_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues/events{/number}","events_url":"https://api.github.com/repos/higherkindness/skeuomorph/events","assignees_url":"https://api.github.com/repos/higherkindness/skeuomorph/assignees{/user}","branches_url":"https://api.github.com/repos/higherkindness/skeuomorph/branches{/branch}","tags_url":"https://api.github.com/repos/higherkindness/skeuomorph/tags","blobs_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/refs{/sha}","trees_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/higherkindness/skeuomorph/statuses/{sha}","languages_url":"https://api.github.com/repos/higherkindness/skeuomorph/languages","stargazers_url":"https://api.github.com/repos/higherkindness/skeuomorph/stargazers","contributors_url":"https://api.github.com/repos/higherkindness/skeuomorph/contributors","subscribers_url":"https://api.github.com/repos/higherkindness/skeuomorph/subscribers","subscription_url":"https://api.github.com/repos/higherkindness/skeuomorph/subscription","commits_url":"https://api.github.com/repos/higherkindness/skeuomorph/commits{/sha}","git_commits_url":"https://api.github.com/repos/higherkindness/skeuomorph/git/commits{/sha}","comments_url":"https://api.github.com/repos/higherkindness/skeuomorph/comments{/number}","issue_comment_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues/comments{/number}","contents_url":"https://api.github.com/repos/higherkindness/skeuomorph/contents/{+path}","compare_url":"https://api.github.com/repos/higherkindness/skeuomorph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/higherkindness/skeuomorph/merges","archive_url":"https://api.github.com/repos/higherkindness/skeuomorph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/higherkindness/skeuomorph/downloads","issues_url":"https://api.github.com/repos/higherkindness/skeuomorph/issues{/number}","pulls_url":"https://api.github.com/repos/higherkindness/skeuomorph/pulls{/number}","milestones_url":"https://api.github.com/repos/higherkindness/skeuomorph/milestones{/number}","notifications_url":"https://api.github.com/repos/higherkindness/skeuomorph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/higherkindness/skeuomorph/labels{/name}","releases_url":"https://api.github.com/repos/higherkindness/skeuomorph/releases{/id}","deployments_url":"https://api.github.com/repos/higherkindness/skeuomorph/deployments","created_at":"2018-07-25T14:24:23Z","updated_at":"2018-10-19T11:40:36Z","pushed_at":"2018-10-19T20:29:34Z","git_url":"git://github.com/higherkindness/skeuomorph.git","ssh_url":"git@github.com:higherkindness/skeuomorph.git","clone_url":"https://github.com/higherkindness/skeuomorph.git","svn_url":"https://github.com/higherkindness/skeuomorph","homepage":"https://higherkindness.github.io/skeuomorph/","size":829,"stargazers_count":5,"watchers_count":5,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13"},"html":{"href":"https://github.com/higherkindness/skeuomorph/pull/13"},"issue":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/issues/13"},"comments":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/higherkindness/skeuomorph/statuses/ec0c249733d88881450b2a3d4a0c26b7f191f3ff"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"pepegar"}}