summaryrefslogtreecommitdiffhomepage
path: root/themes/docsy/layouts/shortcodes/swaggerui.html
blob: f0d59a1586c39cbb1f8cc04577d893f9588a3ffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{ $original := .Get "src" }}
<div id="ohpen_swagger_ui"></div>	
<script>
window.onload = function() {
  const ui = SwaggerUIBundle({
    url: {{ $original }},
    dom_id: '#ohpen_swagger_ui',
    presets: [
      SwaggerUIBundle.presets.apis,
      SwaggerUIStandalonePreset
    ]
  })

  window.ui = ui
}
</script>