{"action":"opened","number":45,"pull_request":{"url":"https://api.github.com/repos/sksamuel/avro4s/pulls/45","id":79189795,"html_url":"https://github.com/sksamuel/avro4s/pull/45","diff_url":"https://github.com/sksamuel/avro4s/pull/45.diff","patch_url":"https://github.com/sksamuel/avro4s/pull/45.patch","issue_url":"https://api.github.com/repos/sksamuel/avro4s/issues/45","number":45,"state":"open","locked":false,"title":"Fix problem with option default value","user":{"login":"jecos","id":1424506,"avatar_url":"https://avatars.githubusercontent.com/u/1424506?v=3","gravatar_id":"","url":"https://api.github.com/users/jecos","html_url":"https://github.com/jecos","followers_url":"https://api.github.com/users/jecos/followers","following_url":"https://api.github.com/users/jecos/following{/other_user}","gists_url":"https://api.github.com/users/jecos/gists{/gist_id}","starred_url":"https://api.github.com/users/jecos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jecos/subscriptions","organizations_url":"https://api.github.com/users/jecos/orgs","repos_url":"https://api.github.com/users/jecos/repos","events_url":"https://api.github.com/users/jecos/events{/privacy}","received_events_url":"https://api.github.com/users/jecos/received_events","type":"User","site_admin":false},"body":"A filed option with default value to none generate a scheam with \"default : \"None\". Example :\r\n`case class OptionDefaultValues(\r\n  name: String = \"sammy\",\r\n  description: Option[String] = None,\r\n  currency: Option[String] = Some(\"$\")\r\n)`\r\n\r\nproduce this schema :\r\n\r\n`{\"type\":\"record\",\"name\":\"OptionDefaultValues\",\"namespace\":\"com.sksamuel.avro4s\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"default\":\"sammy\"},{\"name\":\"description\",\"type\":[\"null\",\"string\"],\"default\":\"None\"},{\"name\":\"currency\",\"type\":[\"null\",\"string\"],\"default\":\"Some($)\"}]}`\r\n\r\nWith this fix the schema is \r\n`{\r\n  \"type\": \"record\",\r\n  \"name\": \"OptionDefaultValues\",\r\n  \"namespace\": \"com.sksamuel.avro4s\",\r\n  \"fields\": [\r\n    { \"name\": \"name\", \"type\": \"string\", \"default\": \"sammy\" },\r\n    {\r\n      \"name\": \"description\",\r\n      \"type\": [\"null\", \"string\"]\r\n    },\r\n    {\r\n      \"name\": \"currency\",\r\n      \"type\": [\"null\", \"string\"],\r\n      \"default\": \"$\"\r\n    }\r\n  ]\r\n}`","created_at":"2016-07-28T12:50:51Z","updated_at":"2016-07-28T12:50:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sksamuel/avro4s/pulls/45/commits","review_comments_url":"https://api.github.com/repos/sksamuel/avro4s/pulls/45/comments","review_comment_url":"https://api.github.com/repos/sksamuel/avro4s/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sksamuel/avro4s/issues/45/comments","statuses_url":"https://api.github.com/repos/sksamuel/avro4s/statuses/f21b69322631299621660977f53451e22fecfeeb","head":{"label":"jecos:master","ref":"master","sha":"f21b69322631299621660977f53451e22fecfeeb","user":{"login":"jecos","id":1424506,"avatar_url":"https://avatars.githubusercontent.com/u/1424506?v=3","gravatar_id":"","url":"https://api.github.com/users/jecos","html_url":"https://github.com/jecos","followers_url":"https://api.github.com/users/jecos/followers","following_url":"https://api.github.com/users/jecos/following{/other_user}","gists_url":"https://api.github.com/users/jecos/gists{/gist_id}","starred_url":"https://api.github.com/users/jecos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jecos/subscriptions","organizations_url":"https://api.github.com/users/jecos/orgs","repos_url":"https://api.github.com/users/jecos/repos","events_url":"https://api.github.com/users/jecos/events{/privacy}","received_events_url":"https://api.github.com/users/jecos/received_events","type":"User","site_admin":false},"repo":{"id":64394720,"name":"avro4s","full_name":"jecos/avro4s","owner":{"login":"jecos","id":1424506,"avatar_url":"https://avatars.githubusercontent.com/u/1424506?v=3","gravatar_id":"","url":"https://api.github.com/users/jecos","html_url":"https://github.com/jecos","followers_url":"https://api.github.com/users/jecos/followers","following_url":"https://api.github.com/users/jecos/following{/other_user}","gists_url":"https://api.github.com/users/jecos/gists{/gist_id}","starred_url":"https://api.github.com/users/jecos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jecos/subscriptions","organizations_url":"https://api.github.com/users/jecos/orgs","repos_url":"https://api.github.com/users/jecos/repos","events_url":"https://api.github.com/users/jecos/events{/privacy}","received_events_url":"https://api.github.com/users/jecos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jecos/avro4s","description":"Avro schema generation and serialization / deserialization","fork":true,"url":"https://api.github.com/repos/jecos/avro4s","forks_url":"https://api.github.com/repos/jecos/avro4s/forks","keys_url":"https://api.github.com/repos/jecos/avro4s/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jecos/avro4s/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jecos/avro4s/teams","hooks_url":"https://api.github.com/repos/jecos/avro4s/hooks","issue_events_url":"https://api.github.com/repos/jecos/avro4s/issues/events{/number}","events_url":"https://api.github.com/repos/jecos/avro4s/events","assignees_url":"https://api.github.com/repos/jecos/avro4s/assignees{/user}","branches_url":"https://api.github.com/repos/jecos/avro4s/branches{/branch}","tags_url":"https://api.github.com/repos/jecos/avro4s/tags","blobs_url":"https://api.github.com/repos/jecos/avro4s/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jecos/avro4s/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jecos/avro4s/git/refs{/sha}","trees_url":"https://api.github.com/repos/jecos/avro4s/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jecos/avro4s/statuses/{sha}","languages_url":"https://api.github.com/repos/jecos/avro4s/languages","stargazers_url":"https://api.github.com/repos/jecos/avro4s/stargazers","contributors_url":"https://api.github.com/repos/jecos/avro4s/contributors","subscribers_url":"https://api.github.com/repos/jecos/avro4s/subscribers","subscription_url":"https://api.github.com/repos/jecos/avro4s/subscription","commits_url":"https://api.github.com/repos/jecos/avro4s/commits{/sha}","git_commits_url":"https://api.github.com/repos/jecos/avro4s/git/commits{/sha}","comments_url":"https://api.github.com/repos/jecos/avro4s/comments{/number}","issue_comment_url":"https://api.github.com/repos/jecos/avro4s/issues/comments{/number}","contents_url":"https://api.github.com/repos/jecos/avro4s/contents/{+path}","compare_url":"https://api.github.com/repos/jecos/avro4s/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jecos/avro4s/merges","archive_url":"https://api.github.com/repos/jecos/avro4s/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jecos/avro4s/downloads","issues_url":"https://api.github.com/repos/jecos/avro4s/issues{/number}","pulls_url":"https://api.github.com/repos/jecos/avro4s/pulls{/number}","milestones_url":"https://api.github.com/repos/jecos/avro4s/milestones{/number}","notifications_url":"https://api.github.com/repos/jecos/avro4s/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jecos/avro4s/labels{/name}","releases_url":"https://api.github.com/repos/jecos/avro4s/releases{/id}","deployments_url":"https://api.github.com/repos/jecos/avro4s/deployments","created_at":"2016-07-28T12:43:53Z","updated_at":"2016-07-28T12:43:55Z","pushed_at":"2016-07-28T12:46:27Z","git_url":"git://github.com/jecos/avro4s.git","ssh_url":"git@github.com:jecos/avro4s.git","clone_url":"https://github.com/jecos/avro4s.git","svn_url":"https://github.com/jecos/avro4s","homepage":"","size":377,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sksamuel:master","ref":"master","sha":"09edff250321406ac5b4849aeb6849012d405c31","user":{"login":"sksamuel","id":743706,"avatar_url":"https://avatars.githubusercontent.com/u/743706?v=3","gravatar_id":"","url":"https://api.github.com/users/sksamuel","html_url":"https://github.com/sksamuel","followers_url":"https://api.github.com/users/sksamuel/followers","following_url":"https://api.github.com/users/sksamuel/following{/other_user}","gists_url":"https://api.github.com/users/sksamuel/gists{/gist_id}","starred_url":"https://api.github.com/users/sksamuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sksamuel/subscriptions","organizations_url":"https://api.github.com/users/sksamuel/orgs","repos_url":"https://api.github.com/users/sksamuel/repos","events_url":"https://api.github.com/users/sksamuel/events{/privacy}","received_events_url":"https://api.github.com/users/sksamuel/received_events","type":"User","site_admin":false},"repo":{"id":42593679,"name":"avro4s","full_name":"sksamuel/avro4s","owner":{"login":"sksamuel","id":743706,"avatar_url":"https://avatars.githubusercontent.com/u/743706?v=3","gravatar_id":"","url":"https://api.github.com/users/sksamuel","html_url":"https://github.com/sksamuel","followers_url":"https://api.github.com/users/sksamuel/followers","following_url":"https://api.github.com/users/sksamuel/following{/other_user}","gists_url":"https://api.github.com/users/sksamuel/gists{/gist_id}","starred_url":"https://api.github.com/users/sksamuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sksamuel/subscriptions","organizations_url":"https://api.github.com/users/sksamuel/orgs","repos_url":"https://api.github.com/users/sksamuel/repos","events_url":"https://api.github.com/users/sksamuel/events{/privacy}","received_events_url":"https://api.github.com/users/sksamuel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sksamuel/avro4s","description":"Avro schema generation and serialization / deserialization","fork":false,"url":"https://api.github.com/repos/sksamuel/avro4s","forks_url":"https://api.github.com/repos/sksamuel/avro4s/forks","keys_url":"https://api.github.com/repos/sksamuel/avro4s/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sksamuel/avro4s/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sksamuel/avro4s/teams","hooks_url":"https://api.github.com/repos/sksamuel/avro4s/hooks","issue_events_url":"https://api.github.com/repos/sksamuel/avro4s/issues/events{/number}","events_url":"https://api.github.com/repos/sksamuel/avro4s/events","assignees_url":"https://api.github.com/repos/sksamuel/avro4s/assignees{/user}","branches_url":"https://api.github.com/repos/sksamuel/avro4s/branches{/branch}","tags_url":"https://api.github.com/repos/sksamuel/avro4s/tags","blobs_url":"https://api.github.com/repos/sksamuel/avro4s/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sksamuel/avro4s/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sksamuel/avro4s/git/refs{/sha}","trees_url":"https://api.github.com/repos/sksamuel/avro4s/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sksamuel/avro4s/statuses/{sha}","languages_url":"https://api.github.com/repos/sksamuel/avro4s/languages","stargazers_url":"https://api.github.com/repos/sksamuel/avro4s/stargazers","contributors_url":"https://api.github.com/repos/sksamuel/avro4s/contributors","subscribers_url":"https://api.github.com/repos/sksamuel/avro4s/subscribers","subscription_url":"https://api.github.com/repos/sksamuel/avro4s/subscription","commits_url":"https://api.github.com/repos/sksamuel/avro4s/commits{/sha}","git_commits_url":"https://api.github.com/repos/sksamuel/avro4s/git/commits{/sha}","comments_url":"https://api.github.com/repos/sksamuel/avro4s/comments{/number}","issue_comment_url":"https://api.github.com/repos/sksamuel/avro4s/issues/comments{/number}","contents_url":"https://api.github.com/repos/sksamuel/avro4s/contents/{+path}","compare_url":"https://api.github.com/repos/sksamuel/avro4s/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sksamuel/avro4s/merges","archive_url":"https://api.github.com/repos/sksamuel/avro4s/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sksamuel/avro4s/downloads","issues_url":"https://api.github.com/repos/sksamuel/avro4s/issues{/number}","pulls_url":"https://api.github.com/repos/sksamuel/avro4s/pulls{/number}","milestones_url":"https://api.github.com/repos/sksamuel/avro4s/milestones{/number}","notifications_url":"https://api.github.com/repos/sksamuel/avro4s/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sksamuel/avro4s/labels{/name}","releases_url":"https://api.github.com/repos/sksamuel/avro4s/releases{/id}","deployments_url":"https://api.github.com/repos/sksamuel/avro4s/deployments","created_at":"2015-09-16T14:50:22Z","updated_at":"2016-07-26T12:31:33Z","pushed_at":"2016-07-27T01:19:59Z","git_url":"git://github.com/sksamuel/avro4s.git","ssh_url":"git@github.com:sksamuel/avro4s.git","clone_url":"https://github.com/sksamuel/avro4s.git","svn_url":"https://github.com/sksamuel/avro4s","homepage":"","size":377,"stargazers_count":67,"watchers_count":67,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":2,"forks":20,"open_issues":2,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sksamuel/avro4s/pulls/45"},"html":{"href":"https://github.com/sksamuel/avro4s/pull/45"},"issue":{"href":"https://api.github.com/repos/sksamuel/avro4s/issues/45"},"comments":{"href":"https://api.github.com/repos/sksamuel/avro4s/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/sksamuel/avro4s/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/sksamuel/avro4s/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sksamuel/avro4s/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/sksamuel/avro4s/statuses/f21b69322631299621660977f53451e22fecfeeb"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":33,"deletions":3,"changed_files":3}}
{"actor":{"display_login":"jecos"}}