{"action":"created","issue":{"url":"https://api.github.com/repos/Penneo/sdk-net/issues/41","labels_url":"https://api.github.com/repos/Penneo/sdk-net/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/Penneo/sdk-net/issues/41/comments","events_url":"https://api.github.com/repos/Penneo/sdk-net/issues/41/events","html_url":"https://github.com/Penneo/sdk-net/issues/41","id":113122752,"number":41,"title":"caseFile.GetSigners() leads to an invalid enpoint for getting signer types","user":{"login":"ahmadnazir","id":527355,"avatar_url":"https://avatars.githubusercontent.com/u/527355?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmadnazir","html_url":"https://github.com/ahmadnazir","followers_url":"https://api.github.com/users/ahmadnazir/followers","following_url":"https://api.github.com/users/ahmadnazir/following{/other_user}","gists_url":"https://api.github.com/users/ahmadnazir/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmadnazir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmadnazir/subscriptions","organizations_url":"https://api.github.com/users/ahmadnazir/orgs","repos_url":"https://api.github.com/users/ahmadnazir/repos","events_url":"https://api.github.com/users/ahmadnazir/events{/privacy}","received_events_url":"https://api.github.com/users/ahmadnazir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"chrsadk","id":1178795,"avatar_url":"https://avatars.githubusercontent.com/u/1178795?v=3","gravatar_id":"","url":"https://api.github.com/users/chrsadk","html_url":"https://github.com/chrsadk","followers_url":"https://api.github.com/users/chrsadk/followers","following_url":"https://api.github.com/users/chrsadk/following{/other_user}","gists_url":"https://api.github.com/users/chrsadk/gists{/gist_id}","starred_url":"https://api.github.com/users/chrsadk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrsadk/subscriptions","organizations_url":"https://api.github.com/users/chrsadk/orgs","repos_url":"https://api.github.com/users/chrsadk/repos","events_url":"https://api.github.com/users/chrsadk/events{/privacy}","received_events_url":"https://api.github.com/users/chrsadk/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-24T00:40:02Z","updated_at":"2015-10-24T12:49:24Z","closed_at":null,"body":"The endpoint for getting the signer type roles is not formed properly if the signers are fetched using the caseFile.GetSigners() function. It works fine if caseFile.Signers is used.\r\n\r\n```\r\nExpected: /api/v1/casefiles/1/signers/1/signertypes\r\nActual:   /api/v1/signers/1/signertypes\r\n```\r\nExample, the following `C#` code leads to the correct result:\r\n\r\n```\r\n...\r\nsigners = caseFile.Signers;\r\n...\r\nvar signers = caseFile.Signers;\r\n```\r\n\r\nleads to the correct formation of the endpoints: (extract of tcpdump):\r\n\r\n```\r\n$ sudo tcpdump -i docker0 -A | grep GET\r\n\r\n.. GET /app_dev.php/api/v1/casefiles/1 HTTP/1.1\r\n.. GET /app_dev.php/api/v1/casefiles/1/signers/1/signertypes HTTP/1.1\r\n```\r\n\r\nHowever, the following creates an invalid endpoint:\r\n\r\n```\r\n...\r\nsigners = caseFile.Signers;\r\n...\r\nsigner.GetSignerTypes();\r\n```\r\n\r\nleads to:\r\n\r\n```\r\n$ sudo tcpdump -i docker0 -A | grep GET\r\n\r\nGET /app_dev.php/api/v1/casefiles/1 HTTP/1.1\r\nGET /app_dev.php/api/v1/signers/1/signertypes HTTP/1.1\r\n                            <h2><span>2/2</span> <abbr title=\"Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException\">NotFoundHttpException</abbr>: No route found for \"GET /api/v1/signers/1/signertypes\"</h2>\r\n ```"},"comment":{"url":"https://api.github.com/repos/Penneo/sdk-net/issues/comments/150808992","html_url":"https://github.com/Penneo/sdk-net/issues/41#issuecomment-150808992","issue_url":"https://api.github.com/repos/Penneo/sdk-net/issues/41","id":150808992,"user":{"login":"ahmadnazir","id":527355,"avatar_url":"https://avatars.githubusercontent.com/u/527355?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmadnazir","html_url":"https://github.com/ahmadnazir","followers_url":"https://api.github.com/users/ahmadnazir/followers","following_url":"https://api.github.com/users/ahmadnazir/following{/other_user}","gists_url":"https://api.github.com/users/ahmadnazir/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmadnazir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmadnazir/subscriptions","organizations_url":"https://api.github.com/users/ahmadnazir/orgs","repos_url":"https://api.github.com/users/ahmadnazir/repos","events_url":"https://api.github.com/users/ahmadnazir/events{/privacy}","received_events_url":"https://api.github.com/users/ahmadnazir/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T12:49:24Z","updated_at":"2015-10-24T12:49:24Z","body":"@chrsadk \r\n\r\nHere is a full example:\r\n\r\n```\r\nusing System;\r\nusing Penneo;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace Pennneo\r\n{    \r\n    public class Test\r\n    {\r\n        private const string key = \"...\";\r\n        private const string secret = \"...\";\r\n        private const string endpoint = \"...\";\r\n        private const int caseFileId = 1;\r\n        \r\n        public static void Main()\r\n        {\r\n            PenneoConnector.Initialize(key, secret, endpoint);\r\n            var caseFile = Query.Find<CaseFile>(caseFileId);\r\n            display(caseFile);\r\n        }\r\n\r\n        public static void display(CaseFile caseFile)\r\n        {\r\n            Console.WriteLine(\"Case file is :\" + caseFile.Title);\r\n\r\n            // var signers = caseFile.GetSigners(); // This doesn't set the caseFile properly\r\n            var signers = caseFile.Signers;\r\n\r\n            Console.WriteLine(\"- Count :\" + signers.Count());\r\n\r\n            foreach(var signer in signers)\r\n            {\r\n                Console.WriteLine(\"-- Name: \" + signer.Name);\r\n                var signerTypes = signer.GetSignerTypes(); // NULL is returned caseFile.GetSigners() is used above\r\n                foreach (var signerType in signerTypes) {\r\n                    Console.WriteLine(\"-- Role: \" + signerType.Role);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n```"}}