{"action":"opened","issue":{"url":"https://api.github.com/repos/couchbaselabs/couchbase-mobile-portal/issues/743","repository_url":"https://api.github.com/repos/couchbaselabs/couchbase-mobile-portal","labels_url":"https://api.github.com/repos/couchbaselabs/couchbase-mobile-portal/issues/743/labels{/name}","comments_url":"https://api.github.com/repos/couchbaselabs/couchbase-mobile-portal/issues/743/comments","events_url":"https://api.github.com/repos/couchbaselabs/couchbase-mobile-portal/issues/743/events","html_url":"https://github.com/couchbaselabs/couchbase-mobile-portal/issues/743","id":237359289,"number":743,"title":"PUT new_edits not working as described in docs","user":{"login":"tleyden","id":296876,"avatar_url":"https://avatars2.githubusercontent.com/u/296876?v=3","gravatar_id":"","url":"https://api.github.com/users/tleyden","html_url":"https://github.com/tleyden","followers_url":"https://api.github.com/users/tleyden/followers","following_url":"https://api.github.com/users/tleyden/following{/other_user}","gists_url":"https://api.github.com/users/tleyden/gists{/gist_id}","starred_url":"https://api.github.com/users/tleyden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tleyden/subscriptions","organizations_url":"https://api.github.com/users/tleyden/orgs","repos_url":"https://api.github.com/users/tleyden/repos","events_url":"https://api.github.com/users/tleyden/events{/privacy}","received_events_url":"https://api.github.com/users/tleyden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-20T22:06:26Z","updated_at":"2017-06-20T22:06:26Z","closed_at":null,"body":"Steps to repro:\r\n\r\n1.  POST to `http://{{host}}:{{port_admin}}/{{db}}/`, which returns\r\n\r\n```\r\n{\r\n    \"id\": \"7a1d21a15c5873441217eb5f62af46c3\",\r\n    \"ok\": true,\r\n    \"rev\": \"1-ecbd22495c41163e3657699fd1f5ca28\"\r\n}\r\n```\r\n\r\n1. PUT to `http://{{host}}:{{port_admin}}/{{db}}/7a1d21a15c5873441217eb5f62af46c3`, which returns\r\n\r\n```\r\n{\r\n    \"id\": \"7a1d21a15c5873441217eb5f62af46c3\",\r\n    \"ok\": true,\r\n    \"rev\": \"2-9751b0b11d5cbeae6d9d756603b4cdc2\"\r\n}\r\n```\r\n\r\n1. Try to create conflict rev by doing a PUT to `http://{{host}}:{{port_admin}}/{{db}}/7a1d21a15c5873441217eb5f62af46c3?new_edits=false` with a body:\r\n\r\n```\r\n{\r\n  \"key\": \"val 2b\",\r\n  \"_rev\": \"1-ecbd22495c41163e3657699fd1f5ca28\"\r\n}\r\n```\r\n\r\nThat returns:\r\n\r\n```\r\n{\r\n    \"id\": \"7a1d21a15c5873441217eb5f62af46c3\",\r\n    \"ok\": true,\r\n    \"rev\": \"1-ecbd22495c41163e3657699fd1f5ca28\"\r\n}\r\n```\r\n\r\ninstead of a different revision with generation 2.\r\n\r\nI also tried to create conflict rev by doing a PUT to `http://{{host}}:{{port_admin}}/{{db}}/7a1d21a15c5873441217eb5f62af46c3?new_edits=false&rev=1-ecbd22495c41163e3657699fd1f5ca28` with a body:\r\n\r\n```\r\n{\r\n  \"key\": \"val 2b\"\r\n}\r\n```\r\n\r\nin that case I get:\r\n\r\n```\r\n{\r\n    \"error\": \"Bad Request\",\r\n    \"reason\": \"Bad _revisions\"\r\n}\r\n```"}}
{"actor":{"display_login":"tleyden"}}