{"action":"created","comment":{"url":"https://api.github.com/repos/rs/rest-layer/pulls/comments/237987915","pull_request_review_id":180429905,"id":237987915,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzk4NzkxNQ==","diff_hunk":"@@ -1179,6 +1186,44 @@ Prefer: return=minimal\n HTTP/1.1 204 No Content\n ```\n \n+## HTTP Methods\n+\n+Following HTTP Methods are supported currently.\n+\n+### HEAD\n+The same as [GET](#get), except that it doesn't return any body.\n+\n+### GET\n+Used to query a resource with its sub/embedded resources.\n+\n+### POST\n+Used to create new resource document, where new `ID` is generated from the server.\n+\n+### PUT\n+Used to create/update single resource document given its `ID`. Be aware when dealing with resource fields with `Default` set. Initial creation for such resources will set particular field to its default value if omitted, however on subsequent `PUT` calls this field will be deleted if omitted. If persistent `Default` field is needed use `{Required: true}` with it. \n+\n+### PATCH\n+Used to update/patch single resource document given its `ID`. REST Layer supports following update protocols:\n+\n+- Simple filed replacement [RFC-5789](http://tools.ietf.org/html/rfc5789) - this protocol will udpate only supplied top level fields, and will leave other fields in the document intact. This means that this protocol can't delete fields. Using this protocol is specified with `Content-Type: application/json` HTTP Request header.\n+\n+- [JSON-Patch/RFC-6902](https://tools.ietf.org/html/rfc6902) - When patching deeply nested documents, it is more convenient to use protocol designed especially for this. Using this protocol is specified with `Content-Type: application/json-patch+json` HTTP Request header.\n+\n+\tIf using `If-Match` concurrency control as described in the [data control and integrity section](#data-integrity-and-concurrency-control), you could potentially choose to calculate the body of new object client side. Note that the response body for a successful operation can be omitted by supplying a HTTP request header: `Prefer: return=minimal`.\n+\n+\t```sh","path":"README.md","position":48,"original_position":48,"commit_id":"8422b43309cabaeba39af85c57e8e76dd23f0424","original_commit_id":"8422b43309cabaeba39af85c57e8e76dd23f0424","user":{"login":"smyrman","id":75205,"node_id":"MDQ6VXNlcjc1MjA1","avatar_url":"https://avatars2.githubusercontent.com/u/75205?v=4","gravatar_id":"","url":"https://api.github.com/users/smyrman","html_url":"https://github.com/smyrman","followers_url":"https://api.github.com/users/smyrman/followers","following_url":"https://api.github.com/users/smyrman/following{/other_user}","gists_url":"https://api.github.com/users/smyrman/gists{/gist_id}","starred_url":"https://api.github.com/users/smyrman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smyrman/subscriptions","organizations_url":"https://api.github.com/users/smyrman/orgs","repos_url":"https://api.github.com/users/smyrman/repos","events_url":"https://api.github.com/users/smyrman/events{/privacy}","received_events_url":"https://api.github.com/users/smyrman/received_events","type":"User","site_admin":false},"body":"When using ```sh, no indentation is needed -- sorry if I missed this earlier.","created_at":"2018-11-30T20:09:02Z","updated_at":"2018-11-30T20:10:10Z","html_url":"https://github.com/rs/rest-layer/pull/206#discussion_r237987915","pull_request_url":"https://api.github.com/repos/rs/rest-layer/pulls/206","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rs/rest-layer/pulls/comments/237987915"},"html":{"href":"https://github.com/rs/rest-layer/pull/206#discussion_r237987915"},"pull_request":{"href":"https://api.github.com/repos/rs/rest-layer/pulls/206"}}},"pull_request":{"url":"https://api.github.com/repos/rs/rest-layer/pulls/206","id":233981636,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzOTgxNjM2","html_url":"https://github.com/rs/rest-layer/pull/206","diff_url":"https://github.com/rs/rest-layer/pull/206.diff","patch_url":"https://github.com/rs/rest-layer/pull/206.patch","issue_url":"https://api.github.com/repos/rs/rest-layer/issues/206","number":206,"state":"open","locked":false,"title":"Prevent removing of (Required,Default) fields in HTTP PUT. Fixes #174","user":{"login":"Dragomir-Ivanov","id":92195,"node_id":"MDQ6VXNlcjkyMTk1","avatar_url":"https://avatars0.githubusercontent.com/u/92195?v=4","gravatar_id":"","url":"https://api.github.com/users/Dragomir-Ivanov","html_url":"https://github.com/Dragomir-Ivanov","followers_url":"https://api.github.com/users/Dragomir-Ivanov/followers","following_url":"https://api.github.com/users/Dragomir-Ivanov/following{/other_user}","gists_url":"https://api.github.com/users/Dragomir-Ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dragomir-Ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dragomir-Ivanov/subscriptions","organizations_url":"https://api.github.com/users/Dragomir-Ivanov/orgs","repos_url":"https://api.github.com/users/Dragomir-Ivanov/repos","events_url":"https://api.github.com/users/Dragomir-Ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/Dragomir-Ivanov/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-27T16:40:31Z","updated_at":"2018-11-30T20:10:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f600d1f9d9eeaffea6041912f89922e49256a7da","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rs/rest-layer/pulls/206/commits","review_comments_url":"https://api.github.com/repos/rs/rest-layer/pulls/206/comments","review_comment_url":"https://api.github.com/repos/rs/rest-layer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rs/rest-layer/issues/206/comments","statuses_url":"https://api.github.com/repos/rs/rest-layer/statuses/8422b43309cabaeba39af85c57e8e76dd23f0424","head":{"label":"Dragomir-Ivanov:master","ref":"master","sha":"8422b43309cabaeba39af85c57e8e76dd23f0424","user":{"login":"Dragomir-Ivanov","id":92195,"node_id":"MDQ6VXNlcjkyMTk1","avatar_url":"https://avatars0.githubusercontent.com/u/92195?v=4","gravatar_id":"","url":"https://api.github.com/users/Dragomir-Ivanov","html_url":"https://github.com/Dragomir-Ivanov","followers_url":"https://api.github.com/users/Dragomir-Ivanov/followers","following_url":"https://api.github.com/users/Dragomir-Ivanov/following{/other_user}","gists_url":"https://api.github.com/users/Dragomir-Ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dragomir-Ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dragomir-Ivanov/subscriptions","organizations_url":"https://api.github.com/users/Dragomir-Ivanov/orgs","repos_url":"https://api.github.com/users/Dragomir-Ivanov/repos","events_url":"https://api.github.com/users/Dragomir-Ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/Dragomir-Ivanov/received_events","type":"User","site_admin":false},"repo":{"id":159216646,"node_id":"MDEwOlJlcG9zaXRvcnkxNTkyMTY2NDY=","name":"rest-layer","full_name":"Dragomir-Ivanov/rest-layer","private":false,"owner":{"login":"Dragomir-Ivanov","id":92195,"node_id":"MDQ6VXNlcjkyMTk1","avatar_url":"https://avatars0.githubusercontent.com/u/92195?v=4","gravatar_id":"","url":"https://api.github.com/users/Dragomir-Ivanov","html_url":"https://github.com/Dragomir-Ivanov","followers_url":"https://api.github.com/users/Dragomir-Ivanov/followers","following_url":"https://api.github.com/users/Dragomir-Ivanov/following{/other_user}","gists_url":"https://api.github.com/users/Dragomir-Ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/Dragomir-Ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dragomir-Ivanov/subscriptions","organizations_url":"https://api.github.com/users/Dragomir-Ivanov/orgs","repos_url":"https://api.github.com/users/Dragomir-Ivanov/repos","events_url":"https://api.github.com/users/Dragomir-Ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/Dragomir-Ivanov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Dragomir-Ivanov/rest-layer","description":"REST Layer, Go (golang) REST API framework","fork":true,"url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer","forks_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/forks","keys_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/teams","hooks_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/hooks","issue_events_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/issues/events{/number}","events_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/events","assignees_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/assignees{/user}","branches_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/branches{/branch}","tags_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/tags","blobs_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/statuses/{sha}","languages_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/languages","stargazers_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/stargazers","contributors_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/contributors","subscribers_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/subscribers","subscription_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/subscription","commits_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/contents/{+path}","compare_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/merges","archive_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/downloads","issues_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/issues{/number}","pulls_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/pulls{/number}","milestones_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/milestones{/number}","notifications_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/labels{/name}","releases_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/releases{/id}","deployments_url":"https://api.github.com/repos/Dragomir-Ivanov/rest-layer/deployments","created_at":"2018-11-26T18:47:12Z","updated_at":"2018-11-30T17:05:12Z","pushed_at":"2018-11-30T17:05:10Z","git_url":"git://github.com/Dragomir-Ivanov/rest-layer.git","ssh_url":"git@github.com:Dragomir-Ivanov/rest-layer.git","clone_url":"https://github.com/Dragomir-Ivanov/rest-layer.git","svn_url":"https://github.com/Dragomir-Ivanov/rest-layer","homepage":" http://rest-layer.io","size":1060,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rs:master","ref":"master","sha":"98608589122380efac51bb0aaed3c7be3879a34c","user":{"login":"rs","id":68232,"node_id":"MDQ6VXNlcjY4MjMy","avatar_url":"https://avatars2.githubusercontent.com/u/68232?v=4","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"repo":{"id":39911647,"node_id":"MDEwOlJlcG9zaXRvcnkzOTkxMTY0Nw==","name":"rest-layer","full_name":"rs/rest-layer","private":false,"owner":{"login":"rs","id":68232,"node_id":"MDQ6VXNlcjY4MjMy","avatar_url":"https://avatars2.githubusercontent.com/u/68232?v=4","gravatar_id":"","url":"https://api.github.com/users/rs","html_url":"https://github.com/rs","followers_url":"https://api.github.com/users/rs/followers","following_url":"https://api.github.com/users/rs/following{/other_user}","gists_url":"https://api.github.com/users/rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rs/subscriptions","organizations_url":"https://api.github.com/users/rs/orgs","repos_url":"https://api.github.com/users/rs/repos","events_url":"https://api.github.com/users/rs/events{/privacy}","received_events_url":"https://api.github.com/users/rs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rs/rest-layer","description":"REST Layer, Go (golang) REST API framework","fork":false,"url":"https://api.github.com/repos/rs/rest-layer","forks_url":"https://api.github.com/repos/rs/rest-layer/forks","keys_url":"https://api.github.com/repos/rs/rest-layer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rs/rest-layer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rs/rest-layer/teams","hooks_url":"https://api.github.com/repos/rs/rest-layer/hooks","issue_events_url":"https://api.github.com/repos/rs/rest-layer/issues/events{/number}","events_url":"https://api.github.com/repos/rs/rest-layer/events","assignees_url":"https://api.github.com/repos/rs/rest-layer/assignees{/user}","branches_url":"https://api.github.com/repos/rs/rest-layer/branches{/branch}","tags_url":"https://api.github.com/repos/rs/rest-layer/tags","blobs_url":"https://api.github.com/repos/rs/rest-layer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rs/rest-layer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rs/rest-layer/git/refs{/sha}","trees_url":"https://api.github.com/repos/rs/rest-layer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rs/rest-layer/statuses/{sha}","languages_url":"https://api.github.com/repos/rs/rest-layer/languages","stargazers_url":"https://api.github.com/repos/rs/rest-layer/stargazers","contributors_url":"https://api.github.com/repos/rs/rest-layer/contributors","subscribers_url":"https://api.github.com/repos/rs/rest-layer/subscribers","subscription_url":"https://api.github.com/repos/rs/rest-layer/subscription","commits_url":"https://api.github.com/repos/rs/rest-layer/commits{/sha}","git_commits_url":"https://api.github.com/repos/rs/rest-layer/git/commits{/sha}","comments_url":"https://api.github.com/repos/rs/rest-layer/comments{/number}","issue_comment_url":"https://api.github.com/repos/rs/rest-layer/issues/comments{/number}","contents_url":"https://api.github.com/repos/rs/rest-layer/contents/{+path}","compare_url":"https://api.github.com/repos/rs/rest-layer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rs/rest-layer/merges","archive_url":"https://api.github.com/repos/rs/rest-layer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rs/rest-layer/downloads","issues_url":"https://api.github.com/repos/rs/rest-layer/issues{/number}","pulls_url":"https://api.github.com/repos/rs/rest-layer/pulls{/number}","milestones_url":"https://api.github.com/repos/rs/rest-layer/milestones{/number}","notifications_url":"https://api.github.com/repos/rs/rest-layer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rs/rest-layer/labels{/name}","releases_url":"https://api.github.com/repos/rs/rest-layer/releases{/id}","deployments_url":"https://api.github.com/repos/rs/rest-layer/deployments","created_at":"2015-07-29T19:16:20Z","updated_at":"2018-11-30T08:38:45Z","pushed_at":"2018-11-30T20:05:46Z","git_url":"git://github.com/rs/rest-layer.git","ssh_url":"git@github.com:rs/rest-layer.git","clone_url":"https://github.com/rs/rest-layer.git","svn_url":"https://github.com/rs/rest-layer","homepage":" http://rest-layer.io","size":1058,"stargazers_count":756,"watchers_count":756,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":57,"mirror_url":null,"archived":false,"open_issues_count":32,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":57,"open_issues":32,"watchers":756,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rs/rest-layer/pulls/206"},"html":{"href":"https://github.com/rs/rest-layer/pull/206"},"issue":{"href":"https://api.github.com/repos/rs/rest-layer/issues/206"},"comments":{"href":"https://api.github.com/repos/rs/rest-layer/issues/206/comments"},"review_comments":{"href":"https://api.github.com/repos/rs/rest-layer/pulls/206/comments"},"review_comment":{"href":"https://api.github.com/repos/rs/rest-layer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rs/rest-layer/pulls/206/commits"},"statuses":{"href":"https://api.github.com/repos/rs/rest-layer/statuses/8422b43309cabaeba39af85c57e8e76dd23f0424"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"smyrman"}}