{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1988","repository_url":"https://api.github.com/repos/swagger-api/swagger-ui","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1988/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1988/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1988/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/1988","id":136010313,"number":1988,"title":"[Question] Display JSON model including the root value","user":{"login":"hiveship","id":6461306,"avatar_url":"https://avatars.githubusercontent.com/u/6461306?v=3","gravatar_id":"","url":"https://api.github.com/users/hiveship","html_url":"https://github.com/hiveship","followers_url":"https://api.github.com/users/hiveship/followers","following_url":"https://api.github.com/users/hiveship/following{/other_user}","gists_url":"https://api.github.com/users/hiveship/gists{/gist_id}","starred_url":"https://api.github.com/users/hiveship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiveship/subscriptions","organizations_url":"https://api.github.com/users/hiveship/orgs","repos_url":"https://api.github.com/users/hiveship/repos","events_url":"https://api.github.com/users/hiveship/events{/privacy}","received_events_url":"https://api.github.com/users/hiveship/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-24T09:51:58Z","updated_at":"2016-02-25T23:46:40Z","closed_at":null,"body":"I have specified my existing API using Swagger. Now I'm facing a little problem with Swagger UI and I need some help to configure it.\r\n\r\nFor example, I have a model definition declared as below:\r\n\r\n```yaml\r\n  medium:\r\n    properties:\r\n      name: \r\n        type: string\r\n      status:\r\n      type:\r\n       type: string\r\n```\r\n\r\nThe output in the Swagger UI is:\r\n\r\n```json\r\n{\r\n  \"name\": \"string\",\r\n  \"type\": \"foo\"\r\n}\r\n```\r\n\r\nIt's correct BUT in my implementation, I'm expecting to get the JSON with the \"root element/value\" value, such:\r\n\r\n```json\r\n{\r\n**  \"Medium\": {**\r\n       \"name\": \"string\",\r\n       \"type\": \"foo\"\r\n   }\r\n}\r\n```\r\n(For specific reasons, I can't change the implementation of my API).\r\n\r\nHow can I configure Swagger UI (or maybe I need to edit my swagger.yaml (ok with that), to **display the JSON model using the root element/value **?\r\nIf it's not currently supported, can you give me some help and I may try to do it and then send a PR ?"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/189037792","html_url":"https://github.com/swagger-api/swagger-ui/issues/1988#issuecomment-189037792","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/1988","id":189037792,"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":"2016-02-25T23:46:40Z","updated_at":"2016-02-25T23:46:40Z","body":"You can't describe the two variants in one using Swagger because they are not the same. In the XML you want a direct object, and in the JSON you want a wrapping object. They're close, but not the same."}}