Permalink
Browse files

Upgraded Swagger UI

  • Loading branch information...
sergeychernyshev committed Dec 27, 2017
1 parent f9815c6 commit e0a02b0ef0803f9840ec4194c3d8fad1bebd1faf
Showing with 27 additions and 64 deletions.
  1. +1 −1 swagger-ui
  2. +26 −63 themes/awesome/templates/swagger-ui.html.twig
Submodule swagger-ui updated 442 files
@@ -1,72 +1,35 @@
{% extends '@startupapi/page.html.twig' %}
{% block head %}
<link href='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/css/print.css' media='print' rel='stylesheet' type='text/css'/>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/object-assign-pollyfill.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/handlebars-4.0.5.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/lodash.min.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/backbone-min.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/swagger-ui.min.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/jsoneditor.min.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/marked.js' type='text/javascript'></script>
<script src='{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/lib/swagger-oauth.js' type='text/javascript'></script>
<!-- Some basic translations -->
<!-- <script src='lang/translator.js' type='text/javascript'></script> -->
<!-- <script src='lang/ru.js' type='text/javascript'></script> -->
<!-- <script src='lang/en.js' type='text/javascript'></script> -->
<script type="text/javascript">
$(function () {
hljs.configure({
highlightSizeThreshold: 5000
});
// Pre load translate...
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
window.swaggerUi = new SwaggerUi({
url: '{{ UserConfig.USERSROOTURL }}/api.php?swagger-spec',
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
onComplete: function(swaggerApi, swaggerUi){
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
},
onFailure: function(data) {
log("Unable to Load SwaggerUI");
},
docExpansion: "list",
jsonEditor: false,
defaultModelRendering: 'schema',
showRequestHeaders: false
});
window.swaggerUi.load();
function log() {
if ('console' in window) {
console.log.apply(console, arguments);
}
}
});
</script>
<link href="{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/swagger-ui.css" rel="stylesheet" type="text/css"/>
{% endblock %}
{% block content %}
<div class="container-fluid" style="margin-bottom: 75px">
<div class="swagger-section">
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</div>
<div id="swagger-ui-container"></div>
</div>
<script src="{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/swagger-ui-bundle.js"></script>
<script src="{{ UserConfig.USERSROOTURL }}/swagger-ui/dist/swagger-ui-standalone-preset.js"></script>
<script>
window.onload = function() {
// Build a system
const ui = SwaggerUIBundle({
url: "{{ UserConfig.USERSROOTURL }}/api.php?swagger-spec",
dom_id: "#swagger-ui-container",
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
window.ui = ui
}
</script>
{% endblock %}

0 comments on commit e0a02b0

Please sign in to comment.