Class: EasySwaggerUi::SwaggerController

Inherits:
ApplicationController show all
Defined in:
app/controllers/easy_swagger_ui/swagger_controller.rb

Instance Method Summary collapse

Instance Method Details

#oauth2Object

get ‘oauth2’



4
5
# File 'app/controllers/easy_swagger_ui/swagger_controller.rb', line 4

def oauth2
end

#specObject

get ‘*doc_path.json’



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/controllers/easy_swagger_ui/swagger_controller.rb', line 12

def spec
  if EasySwaggerUi.cache_enabled
    cache_key = "easy_swagger_ui:spec:#{params[:doc_path]}"
    options = {
      expires_in: EasySwaggerUi.cache_timeout,
      race_condition_ttl: 10,
    }
    spec = EasySwaggerUi.cache_store.fetch(cache_key, options) do
      parse_spec(params[:doc_path])
    end
  else
    spec = parse_spec(params[:doc_path])
  end
  render json: spec
end

#viewObject

get ‘*doc_path’



8
9
# File 'app/controllers/easy_swagger_ui/swagger_controller.rb', line 8

def view
end