{"action":"created","comment":{"url":"https://api.github.com/repos/joukevandermaas/saule/pulls/comments/182746452","pull_request_review_id":113605581,"id":182746452,"diff_hunk":"@@ -0,0 +1,18 @@\n+﻿namespace Saule\n+{\n+    /// <summary>\n+    /// The format of attribute names for clients\n+    /// </summary>\n+    public enum AttributeFormat","path":"Saule/AttributeFormat.cs","position":6,"original_position":6,"commit_id":"f0addf8e0c90b1020d3913a2ad1499bd7d1d5738","original_commit_id":"f0addf8e0c90b1020d3913a2ad1499bd7d1d5738","user":{"login":"barsh","id":2644202,"avatar_url":"https://avatars2.githubusercontent.com/u/2644202?v=4","gravatar_id":"","url":"https://api.github.com/users/barsh","html_url":"https://github.com/barsh","followers_url":"https://api.github.com/users/barsh/followers","following_url":"https://api.github.com/users/barsh/following{/other_user}","gists_url":"https://api.github.com/users/barsh/gists{/gist_id}","starred_url":"https://api.github.com/users/barsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsh/subscriptions","organizations_url":"https://api.github.com/users/barsh/orgs","repos_url":"https://api.github.com/users/barsh/repos","events_url":"https://api.github.com/users/barsh/events{/privacy}","received_events_url":"https://api.github.com/users/barsh/received_events","type":"User","site_admin":false},"body":"@joukevandermaas that worked and it actually turned out quite nicely, because we can have `ConfigureJsonApi` set the configuration on the attribute, see commit here: https://github.com/joukevandermaas/saule/commit/d9583087f22a2139f3aa048249be875c7f440a24\r\n\r\nNow for unit tests...","created_at":"2018-04-19T13:33:32Z","updated_at":"2018-04-19T13:33:32Z","html_url":"https://github.com/joukevandermaas/saule/pull/190#discussion_r182746452","pull_request_url":"https://api.github.com/repos/joukevandermaas/saule/pulls/190","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/joukevandermaas/saule/pulls/comments/182746452"},"html":{"href":"https://github.com/joukevandermaas/saule/pull/190#discussion_r182746452"},"pull_request":{"href":"https://api.github.com/repos/joukevandermaas/saule/pulls/190"}},"in_reply_to_id":182001273},"pull_request":{"url":"https://api.github.com/repos/joukevandermaas/saule/pulls/190","id":181264767,"html_url":"https://github.com/joukevandermaas/saule/pull/190","diff_url":"https://github.com/joukevandermaas/saule/pull/190.diff","patch_url":"https://github.com/joukevandermaas/saule/pull/190.patch","issue_url":"https://api.github.com/repos/joukevandermaas/saule/issues/190","number":190,"state":"open","locked":false,"title":"option to serialize attributes in camelCase","user":{"login":"barsh","id":2644202,"avatar_url":"https://avatars2.githubusercontent.com/u/2644202?v=4","gravatar_id":"","url":"https://api.github.com/users/barsh","html_url":"https://github.com/barsh","followers_url":"https://api.github.com/users/barsh/followers","following_url":"https://api.github.com/users/barsh/following{/other_user}","gists_url":"https://api.github.com/users/barsh/gists{/gist_id}","starred_url":"https://api.github.com/users/barsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsh/subscriptions","organizations_url":"https://api.github.com/users/barsh/orgs","repos_url":"https://api.github.com/users/barsh/repos","events_url":"https://api.github.com/users/barsh/events{/privacy}","received_events_url":"https://api.github.com/users/barsh/received_events","type":"User","site_admin":false},"body":"This PR resolves closes #188.\r\n\r\nThis PR includes an option to serialize/deserialize attributes as camelCase instead of kebab/dash notation.\r\n\r\n## Default kebab/dash notation \r\n```c#\r\npublic class VideoResource: ApiResource\r\n{\r\n    public VideoResource()\r\n    {\r\n        WithId(nameof(Video.ID)); \r\n\r\n        // FilePath translates to 'file-path' instead of 'filePath'\r\n        Attribute(nameof(Video.FilePath)); \r\n    }\r\n}\r\n```\r\n## New option for camelCase\r\n```c#\r\npublic class VideoResource: ApiResource\r\n{\r\n    public VideoResource() : base(AttributeFormat.CamelCase)\r\n    {\r\n        WithId(nameof(Video.ID)); \r\n\r\n        // FilePath translates to 'filePath' instead of 'file-path'\r\n        Attribute(nameof(Video.FilePath)); \r\n    }\r\n}\r\n```\r\n\r\nTests were added to verify that attributes are serialized and deserializing properly.","created_at":"2018-04-12T16:49:22Z","updated_at":"2018-04-19T13:33:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20c1a80443dbeb2608ffdf6cb16b9e3e4b3024c7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/joukevandermaas/saule/pulls/190/commits","review_comments_url":"https://api.github.com/repos/joukevandermaas/saule/pulls/190/comments","review_comment_url":"https://api.github.com/repos/joukevandermaas/saule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joukevandermaas/saule/issues/190/comments","statuses_url":"https://api.github.com/repos/joukevandermaas/saule/statuses/f0addf8e0c90b1020d3913a2ad1499bd7d1d5738","head":{"label":"barsh:option-to-rename-attributes","ref":"option-to-rename-attributes","sha":"f0addf8e0c90b1020d3913a2ad1499bd7d1d5738","user":{"login":"barsh","id":2644202,"avatar_url":"https://avatars2.githubusercontent.com/u/2644202?v=4","gravatar_id":"","url":"https://api.github.com/users/barsh","html_url":"https://github.com/barsh","followers_url":"https://api.github.com/users/barsh/followers","following_url":"https://api.github.com/users/barsh/following{/other_user}","gists_url":"https://api.github.com/users/barsh/gists{/gist_id}","starred_url":"https://api.github.com/users/barsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsh/subscriptions","organizations_url":"https://api.github.com/users/barsh/orgs","repos_url":"https://api.github.com/users/barsh/repos","events_url":"https://api.github.com/users/barsh/events{/privacy}","received_events_url":"https://api.github.com/users/barsh/received_events","type":"User","site_admin":false},"repo":{"id":128107066,"name":"saule","full_name":"barsh/saule","owner":{"login":"barsh","id":2644202,"avatar_url":"https://avatars2.githubusercontent.com/u/2644202?v=4","gravatar_id":"","url":"https://api.github.com/users/barsh","html_url":"https://github.com/barsh","followers_url":"https://api.github.com/users/barsh/followers","following_url":"https://api.github.com/users/barsh/following{/other_user}","gists_url":"https://api.github.com/users/barsh/gists{/gist_id}","starred_url":"https://api.github.com/users/barsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsh/subscriptions","organizations_url":"https://api.github.com/users/barsh/orgs","repos_url":"https://api.github.com/users/barsh/repos","events_url":"https://api.github.com/users/barsh/events{/privacy}","received_events_url":"https://api.github.com/users/barsh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/barsh/saule","description":"JSON API library for ASP.Net Web API 2.","fork":true,"url":"https://api.github.com/repos/barsh/saule","forks_url":"https://api.github.com/repos/barsh/saule/forks","keys_url":"https://api.github.com/repos/barsh/saule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/barsh/saule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/barsh/saule/teams","hooks_url":"https://api.github.com/repos/barsh/saule/hooks","issue_events_url":"https://api.github.com/repos/barsh/saule/issues/events{/number}","events_url":"https://api.github.com/repos/barsh/saule/events","assignees_url":"https://api.github.com/repos/barsh/saule/assignees{/user}","branches_url":"https://api.github.com/repos/barsh/saule/branches{/branch}","tags_url":"https://api.github.com/repos/barsh/saule/tags","blobs_url":"https://api.github.com/repos/barsh/saule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/barsh/saule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/barsh/saule/git/refs{/sha}","trees_url":"https://api.github.com/repos/barsh/saule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/barsh/saule/statuses/{sha}","languages_url":"https://api.github.com/repos/barsh/saule/languages","stargazers_url":"https://api.github.com/repos/barsh/saule/stargazers","contributors_url":"https://api.github.com/repos/barsh/saule/contributors","subscribers_url":"https://api.github.com/repos/barsh/saule/subscribers","subscription_url":"https://api.github.com/repos/barsh/saule/subscription","commits_url":"https://api.github.com/repos/barsh/saule/commits{/sha}","git_commits_url":"https://api.github.com/repos/barsh/saule/git/commits{/sha}","comments_url":"https://api.github.com/repos/barsh/saule/comments{/number}","issue_comment_url":"https://api.github.com/repos/barsh/saule/issues/comments{/number}","contents_url":"https://api.github.com/repos/barsh/saule/contents/{+path}","compare_url":"https://api.github.com/repos/barsh/saule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/barsh/saule/merges","archive_url":"https://api.github.com/repos/barsh/saule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/barsh/saule/downloads","issues_url":"https://api.github.com/repos/barsh/saule/issues{/number}","pulls_url":"https://api.github.com/repos/barsh/saule/pulls{/number}","milestones_url":"https://api.github.com/repos/barsh/saule/milestones{/number}","notifications_url":"https://api.github.com/repos/barsh/saule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/barsh/saule/labels{/name}","releases_url":"https://api.github.com/repos/barsh/saule/releases{/id}","deployments_url":"https://api.github.com/repos/barsh/saule/deployments","created_at":"2018-04-04T18:54:27Z","updated_at":"2018-04-12T15:08:10Z","pushed_at":"2018-04-19T13:26:27Z","git_url":"git://github.com/barsh/saule.git","ssh_url":"git@github.com:barsh/saule.git","clone_url":"https://github.com/barsh/saule.git","svn_url":"https://github.com/barsh/saule","homepage":"http://joukevandermaas.github.io/saule","size":631,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"joukevandermaas:master","ref":"master","sha":"f10f52f5c927c997b275ee67ed98d15ac12ee742","user":{"login":"joukevandermaas","id":1257578,"avatar_url":"https://avatars2.githubusercontent.com/u/1257578?v=4","gravatar_id":"","url":"https://api.github.com/users/joukevandermaas","html_url":"https://github.com/joukevandermaas","followers_url":"https://api.github.com/users/joukevandermaas/followers","following_url":"https://api.github.com/users/joukevandermaas/following{/other_user}","gists_url":"https://api.github.com/users/joukevandermaas/gists{/gist_id}","starred_url":"https://api.github.com/users/joukevandermaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joukevandermaas/subscriptions","organizations_url":"https://api.github.com/users/joukevandermaas/orgs","repos_url":"https://api.github.com/users/joukevandermaas/repos","events_url":"https://api.github.com/users/joukevandermaas/events{/privacy}","received_events_url":"https://api.github.com/users/joukevandermaas/received_events","type":"User","site_admin":false},"repo":{"id":42359114,"name":"saule","full_name":"joukevandermaas/saule","owner":{"login":"joukevandermaas","id":1257578,"avatar_url":"https://avatars2.githubusercontent.com/u/1257578?v=4","gravatar_id":"","url":"https://api.github.com/users/joukevandermaas","html_url":"https://github.com/joukevandermaas","followers_url":"https://api.github.com/users/joukevandermaas/followers","following_url":"https://api.github.com/users/joukevandermaas/following{/other_user}","gists_url":"https://api.github.com/users/joukevandermaas/gists{/gist_id}","starred_url":"https://api.github.com/users/joukevandermaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joukevandermaas/subscriptions","organizations_url":"https://api.github.com/users/joukevandermaas/orgs","repos_url":"https://api.github.com/users/joukevandermaas/repos","events_url":"https://api.github.com/users/joukevandermaas/events{/privacy}","received_events_url":"https://api.github.com/users/joukevandermaas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joukevandermaas/saule","description":"JSON API library for ASP.Net Web API 2.","fork":false,"url":"https://api.github.com/repos/joukevandermaas/saule","forks_url":"https://api.github.com/repos/joukevandermaas/saule/forks","keys_url":"https://api.github.com/repos/joukevandermaas/saule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joukevandermaas/saule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joukevandermaas/saule/teams","hooks_url":"https://api.github.com/repos/joukevandermaas/saule/hooks","issue_events_url":"https://api.github.com/repos/joukevandermaas/saule/issues/events{/number}","events_url":"https://api.github.com/repos/joukevandermaas/saule/events","assignees_url":"https://api.github.com/repos/joukevandermaas/saule/assignees{/user}","branches_url":"https://api.github.com/repos/joukevandermaas/saule/branches{/branch}","tags_url":"https://api.github.com/repos/joukevandermaas/saule/tags","blobs_url":"https://api.github.com/repos/joukevandermaas/saule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joukevandermaas/saule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joukevandermaas/saule/git/refs{/sha}","trees_url":"https://api.github.com/repos/joukevandermaas/saule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joukevandermaas/saule/statuses/{sha}","languages_url":"https://api.github.com/repos/joukevandermaas/saule/languages","stargazers_url":"https://api.github.com/repos/joukevandermaas/saule/stargazers","contributors_url":"https://api.github.com/repos/joukevandermaas/saule/contributors","subscribers_url":"https://api.github.com/repos/joukevandermaas/saule/subscribers","subscription_url":"https://api.github.com/repos/joukevandermaas/saule/subscription","commits_url":"https://api.github.com/repos/joukevandermaas/saule/commits{/sha}","git_commits_url":"https://api.github.com/repos/joukevandermaas/saule/git/commits{/sha}","comments_url":"https://api.github.com/repos/joukevandermaas/saule/comments{/number}","issue_comment_url":"https://api.github.com/repos/joukevandermaas/saule/issues/comments{/number}","contents_url":"https://api.github.com/repos/joukevandermaas/saule/contents/{+path}","compare_url":"https://api.github.com/repos/joukevandermaas/saule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joukevandermaas/saule/merges","archive_url":"https://api.github.com/repos/joukevandermaas/saule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joukevandermaas/saule/downloads","issues_url":"https://api.github.com/repos/joukevandermaas/saule/issues{/number}","pulls_url":"https://api.github.com/repos/joukevandermaas/saule/pulls{/number}","milestones_url":"https://api.github.com/repos/joukevandermaas/saule/milestones{/number}","notifications_url":"https://api.github.com/repos/joukevandermaas/saule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joukevandermaas/saule/labels{/name}","releases_url":"https://api.github.com/repos/joukevandermaas/saule/releases{/id}","deployments_url":"https://api.github.com/repos/joukevandermaas/saule/deployments","created_at":"2015-09-12T14:05:55Z","updated_at":"2018-04-11T13:50:40Z","pushed_at":"2018-04-16T14:49:43Z","git_url":"git://github.com/joukevandermaas/saule.git","ssh_url":"git@github.com:joukevandermaas/saule.git","clone_url":"https://github.com/joukevandermaas/saule.git","svn_url":"https://github.com/joukevandermaas/saule","homepage":"http://joukevandermaas.github.io/saule","size":601,"stargazers_count":59,"watchers_count":59,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":34,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":34,"open_issues":17,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joukevandermaas/saule/pulls/190"},"html":{"href":"https://github.com/joukevandermaas/saule/pull/190"},"issue":{"href":"https://api.github.com/repos/joukevandermaas/saule/issues/190"},"comments":{"href":"https://api.github.com/repos/joukevandermaas/saule/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/joukevandermaas/saule/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/joukevandermaas/saule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joukevandermaas/saule/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/joukevandermaas/saule/statuses/f0addf8e0c90b1020d3913a2ad1499bd7d1d5738"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"barsh"}}