Class: OasRails::Configuration
- Inherits:
-
OasCore::Configuration
- Object
- OasCore::Configuration
- OasRails::Configuration
- Defined in:
- lib/oas_rails/configuration.rb
Instance Attribute Summary collapse
-
#autodiscover_request_body ⇒ Object
Returns the value of attribute autodiscover_request_body.
-
#autodiscover_responses ⇒ Object
Returns the value of attribute autodiscover_responses.
-
#ignored_actions ⇒ Object
Returns the value of attribute ignored_actions.
-
#include_mode ⇒ Object
Returns the value of attribute include_mode.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#mounted_path ⇒ Object
Returns the value of attribute mounted_path.
-
#rapidoc_configuration ⇒ Object
Returns the value of attribute rapidoc_configuration.
-
#rapidoc_logo_url ⇒ Object
Returns the value of attribute rapidoc_logo_url.
-
#rapidoc_theme ⇒ Object
Returns the value of attribute rapidoc_theme.
-
#route_extractor ⇒ Object
Returns the value of attribute route_extractor.
-
#source_oas_path ⇒ Object
Returns the value of attribute source_oas_path.
Instance Method Summary collapse
- #default_mounted_path ⇒ Object
- #excluded_columns_incoming ⇒ Object
- #excluded_columns_outgoing ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/oas_rails/configuration.rb', line 6 def initialize super @mounted_path = default_mounted_path @route_extractor = Extractors::RouteExtractor @include_mode = :all @autodiscover_request_body = true @autodiscover_responses = true @ignored_actions = [] @layout = nil @rapidoc_theme = :rails @rapidoc_configuration = {} @rapidoc_logo_url = nil @source_oas_path = nil # TODO: implement # autodiscover_request_body # autodiscover_responses end |
Instance Attribute Details
#autodiscover_request_body ⇒ Object
Returns the value of attribute autodiscover_request_body.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def autodiscover_request_body @autodiscover_request_body end |
#autodiscover_responses ⇒ Object
Returns the value of attribute autodiscover_responses.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def autodiscover_responses @autodiscover_responses end |
#ignored_actions ⇒ Object
Returns the value of attribute ignored_actions.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def ignored_actions @ignored_actions end |
#include_mode ⇒ Object
Returns the value of attribute include_mode.
4 5 6 |
# File 'lib/oas_rails/configuration.rb', line 4 def include_mode @include_mode end |
#layout ⇒ Object
Returns the value of attribute layout.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def layout @layout end |
#mounted_path ⇒ Object
Returns the value of attribute mounted_path.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def mounted_path @mounted_path end |
#rapidoc_configuration ⇒ Object
Returns the value of attribute rapidoc_configuration.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def rapidoc_configuration @rapidoc_configuration end |
#rapidoc_logo_url ⇒ Object
Returns the value of attribute rapidoc_logo_url.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def rapidoc_logo_url @rapidoc_logo_url end |
#rapidoc_theme ⇒ Object
Returns the value of attribute rapidoc_theme.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def rapidoc_theme @rapidoc_theme end |
#route_extractor ⇒ Object
Returns the value of attribute route_extractor.
4 5 6 |
# File 'lib/oas_rails/configuration.rb', line 4 def route_extractor @route_extractor end |
#source_oas_path ⇒ Object
Returns the value of attribute source_oas_path.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def source_oas_path @source_oas_path end |
Instance Method Details
#default_mounted_path ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oas_rails/configuration.rb', line 53 def default_mounted_path mount_route = Rails.application.routes.routes.detect do |r| r.app.respond_to?(:app) && r.app.app == OasRails::Engine end if mount_route mount_route.path.spec.to_s.sub(/\(\.:format\)\z/, '') else '/docs' end end |
#excluded_columns_incoming ⇒ Object
25 26 27 |
# File 'lib/oas_rails/configuration.rb', line 25 def excluded_columns_incoming %i[id created_at updated_at deleted_at] end |
#excluded_columns_outgoing ⇒ Object
29 30 31 |
# File 'lib/oas_rails/configuration.rb', line 29 def excluded_columns_outgoing [] end |