Skip to content

Commit

Permalink
Merge c47a93d into 070278b
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed May 23, 2017
2 parents 070278b + c47a93d commit 2bfeec8
Show file tree
Hide file tree
Showing 54 changed files with 189 additions and 12,564 deletions.
22 changes: 20 additions & 2 deletions src/Bridge/Symfony/Bundle/Resources/public/init-swagger-ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
$(function () {
window.onload = function() {
const data = JSON.parse(document.getElementById('swagger-data').innerText);
const ui = SwaggerUIBundle({
spec: data.spec,
dom_id: '#swagger-ui',
validatorUrl: null,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});
window.ui = ui
};

/*$(function () {
var data = JSON.parse($('#swagger-data').html());
window.swaggerUi = new SwaggerUi({
url: data.url,
Expand Down Expand Up @@ -58,4 +76,4 @@ $(function () {
console.log.apply(console, arguments);
}
}
});
});*/
Loading

0 comments on commit 2bfeec8

Please sign in to comment.