{"action":"created","comment":{"url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/comments/149915156","pull_request_review_id":75383563,"id":149915156,"diff_hunk":"@@ -0,0 +1,32 @@\n+﻿using Microsoft.AspNetCore.Http;\n+using System;\n+\n+namespace RDD.Web.Serialization\n+{\n+    public class UrlProvider : IUrlProvider\n+    {\n+        private const string DEFAULT_API_PREFIX = \"api\";\n+\n+        private readonly PluralizationService _pluralizationService;\n+        private readonly IHttpContextAccessor _httpContextAccessor;\n+\n+        public UrlProvider(IHttpContextAccessor httpContextAccessor)\n+        {\n+            _pluralizationService = new PluralizationService();\n+            _httpContextAccessor = httpContextAccessor;\n+        }\n+\n+        public virtual string GetApiPrefix()\n+        {\n+            return DEFAULT_API_PREFIX;\n+        }\n+\n+        public virtual string GetUrlTemplateFromEntityType(Type entityType)\n+        {\n+            var apiRadical = _pluralizationService.GetPlural(entityType.Name).ToLower();\n+            var request = _httpContextAccessor.HttpContext.Request;\n+\n+            return $\"{request.Scheme}://{request.Host.Value}/{GetApiPrefix()}/{apiRadical}/{{0}}\";","path":"Web/RDD.Web/Serialization/UrlProvider.cs","position":29,"original_position":29,"commit_id":"24d35c0f95d6805aa00241253149f5b3c81f3c52","original_commit_id":"24d35c0f95d6805aa00241253149f5b3c81f3c52","user":{"login":"jbbeuzelin","id":5744893,"avatar_url":"https://avatars1.githubusercontent.com/u/5744893?v=4","gravatar_id":"","url":"https://api.github.com/users/jbbeuzelin","html_url":"https://github.com/jbbeuzelin","followers_url":"https://api.github.com/users/jbbeuzelin/followers","following_url":"https://api.github.com/users/jbbeuzelin/following{/other_user}","gists_url":"https://api.github.com/users/jbbeuzelin/gists{/gist_id}","starred_url":"https://api.github.com/users/jbbeuzelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbbeuzelin/subscriptions","organizations_url":"https://api.github.com/users/jbbeuzelin/orgs","repos_url":"https://api.github.com/users/jbbeuzelin/repos","events_url":"https://api.github.com/users/jbbeuzelin/events{/privacy}","received_events_url":"https://api.github.com/users/jbbeuzelin/received_events","type":"User","site_admin":false},"body":"i agree, i will try a quickwins ","created_at":"2017-11-09T10:11:29Z","updated_at":"2017-11-09T10:11:29Z","html_url":"https://github.com/LuccaSA/RestDrivenDomain/pull/66#discussion_r149915156","pull_request_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/comments/149915156"},"html":{"href":"https://github.com/LuccaSA/RestDrivenDomain/pull/66#discussion_r149915156"},"pull_request":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66"}},"in_reply_to_id":149636226},"pull_request":{"url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66","id":151163472,"html_url":"https://github.com/LuccaSA/RestDrivenDomain/pull/66","diff_url":"https://github.com/LuccaSA/RestDrivenDomain/pull/66.diff","patch_url":"https://github.com/LuccaSA/RestDrivenDomain/pull/66.patch","issue_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/66","number":66,"state":"open","locked":false,"title":"ADD [WEB] > add urlProvider","user":{"login":"jbbeuzelin","id":5744893,"avatar_url":"https://avatars1.githubusercontent.com/u/5744893?v=4","gravatar_id":"","url":"https://api.github.com/users/jbbeuzelin","html_url":"https://github.com/jbbeuzelin","followers_url":"https://api.github.com/users/jbbeuzelin/followers","following_url":"https://api.github.com/users/jbbeuzelin/following{/other_user}","gists_url":"https://api.github.com/users/jbbeuzelin/gists{/gist_id}","starred_url":"https://api.github.com/users/jbbeuzelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbbeuzelin/subscriptions","organizations_url":"https://api.github.com/users/jbbeuzelin/orgs","repos_url":"https://api.github.com/users/jbbeuzelin/repos","events_url":"https://api.github.com/users/jbbeuzelin/events{/privacy}","received_events_url":"https://api.github.com/users/jbbeuzelin/received_events","type":"User","site_admin":false},"body":"- Enable custom apiPrefix\r\n- Return an absolute path on `Url` property VS partial path before\r\n- Abstract Url logic in UrlProvider","created_at":"2017-11-07T16:32:03Z","updated_at":"2017-11-09T10:11:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4d277d1d914fd91f8af578bd68114f3b9d70443","assignee":{"login":"jbbeuzelin","id":5744893,"avatar_url":"https://avatars1.githubusercontent.com/u/5744893?v=4","gravatar_id":"","url":"https://api.github.com/users/jbbeuzelin","html_url":"https://github.com/jbbeuzelin","followers_url":"https://api.github.com/users/jbbeuzelin/followers","following_url":"https://api.github.com/users/jbbeuzelin/following{/other_user}","gists_url":"https://api.github.com/users/jbbeuzelin/gists{/gist_id}","starred_url":"https://api.github.com/users/jbbeuzelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbbeuzelin/subscriptions","organizations_url":"https://api.github.com/users/jbbeuzelin/orgs","repos_url":"https://api.github.com/users/jbbeuzelin/repos","events_url":"https://api.github.com/users/jbbeuzelin/events{/privacy}","received_events_url":"https://api.github.com/users/jbbeuzelin/received_events","type":"User","site_admin":false},"assignees":[{"login":"jbbeuzelin","id":5744893,"avatar_url":"https://avatars1.githubusercontent.com/u/5744893?v=4","gravatar_id":"","url":"https://api.github.com/users/jbbeuzelin","html_url":"https://github.com/jbbeuzelin","followers_url":"https://api.github.com/users/jbbeuzelin/followers","following_url":"https://api.github.com/users/jbbeuzelin/following{/other_user}","gists_url":"https://api.github.com/users/jbbeuzelin/gists{/gist_id}","starred_url":"https://api.github.com/users/jbbeuzelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbbeuzelin/subscriptions","organizations_url":"https://api.github.com/users/jbbeuzelin/orgs","repos_url":"https://api.github.com/users/jbbeuzelin/repos","events_url":"https://api.github.com/users/jbbeuzelin/events{/privacy}","received_events_url":"https://api.github.com/users/jbbeuzelin/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"rducom","id":5228175,"avatar_url":"https://avatars3.githubusercontent.com/u/5228175?v=4","gravatar_id":"","url":"https://api.github.com/users/rducom","html_url":"https://github.com/rducom","followers_url":"https://api.github.com/users/rducom/followers","following_url":"https://api.github.com/users/rducom/following{/other_user}","gists_url":"https://api.github.com/users/rducom/gists{/gist_id}","starred_url":"https://api.github.com/users/rducom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rducom/subscriptions","organizations_url":"https://api.github.com/users/rducom/orgs","repos_url":"https://api.github.com/users/rducom/repos","events_url":"https://api.github.com/users/rducom/events{/privacy}","received_events_url":"https://api.github.com/users/rducom/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66/commits","review_comments_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66/comments","review_comment_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/66/comments","statuses_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/statuses/24d35c0f95d6805aa00241253149f5b3c81f3c52","head":{"label":"LuccaSA:Url_Provider","ref":"Url_Provider","sha":"24d35c0f95d6805aa00241253149f5b3c81f3c52","user":{"login":"LuccaSA","id":2686158,"avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"repo":{"id":34167748,"name":"RestDrivenDomain","full_name":"LuccaSA/RestDrivenDomain","owner":{"login":"LuccaSA","id":2686158,"avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LuccaSA/RestDrivenDomain","description":null,"fork":false,"url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain","forks_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/forks","keys_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/teams","hooks_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/hooks","issue_events_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/events{/number}","events_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/events","assignees_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/assignees{/user}","branches_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/branches{/branch}","tags_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/tags","blobs_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/refs{/sha}","trees_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/statuses/{sha}","languages_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/languages","stargazers_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/stargazers","contributors_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/contributors","subscribers_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/subscribers","subscription_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/subscription","commits_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/commits{/sha}","git_commits_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/commits{/sha}","comments_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/comments{/number}","issue_comment_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/comments{/number}","contents_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/contents/{+path}","compare_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/merges","archive_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/downloads","issues_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues{/number}","pulls_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls{/number}","milestones_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/milestones{/number}","notifications_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/labels{/name}","releases_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/releases{/id}","deployments_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/deployments","created_at":"2015-04-18T13:56:51Z","updated_at":"2017-10-11T08:03:35Z","pushed_at":"2017-11-08T22:32:20Z","git_url":"git://github.com/LuccaSA/RestDrivenDomain.git","ssh_url":"git@github.com:LuccaSA/RestDrivenDomain.git","clone_url":"https://github.com/LuccaSA/RestDrivenDomain.git","svn_url":"https://github.com/LuccaSA/RestDrivenDomain","homepage":"http://www.restdrivendomain.fr/","size":1954,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":19,"forks":1,"open_issues":19,"watchers":3,"default_branch":"master"}},"base":{"label":"LuccaSA:various.things","ref":"various.things","sha":"b6488e1f005c8b5df702f8db4a217ed369f7096b","user":{"login":"LuccaSA","id":2686158,"avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"repo":{"id":34167748,"name":"RestDrivenDomain","full_name":"LuccaSA/RestDrivenDomain","owner":{"login":"LuccaSA","id":2686158,"avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LuccaSA/RestDrivenDomain","description":null,"fork":false,"url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain","forks_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/forks","keys_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/teams","hooks_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/hooks","issue_events_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/events{/number}","events_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/events","assignees_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/assignees{/user}","branches_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/branches{/branch}","tags_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/tags","blobs_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/refs{/sha}","trees_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/statuses/{sha}","languages_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/languages","stargazers_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/stargazers","contributors_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/contributors","subscribers_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/subscribers","subscription_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/subscription","commits_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/commits{/sha}","git_commits_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/git/commits{/sha}","comments_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/comments{/number}","issue_comment_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/comments{/number}","contents_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/contents/{+path}","compare_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/merges","archive_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/downloads","issues_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues{/number}","pulls_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls{/number}","milestones_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/milestones{/number}","notifications_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/labels{/name}","releases_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/releases{/id}","deployments_url":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/deployments","created_at":"2015-04-18T13:56:51Z","updated_at":"2017-10-11T08:03:35Z","pushed_at":"2017-11-08T22:32:20Z","git_url":"git://github.com/LuccaSA/RestDrivenDomain.git","ssh_url":"git@github.com:LuccaSA/RestDrivenDomain.git","clone_url":"https://github.com/LuccaSA/RestDrivenDomain.git","svn_url":"https://github.com/LuccaSA/RestDrivenDomain","homepage":"http://www.restdrivendomain.fr/","size":1954,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":19,"forks":1,"open_issues":19,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66"},"html":{"href":"https://github.com/LuccaSA/RestDrivenDomain/pull/66"},"issue":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/66"},"comments":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/LuccaSA/RestDrivenDomain/statuses/24d35c0f95d6805aa00241253149f5b3c81f3c52"}},"author_association":"NONE"}}
{"actor":{"display_login":"jbbeuzelin"}}