{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/7629","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/7629/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/7629/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/7629/events","html_url":"https://github.com/openshift/origin/issues/7629","id":136448004,"number":7629,"title":"Http PATCH with '/' in key","user":{"login":"Meems33","id":1854851,"avatar_url":"https://avatars.githubusercontent.com/u/1854851?v=3","gravatar_id":"","url":"https://api.github.com/users/Meems33","html_url":"https://github.com/Meems33","followers_url":"https://api.github.com/users/Meems33/followers","following_url":"https://api.github.com/users/Meems33/following{/other_user}","gists_url":"https://api.github.com/users/Meems33/gists{/gist_id}","starred_url":"https://api.github.com/users/Meems33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meems33/subscriptions","organizations_url":"https://api.github.com/users/Meems33/orgs","repos_url":"https://api.github.com/users/Meems33/repos","events_url":"https://api.github.com/users/Meems33/events{/privacy}","received_events_url":"https://api.github.com/users/Meems33/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openshift/origin/labels/component/restapi","name":"component/restapi","color":"0052cc"},{"url":"https://api.github.com/repos/openshift/origin/labels/priority/P2","name":"priority/P2","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-02-25T17:03:49Z","updated_at":"2016-06-07T15:52:28Z","closed_at":null,"body":"The REST json patch method(s) do not allow ~0 and ~1 escape characters for '~' and '/' respectively. (http://jsonpatch.com/)\r\n\r\nExample (/oapi/v1/namespaces/project/imagestreams/image):\r\n\r\n```\r\n// json\r\n{ \r\n  \"metadata\": {\r\n    \"annotations\": {\r\n      \"openshift.io/image.dockerRepositoryCheck\": \"2016-02-25T16:38:43Z\"\r\n    }\r\n  }\r\n}\r\n\r\n// patch operation\r\n[ { \"op\": \"add\", \"path\": \"/metadata/annotations/foo~1bar\", \"value\": \"val\" } ]\"\r\n```\r\n\r\n\r\nresults in a validation error:\r\n\r\n>       {\r\n>        \"reason\": \"FieldValueInvalid\",\r\n>        \"message\": \"invalid value 'foo~1bar', Details: must be a qualified name (at most 63 characters, matching regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]), with an optional DNS subdomain prefix (at most 253 characters, matching regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*) and slash (/): e.g. \\\"MyName\\\" or \\\"example.com/MyName\\\"\",\r\n>        \"field\": \"metadata.annotations\"\r\n>      }\r\n\r\nThe expected result would be to add a key of \"foo/bar\" to \"/metadata/annotations\":\r\n```\r\n{ \r\n  \"metadata\": {\r\n    \"annotations\": {\r\n      \"foo/bar\": \"val\",\r\n      \"openshift.io/image.dockerRepositoryCheck\": \"2016-02-25T16:38:43Z\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nDeletes seem to fail silently. Example:\r\n`[ { \"op\": \"remove\", \"path\": \"/metadata/annotations/openshift.io~1image.dockerRepositoryCheck\" } ]`\r\n(See https://github.com/openshift/origin/issues/7226)\r\n\r\nI suspect other operations have the same problem."},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/224325160","html_url":"https://github.com/openshift/origin/issues/7629#issuecomment-224325160","issue_url":"https://api.github.com/repos/openshift/origin/issues/7629","id":224325160,"user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T15:52:28Z","updated_at":"2016-06-07T15:52:28Z","body":"a matching PR in origin would be good, shouldn't conflict with the rebase in progress (other than godeps.json, which wouldn't be a big deal to resolve either way)"}}
{"actor":{"display_login":"liggitt"}}