Skip to content

Instantly share code, notes, and snippets.

@atishn
Created July 22, 2015 02:12
Show Gist options
  • Save atishn/e7f70b54e26cd7e5603d to your computer and use it in GitHub Desktop.
Save atishn/e7f70b54e26cd7e5603d to your computer and use it in GitHub Desktop.
Swagger
$(function () {
var url = window.location.protocol + "//" + window.location.host;
if (window.location.pathname.indexOf('/api') > 0) {
url += window.location.pathname.substring(0, window.location.pathname.indexOf('/api'))
}
url += "/api-docs";
log('API URL: ' + apiUrl);
window.swaggerUi = new SwaggerUi({})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment