{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1589","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1589/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1589/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1589/events","html_url":"https://github.com/swagger-api/swagger-ui/pull/1589","id":105763750,"number":1589,"title":"JSON Body Editor (Master PR)","user":{"login":"lepinayl","id":11438384,"avatar_url":"https://avatars.githubusercontent.com/u/11438384?v=3","gravatar_id":"","url":"https://api.github.com/users/lepinayl","html_url":"https://github.com/lepinayl","followers_url":"https://api.github.com/users/lepinayl/followers","following_url":"https://api.github.com/users/lepinayl/following{/other_user}","gists_url":"https://api.github.com/users/lepinayl/gists{/gist_id}","starred_url":"https://api.github.com/users/lepinayl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lepinayl/subscriptions","organizations_url":"https://api.github.com/users/lepinayl/orgs","repos_url":"https://api.github.com/users/lepinayl/repos","events_url":"https://api.github.com/users/lepinayl/events{/privacy}","received_events_url":"https://api.github.com/users/lepinayl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-10T08:59:08Z","updated_at":"2015-09-10T17:51:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/pulls/1589","html_url":"https://github.com/swagger-api/swagger-ui/pull/1589","diff_url":"https://github.com/swagger-api/swagger-ui/pull/1589.diff","patch_url":"https://github.com/swagger-api/swagger-ui/pull/1589.patch"},"body":"# Feature proposal: JSON Body Editor\r\n\r\n## Related work\r\nThis is a proposal to add a JSON editor for body requests in swagger UI.\r\n\r\nThis work is based on another open source project called [Json-editor](https://github.com/jdorn/json-editor) by [Jeremy Dorn](https://github.com/jdorn).\r\n\r\nYou will be able to find a demo of Jeremy's editor [here](http://jeremydorn.com/json-editor/) to give you an idea of the potential of this editor.\r\n\r\n## Configuration\r\nThe editor can be enabled/disabled using the swagger configuration key ```jsonEditor``` :\r\n```javascript\r\n      window.swaggerUi = new SwaggerUi({\r\n        jsonEditor:true\r\n      });\r\n```\r\n\r\nThe option is currently enabled by default (just because it is more practical for e2e tests).\r\n\r\n## Visual preview\r\n\r\nThis is how it looks like at the moment in a post request:\r\n![capture](https://cloud.githubusercontent.com/assets/11438384/8620084/83dd5f0a-271d-11e5-9779-a3f223b52b0d.PNG)\r\n\r\n## Backward compatibility\r\nAccording to the way swagger now works, Specs 1.2 are now automaticaly converted to 2.0.\r\n\r\nSo it should work with 1.2 as well but I haven't not tested it yet.\r\n\r\n## Current state of the implementation\r\n\r\nPlease let me know how I could improve both the internal design (code, unit tests, configuration) and external design (css, user experience).\r\n\r\n## External dependencies\r\nThe following PR have been created on JSONEditor to implement this feature\r\nhttps://github.com/jdorn/json-editor/pull/461 (closed)\r\nhttps://github.com/jdorn/json-editor/pull/456 (open)\r\n\r\nSo at the moment this PR is using a custom JSONEditor version until both PR will be accepted.\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/139324273","html_url":"https://github.com/swagger-api/swagger-ui/pull/1589#issuecomment-139324273","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1589","id":139324273,"user":{"login":"webron","id":241629,"avatar_url":"https://avatars.githubusercontent.com/u/241629?v=3","gravatar_id":"","url":"https://api.github.com/users/webron","html_url":"https://github.com/webron","followers_url":"https://api.github.com/users/webron/followers","following_url":"https://api.github.com/users/webron/following{/other_user}","gists_url":"https://api.github.com/users/webron/gists{/gist_id}","starred_url":"https://api.github.com/users/webron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webron/subscriptions","organizations_url":"https://api.github.com/users/webron/orgs","repos_url":"https://api.github.com/users/webron/repos","events_url":"https://api.github.com/users/webron/events{/privacy}","received_events_url":"https://api.github.com/users/webron/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T17:51:26Z","updated_at":"2015-09-10T17:51:26Z","body":"Thanks again for all the work. I'll test the functionality in the upcoming days and hopefully we'll manage to get it merged soon. I'm sure many users would be excited for it.\r\n\r\nIf any user wants to clone the fork and test the PR and provide feedback, that would be great too."}}