title: Swagger ui in Rails
body: <p>I installed </p>
  
  <pre><code>gem 'swagger-docs'
  gem 'swagger-ui_rails'
  </code></pre>
  
  <p>Then provided some documentation from the sample </p>
  
  <pre><code>swagger_controller :users, "User Management"
  
  swagger_api :index do
      summary "Fetches all User items"
      notes "This lists all the active users"
      param :query, :page, :integer, :optional, "Page number"
      param :path, :nested_id, :integer, :optional, "Team Id"
      response :unauthorized
      response :not_acceptable, "The request you made is not acceptable"
      response :requested_range_not_satisfiable
    end
  </code></pre>
  
  <p>I created <code>ApiController</code> and in <code>index.html.erb</code> added rendering as partial view for swagger.</p>
  
  <pre><code>&lt;h1&gt;hello&lt;/h1&gt;
  
  &lt;% discovery_url = Rails.root + '/api/v1/api-docs.json' %&gt;
  &lt;%= render partial: 'swagger_ui/swagger_ui', locals: {discovery_url: discovery_url} %&gt;
  </code></pre>
  
  <p>It renders only main page of swagger without colors or colored containers, but nothing works, if I try to click on any button nothing happens.</p>
  
  <p><a href="https://i.stack.imgur.com/K8sPA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K8sPA.png" alt="enter image description here"></a></p>