Class: EasySwaggerUi::SwaggerController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- EasySwaggerUi::SwaggerController
- Defined in:
- app/controllers/easy_swagger_ui/swagger_controller.rb
Instance Method Summary collapse
-
#oauth2 ⇒ Object
get ‘oauth2’.
-
#spec ⇒ Object
get ‘*doc_path.json’.
-
#view ⇒ Object
get ‘*doc_path’.
Instance Method Details
#oauth2 ⇒ Object
get ‘oauth2’
4 5 |
# File 'app/controllers/easy_swagger_ui/swagger_controller.rb', line 4 def oauth2 end |
#spec ⇒ Object
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]}" = { expires_in: EasySwaggerUi.cache_timeout, race_condition_ttl: 10, } spec = EasySwaggerUi.cache_store.fetch(cache_key, ) do parse_spec(params[:doc_path]) end else spec = parse_spec(params[:doc_path]) end render json: spec end |
#view ⇒ Object
get ‘*doc_path’
8 9 |
# File 'app/controllers/easy_swagger_ui/swagger_controller.rb', line 8 def view end |