{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/851","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/851/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/851/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/851/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/851","id":55467010,"number":851,"title":"Doesn't work unless window.swaggerUi is set","user":{"login":"floydqwz","id":7994792,"avatar_url":"https://avatars.githubusercontent.com/u/7994792?v=3","gravatar_id":"","url":"https://api.github.com/users/floydqwz","html_url":"https://github.com/floydqwz","followers_url":"https://api.github.com/users/floydqwz/followers","following_url":"https://api.github.com/users/floydqwz/following{/other_user}","gists_url":"https://api.github.com/users/floydqwz/gists{/gist_id}","starred_url":"https://api.github.com/users/floydqwz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floydqwz/subscriptions","organizations_url":"https://api.github.com/users/floydqwz/orgs","repos_url":"https://api.github.com/users/floydqwz/repos","events_url":"https://api.github.com/users/floydqwz/events{/privacy}","received_events_url":"https://api.github.com/users/floydqwz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/milestones/5","html_url":"https://github.com/swagger-api/swagger-ui/milestones/v2.1-M2","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/milestones/5/labels","id":916898,"number":5,"title":"v2.1-M2","description":"Add support for:\r\n\r\nMaps\r\nComposition\r\nEnums\r\n","creator":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"open_issues":48,"closed_issues":20,"state":"open","created_at":"2014-12-29T18:05:17Z","updated_at":"2015-03-04T21:31:13Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-01-26T10:30:09Z","updated_at":"2015-03-04T22:03:31Z","closed_at":null,"body":"I have made a page which uses Swagger UI twice. One for each API I have (since the API changed and I don't want to have ALL my API's in ONE file, but on ONE page.). The only way I can make it work is if window.swaggerUi is assigned to the SwaggerUi() object.\r\n\r\nThat sounds like a bug to me. I should be able to assign the SwaggerUi object to whatever I want."},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/77259804","html_url":"https://github.com/swagger-api/swagger-ui/issues/851#issuecomment-77259804","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/851","id":77259804,"user":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T22:03:31Z","updated_at":"2015-03-04T22:03:31Z","body":"my suggestion is as follows:\r\n\r\n1) Swagger-ui should not assume it's attached to `window`\r\n2) The construction of swagger-ui should determine *what* it's attached to.  It could be an array, etc.\r\n3) Anything inside of swagger-ui should be referencing `this`.  So authorizations should be set directly through the swagger-ui object, not necessarily through window.authorizations.\r\n\r\nWe should make a mechanism so older deployments of swagger-ui can be compatible with the change, which might be setting window.authorizations = swaggerInstance.authorizations or something like that."}}