{"action":"opened","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/327","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/327/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/327/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/327","id":95894413,"number":327,"title":"Best way to do optimistic locking?","user":{"login":"adamworrall","id":1005506,"avatar_url":"https://avatars.githubusercontent.com/u/1005506?v=3","gravatar_id":"","url":"https://api.github.com/users/adamworrall","html_url":"https://github.com/adamworrall","followers_url":"https://api.github.com/users/adamworrall/followers","following_url":"https://api.github.com/users/adamworrall/following{/other_user}","gists_url":"https://api.github.com/users/adamworrall/gists{/gist_id}","starred_url":"https://api.github.com/users/adamworrall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamworrall/subscriptions","organizations_url":"https://api.github.com/users/adamworrall/orgs","repos_url":"https://api.github.com/users/adamworrall/repos","events_url":"https://api.github.com/users/adamworrall/events{/privacy}","received_events_url":"https://api.github.com/users/adamworrall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-19T07:28:56Z","updated_at":"2015-07-19T07:28:56Z","closed_at":null,"body":"I've got a resource that multiple users could potentially edit at the same time, and I'd like to implement optimistic locking.\r\n\r\nWhat would be the best way to require the `lock_version` attribute is present in any update requests made to this resource, and also provide useful error messages for the end user if they've got a stale model? Is this where you'd make a custom `OperationsProcessor`?"}}