Class: SwaggerUiEngineRails7::SwaggerDocsController
Instance Method Summary
collapse
#configuration, #set_validator_url, #validator_enabled?
#admin_password, #admin_username, #basic_authentication_enabled?, #configuration
Instance Method Details
#index ⇒ Object
14
15
16
17
18
|
# File 'app/controllers/swagger_ui_engine_rails7/swagger_docs_controller.rb', line 14
def index
redirect_to single_swagger_doc_path if single_doc_url?
redirect_to swagger_doc_path(@swagger_url.keys.first) if single_doc_url_hash?
end
|
#oauth2 ⇒ Object
11
12
|
# File 'app/controllers/swagger_ui_engine_rails7/swagger_docs_controller.rb', line 11
def oauth2
end
|
#show ⇒ Object
20
21
22
23
|
# File 'app/controllers/swagger_ui_engine_rails7/swagger_docs_controller.rb', line 20
def show
@single_doc_url = single_doc_url? || single_doc_url_hash?
@swagger_url = @swagger_url[params[:id].to_sym] unless single_doc_url?
end
|
#single_doc ⇒ Object
25
26
27
|
# File 'app/controllers/swagger_ui_engine_rails7/swagger_docs_controller.rb', line 25
def single_doc
render 'show'
end
|