{"action":"created","comment":{"url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments/173708124","pull_request_review_id":102934941,"id":173708124,"diff_hunk":"@@ -661,30 +751,32 @@ instance ToSchema TransactionDirection where\n     declareNamedSchema _ =\n         pure $ NamedSchema (Just \"TransactionDirection\") $ mempty\n             & type_ .~ SwaggerString\n-            & enum_ .~ Just [\"outgoing\", \"incoming\"]\n+            & enum_ ?~ [\"outgoing\", \"incoming\"]\n \n -- | A 'Wallet''s 'Transaction'.\n data Transaction = Transaction\n   { txId            :: !(V1 Core.TxId)\n-    -- ^ The Tx Id.\n   , txConfirmations :: !Word\n-    -- ^ The number of confirmations.\n   , txAmount        :: !(V1 Core.Coin)\n-    -- ^ The 'Coin' moved as part of this transaction.\n   , txInputs        :: !(NonEmpty PaymentDistribution)\n-    -- ^ The input money distribution.\n   , txOutputs       :: !(NonEmpty PaymentDistribution)\n-    -- ^ The output money distribution.\n   , txType          :: TransactionType\n-    -- ^ The type for this transaction (e.g local, foreign, etc).\n   , txDirection     :: TransactionDirection\n-    -- ^ The direction for this transaction (e.g incoming, outgoing).\n   } deriving (Show, Ord, Eq, Generic)\n \n deriveToJSON Serokell.defaultOptions ''Transaction\n \n instance ToSchema Transaction where\n-    declareNamedSchema = genericSchemaDroppingPrefix \"tx\"\n+  declareNamedSchema =\n+    genericSchemaDroppingPrefix \"tx\" (\\(--^) props -> props\n+      & (\"id\"            --^ \"Transaction's id\")","path":"wallet-new/src/Cardano/Wallet/API/V1/Types.hs","position":392,"original_position":392,"commit_id":"8bc19bd1029ecc3ce7ca00613ca4e5166bf086f9","original_commit_id":"8bc19bd1029ecc3ce7ca00613ca4e5166bf086f9","user":{"login":"adinapoli-iohk","id":29383371,"avatar_url":"https://avatars3.githubusercontent.com/u/29383371?v=4","gravatar_id":"","url":"https://api.github.com/users/adinapoli-iohk","html_url":"https://github.com/adinapoli-iohk","followers_url":"https://api.github.com/users/adinapoli-iohk/followers","following_url":"https://api.github.com/users/adinapoli-iohk/following{/other_user}","gists_url":"https://api.github.com/users/adinapoli-iohk/gists{/gist_id}","starred_url":"https://api.github.com/users/adinapoli-iohk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adinapoli-iohk/subscriptions","organizations_url":"https://api.github.com/users/adinapoli-iohk/orgs","repos_url":"https://api.github.com/users/adinapoli-iohk/repos","events_url":"https://api.github.com/users/adinapoli-iohk/events{/privacy}","received_events_url":"https://api.github.com/users/adinapoli-iohk/received_events","type":"User","site_admin":false},"body":"This would be probably overkill, but I have seen some ideas floating around in the Servant issue tracker where people were thinking of using a type similar to `(--^)` to attach the documentation stuff directly in the types, when you declare the data record. Example:\r\n\r\n``` haskell\r\ndata Foo = Foo {\r\n  bar :: Int --^ \"Documentation for Int\"\r\n}\r\n```\r\n\r\nIt probably makes working with these types madness, in practice, so I'm happy you went for a different approach, but I thought I would share it just for reference. Incidentally, I think also Gabriel Gonzalez uses a similar combinator is his library `optparse-generic`.\r\n","created_at":"2018-03-12T07:20:39Z","updated_at":"2018-03-12T07:21:42Z","html_url":"https://github.com/input-output-hk/cardano-sl/pull/2650#discussion_r173708124","pull_request_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments/173708124"},"html":{"href":"https://github.com/input-output-hk/cardano-sl/pull/2650#discussion_r173708124"},"pull_request":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650"}}},"pull_request":{"url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650","id":174053410,"html_url":"https://github.com/input-output-hk/cardano-sl/pull/2650","diff_url":"https://github.com/input-output-hk/cardano-sl/pull/2650.diff","patch_url":"https://github.com/input-output-hk/cardano-sl/pull/2650.patch","issue_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/2650","number":2650,"state":"open","locked":false,"title":"CBR-102 - Document the new Wallet V1 API","user":{"login":"KtorZ","id":5680256,"avatar_url":"https://avatars0.githubusercontent.com/u/5680256?v=4","gravatar_id":"","url":"https://api.github.com/users/KtorZ","html_url":"https://github.com/KtorZ","followers_url":"https://api.github.com/users/KtorZ/followers","following_url":"https://api.github.com/users/KtorZ/following{/other_user}","gists_url":"https://api.github.com/users/KtorZ/gists{/gist_id}","starred_url":"https://api.github.com/users/KtorZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KtorZ/subscriptions","organizations_url":"https://api.github.com/users/KtorZ/orgs","repos_url":"https://api.github.com/users/KtorZ/repos","events_url":"https://api.github.com/users/KtorZ/events{/privacy}","received_events_url":"https://api.github.com/users/KtorZ/received_events","type":"User","site_admin":false},"body":"As dicussed, tackles the following tasks from CBR-102\r\n\r\n*CSL-2273* | Expand introduction with install instructions and curl example\r\n*CSL-2274* | Extend error handling table\r\n*CSL-2277* | Document V1 exchange endpoints\r\n*CSL-2359* | Serve API documentation through dedicated endpoints\r\n\r\n","created_at":"2018-03-09T16:47:22Z","updated_at":"2018-03-12T07:21:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29a9c8b0f902ad181f0e12b0c7d8d7b8755a0493","assignee":{"login":"KtorZ","id":5680256,"avatar_url":"https://avatars0.githubusercontent.com/u/5680256?v=4","gravatar_id":"","url":"https://api.github.com/users/KtorZ","html_url":"https://github.com/KtorZ","followers_url":"https://api.github.com/users/KtorZ/followers","following_url":"https://api.github.com/users/KtorZ/following{/other_user}","gists_url":"https://api.github.com/users/KtorZ/gists{/gist_id}","starred_url":"https://api.github.com/users/KtorZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KtorZ/subscriptions","organizations_url":"https://api.github.com/users/KtorZ/orgs","repos_url":"https://api.github.com/users/KtorZ/repos","events_url":"https://api.github.com/users/KtorZ/events{/privacy}","received_events_url":"https://api.github.com/users/KtorZ/received_events","type":"User","site_admin":false},"assignees":[{"login":"KtorZ","id":5680256,"avatar_url":"https://avatars0.githubusercontent.com/u/5680256?v=4","gravatar_id":"","url":"https://api.github.com/users/KtorZ","html_url":"https://github.com/KtorZ","followers_url":"https://api.github.com/users/KtorZ/followers","following_url":"https://api.github.com/users/KtorZ/following{/other_user}","gists_url":"https://api.github.com/users/KtorZ/gists{/gist_id}","starred_url":"https://api.github.com/users/KtorZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KtorZ/subscriptions","organizations_url":"https://api.github.com/users/KtorZ/orgs","repos_url":"https://api.github.com/users/KtorZ/repos","events_url":"https://api.github.com/users/KtorZ/events{/privacy}","received_events_url":"https://api.github.com/users/KtorZ/received_events","type":"User","site_admin":false},{"login":"adinapoli-iohk","id":29383371,"avatar_url":"https://avatars3.githubusercontent.com/u/29383371?v=4","gravatar_id":"","url":"https://api.github.com/users/adinapoli-iohk","html_url":"https://github.com/adinapoli-iohk","followers_url":"https://api.github.com/users/adinapoli-iohk/followers","following_url":"https://api.github.com/users/adinapoli-iohk/following{/other_user}","gists_url":"https://api.github.com/users/adinapoli-iohk/gists{/gist_id}","starred_url":"https://api.github.com/users/adinapoli-iohk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adinapoli-iohk/subscriptions","organizations_url":"https://api.github.com/users/adinapoli-iohk/orgs","repos_url":"https://api.github.com/users/adinapoli-iohk/repos","events_url":"https://api.github.com/users/adinapoli-iohk/events{/privacy}","received_events_url":"https://api.github.com/users/adinapoli-iohk/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650/commits","review_comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650/comments","review_comment_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/2650/comments","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/8bc19bd1029ecc3ce7ca00613ca4e5166bf086f9","head":{"label":"input-output-hk:ktorz/cbr-102","ref":"ktorz/cbr-102","sha":"8bc19bd1029ecc3ce7ca00613ca4e5166bf086f9","user":{"login":"input-output-hk","id":12909177,"avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":70913997,"name":"cardano-sl","full_name":"input-output-hk/cardano-sl","owner":{"login":"input-output-hk","id":12909177,"avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/input-output-hk/cardano-sl","description":"Cryptographic currency implementing Ouroboros PoS protocol","fork":false,"url":"https://api.github.com/repos/input-output-hk/cardano-sl","forks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/forks","keys_url":"https://api.github.com/repos/input-output-hk/cardano-sl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/cardano-sl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/cardano-sl/teams","hooks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/events","assignees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/cardano-sl/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/tags","blobs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/cardano-sl/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscription","commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/cardano-sl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/cardano-sl/merges","archive_url":"https://api.github.com/repos/input-output-hk/cardano-sl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/cardano-sl/downloads","issues_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/cardano-sl/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/cardano-sl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/cardano-sl/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/cardano-sl/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/deployments","created_at":"2016-10-14T13:44:38Z","updated_at":"2018-03-12T06:08:34Z","pushed_at":"2018-03-12T06:51:10Z","git_url":"git://github.com/input-output-hk/cardano-sl.git","ssh_url":"git@github.com:input-output-hk/cardano-sl.git","clone_url":"https://github.com/input-output-hk/cardano-sl.git","svn_url":"https://github.com/input-output-hk/cardano-sl","homepage":"","size":85517,"stargazers_count":2203,"watchers_count":2203,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":317,"mirror_url":null,"archived":false,"open_issues_count":142,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":317,"open_issues":142,"watchers":2203,"default_branch":"develop"}},"base":{"label":"input-output-hk:feature/cbr102-wallet-v1-documentation","ref":"feature/cbr102-wallet-v1-documentation","sha":"46dadcc4bf334bbe8b51a1e9e63fc383e76dfbb7","user":{"login":"input-output-hk","id":12909177,"avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":70913997,"name":"cardano-sl","full_name":"input-output-hk/cardano-sl","owner":{"login":"input-output-hk","id":12909177,"avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/input-output-hk/cardano-sl","description":"Cryptographic currency implementing Ouroboros PoS protocol","fork":false,"url":"https://api.github.com/repos/input-output-hk/cardano-sl","forks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/forks","keys_url":"https://api.github.com/repos/input-output-hk/cardano-sl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/cardano-sl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/cardano-sl/teams","hooks_url":"https://api.github.com/repos/input-output-hk/cardano-sl/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/cardano-sl/events","assignees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/cardano-sl/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/tags","blobs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/cardano-sl/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/cardano-sl/subscription","commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/cardano-sl/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/cardano-sl/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/cardano-sl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/cardano-sl/merges","archive_url":"https://api.github.com/repos/input-output-hk/cardano-sl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/cardano-sl/downloads","issues_url":"https://api.github.com/repos/input-output-hk/cardano-sl/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/cardano-sl/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/cardano-sl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/cardano-sl/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/cardano-sl/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/cardano-sl/deployments","created_at":"2016-10-14T13:44:38Z","updated_at":"2018-03-12T06:08:34Z","pushed_at":"2018-03-12T06:51:10Z","git_url":"git://github.com/input-output-hk/cardano-sl.git","ssh_url":"git@github.com:input-output-hk/cardano-sl.git","clone_url":"https://github.com/input-output-hk/cardano-sl.git","svn_url":"https://github.com/input-output-hk/cardano-sl","homepage":"","size":85517,"stargazers_count":2203,"watchers_count":2203,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":317,"mirror_url":null,"archived":false,"open_issues_count":142,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":317,"open_issues":142,"watchers":2203,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650"},"html":{"href":"https://github.com/input-output-hk/cardano-sl/pull/2650"},"issue":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/2650"},"comments":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/issues/2650/comments"},"review_comments":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650/comments"},"review_comment":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/pulls/2650/commits"},"statuses":{"href":"https://api.github.com/repos/input-output-hk/cardano-sl/statuses/8bc19bd1029ecc3ce7ca00613ca4e5166bf086f9"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"adinapoli-iohk"}}