Sha256: 4a532d4ee282b941a9ae239c0eb7fe3ba64fb8bb971d38ffd5d7f3c6e0e82b52

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

<script type="text/javascript">
  $(function () {
    //hljs.configure({
    //  highlightSizeThreshold: 5000
    //});

    window.swaggerUi = new SwaggerUi({
      url: '<%= discovery_url %>',
      <% if defined?(api_key) %>
        apiKey: '<%= api_key %>',
      <% end %>
      <% if defined?(validator_url) %>
        validatorUrl: <%= validator_url %>,
      <% end %>
      dom_id: "swagger-ui-container",
      supportHeaderParams: false,
      supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
      onComplete: function(swaggerApi, swaggerUi){
        log("Loaded SwaggerUI");
      },
      onFailure: function(data) {
        log("Unable to Load SwaggerUI");
      },
      docExpansion: "none",
      jsonEditor: false,
      defaultModelRendering: 'schema',
      showRequestHeaders: true
    });

    window.swaggerUi.load();

    function log() {
      if ('console' in window) {
        console.log.apply(console, arguments);
      }
    }
  });

</script>

<div id='header'>
  <div class="swagger-ui-wrap">
    <a id="logo" href="http://swagger.io"><span class="logo__title">swagger</span></a>
    <form id='api_selector'>
      <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
      <div id='auth_container'></div>
      <div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
    </form>
  </div>
</div>

<div id="message-bar" class="swagger-ui-wrap">
  &nbsp;
</div>

<div id="swagger-ui-container" class="swagger-ui-wrap"></div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
swagger-ui_rails5-2.2.8.2 app/views/swagger_ui/_swagger_ui.html.erb