Sha256: 1aa445d4611d00fdc05f9b7bcbf0058c9f83639215626bb27c061d5a5bf46fa6

Contents?: true

Size: 990 Bytes

Versions: 1

Compression:

Stored size: 990 Bytes

Contents

<% content_for(:head) do %>
  <script type="text/javascript">
    window.onload = function() {
      var url = window.location.search.match(/url=([^&]+)/);
      if (url && url.length > 1) {
        url = decodeURIComponent(url[1]);
      } else {
        url = "<%= @swagger_url %>";
      }

      // Begin Swagger UI call region
      const ui = SwaggerUIBundle({
        url: url,
        dom_id: '#swagger-ui',
        deepLinking: true,
        docExpansion: "<%= @doc_expansion %>",
        jsonEditor: "<%= @json_editor %>",
        defaultModelRendering: "<%= @model_rendering %>",
        showRequestHeaders: "<%= @request_headers %>",
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ],
        layout: "StandaloneLayout"
      });
      // End Swagger UI call region

      window.ui = ui;
    };
  </script>
<% end %>

<div id="swagger-ui"></div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
swagger_ui_engine_2-0.2.0 app/views/swagger_ui_engine2/swagger_docs/index.html.erb