{"action":"created","issue":{"url":"https://api.github.com/repos/Mashape/kong/issues/236","labels_url":"https://api.github.com/repos/Mashape/kong/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/236/comments","events_url":"https://api.github.com/repos/Mashape/kong/issues/236/events","html_url":"https://github.com/Mashape/kong/pull/236","id":76118718,"number":236,"title":"[feature] Admin API now supports form-encoded and json","user":{"login":"thibaultCha","id":1125431,"avatar_url":"https://avatars.githubusercontent.com/u/1125431?v=3","gravatar_id":"","url":"https://api.github.com/users/thibaultCha","html_url":"https://github.com/thibaultCha","followers_url":"https://api.github.com/users/thibaultCha/followers","following_url":"https://api.github.com/users/thibaultCha/following{/other_user}","gists_url":"https://api.github.com/users/thibaultCha/gists{/gist_id}","starred_url":"https://api.github.com/users/thibaultCha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thibaultCha/subscriptions","organizations_url":"https://api.github.com/users/thibaultCha/orgs","repos_url":"https://api.github.com/users/thibaultCha/repos","events_url":"https://api.github.com/users/thibaultCha/events{/privacy}","received_events_url":"https://api.github.com/users/thibaultCha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-13T20:47:26Z","updated_at":"2015-05-15T18:15:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Mashape/kong/pulls/236","html_url":"https://github.com/Mashape/kong/pull/236","diff_url":"https://github.com/Mashape/kong/pull/236.diff","patch_url":"https://github.com/Mashape/kong/pull/236.patch"},"body":"- [x] Admin API accepts both form-encoded and JSON parameters. `parse_params()` is a custom Lapis helper which parses form-encoded or application/json parameters. If sending form-encoded, it will un-nest keys like `value.object=123` to `{value={object=123}}`\r\n- [x] Fix a bug in the schema validation. If a field had more than 1 rule, it would only validate one of them.\r\n- [x] Fix Lapis's parsing behaviour with params such as `?key[1]=val` being parsed as `{[\"1\"]=\"val\"}`. it is now properly parsed as `{\"val\"}`\r\n- [x] Fix more bugs related with the DAO\r\n- [x] Refactored a lot of code, considerably reducing LOCs\r\n- [x] A lot more tests for the Admin API\r\n- [ ] Change PUT to behave properly (currently behaves like PATCH)\r\n- [ ] Implement PATCH\r\n\r\nWe can now query the Admin API with form-encoded params or a JSON body assuming the content type contains `application/json`. Malformed JSON will return a 400.\r\n\r\nMost of the new LOCs are tests, otherwise the actual number of LOCs is considerably reduced.\r\n\r\nHold on before merging, this maybe needs a bit more testing but opening to allow discussion."},"comment":{"url":"https://api.github.com/repos/Mashape/kong/issues/comments/102476865","html_url":"https://github.com/Mashape/kong/pull/236#issuecomment-102476865","issue_url":"https://api.github.com/repos/Mashape/kong/issues/236","id":102476865,"user":{"login":"sinzone","id":1213643,"avatar_url":"https://avatars.githubusercontent.com/u/1213643?v=3","gravatar_id":"","url":"https://api.github.com/users/sinzone","html_url":"https://github.com/sinzone","followers_url":"https://api.github.com/users/sinzone/followers","following_url":"https://api.github.com/users/sinzone/following{/other_user}","gists_url":"https://api.github.com/users/sinzone/gists{/gist_id}","starred_url":"https://api.github.com/users/sinzone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinzone/subscriptions","organizations_url":"https://api.github.com/users/sinzone/orgs","repos_url":"https://api.github.com/users/sinzone/repos","events_url":"https://api.github.com/users/sinzone/events{/privacy}","received_events_url":"https://api.github.com/users/sinzone/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T18:15:25Z","updated_at":"2015-05-15T18:15:25Z","body":"@ahmadnassri @Nijikokun  who updates the doc? "}}