Append swagger-auth global functions to window and don't break backward

This commit is contained in:
Mohsen Azimi
2015-03-16 15:05:42 -07:00
parent 8c6e3a6d95
commit d61cf24ae0
5 changed files with 14 additions and 6 deletions

View File

@@ -83,6 +83,13 @@
console.log.apply(console, arguments);
}
}
// don't break backward compatibility with previous versions
window.authorizations = {
add: swaggerUi.api.clientAuthorizations.add
};
window.ApiKeyAuthorization = SwaggerClient.ApiKeyAuthorization;
window.PasswordAuthorization = SwaggerClient.PasswordAuthorization;
});
</script>
</head>

View File

@@ -195,4 +195,4 @@ window.SwaggerUi = Backbone.Router.extend({
});
window.SwaggerUi.Views = {};
window.SwaggerUi.Views = {};