Class: OasRails::Configuration
- Inherits:
-
Object
- Object
- OasRails::Configuration
- Defined in:
- lib/oas_rails/configuration.rb
Instance Attribute Summary collapse
-
#api_path ⇒ Object
Returns the value of attribute api_path.
-
#authenticate_all_routes_by_default ⇒ Object
Returns the value of attribute authenticate_all_routes_by_default.
-
#autodiscover_request_body ⇒ Object
Returns the value of attribute autodiscover_request_body.
-
#autodiscover_responses ⇒ Object
Returns the value of attribute autodiscover_responses.
-
#default_tags_from ⇒ Object
Returns the value of attribute default_tags_from.
-
#ignored_actions ⇒ Object
Returns the value of attribute ignored_actions.
-
#info ⇒ Object
Returns the value of attribute info.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#possible_default_responses ⇒ Object
Returns the value of attribute possible_default_responses.
-
#response_body_of_default ⇒ Object
Returns the value of attribute response_body_of_default.
-
#security_schema ⇒ Object
Returns the value of attribute security_schema.
-
#security_schemas ⇒ Object
Returns the value of attribute security_schemas.
-
#servers ⇒ Object
Returns the value of attribute servers.
-
#set_default_responses ⇒ Object
Returns the value of attribute set_default_responses.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
- #default_servers ⇒ 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.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/oas_rails/configuration.rb', line 17 def initialize @info = Spec::Info.new @layout = false @servers = default_servers @tags = [] @swagger_version = '3.1.0' @default_tags_from = :namespace @autodiscover_request_body = true @autodiscover_responses = true @api_path = "/" @ignored_actions = [] @authenticate_all_routes_by_default = true @security_schema = nil @security_schemas = {} @set_default_responses = true @possible_default_responses = [:not_found, :unauthorized, :forbidden] @response_body_of_default = "Hash{ success: !Boolean, message: String }" end |
Instance Attribute Details
#api_path ⇒ Object
Returns the value of attribute api_path.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def api_path @api_path end |
#authenticate_all_routes_by_default ⇒ Object
Returns the value of attribute authenticate_all_routes_by_default.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def authenticate_all_routes_by_default @authenticate_all_routes_by_default end |
#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 |
#default_tags_from ⇒ Object
Returns the value of attribute default_tags_from.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def @default_tags_from 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 |
#info ⇒ Object
Returns the value of attribute info.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def info @info end |
#layout ⇒ Object
Returns the value of attribute layout.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def layout @layout end |
#possible_default_responses ⇒ Object
Returns the value of attribute possible_default_responses.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def possible_default_responses @possible_default_responses end |
#response_body_of_default ⇒ Object
Returns the value of attribute response_body_of_default.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def response_body_of_default @response_body_of_default end |
#security_schema ⇒ Object
Returns the value of attribute security_schema.
15 16 17 |
# File 'lib/oas_rails/configuration.rb', line 15 def security_schema @security_schema end |
#security_schemas ⇒ Object
Returns the value of attribute security_schemas.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def security_schemas @security_schemas end |
#servers ⇒ Object
Returns the value of attribute servers.
15 16 17 |
# File 'lib/oas_rails/configuration.rb', line 15 def servers @servers end |
#set_default_responses ⇒ Object
Returns the value of attribute set_default_responses.
3 4 5 |
# File 'lib/oas_rails/configuration.rb', line 3 def set_default_responses @set_default_responses end |
#tags ⇒ Object
Returns the value of attribute tags.
15 16 17 |
# File 'lib/oas_rails/configuration.rb', line 15 def @tags end |
Instance Method Details
#default_servers ⇒ Object
42 43 44 |
# File 'lib/oas_rails/configuration.rb', line 42 def default_servers [Spec::Server.new(url: "http://localhost:3000", description: "Rails Default Development Server")] end |
#excluded_columns_incoming ⇒ Object
54 55 56 |
# File 'lib/oas_rails/configuration.rb', line 54 def excluded_columns_incoming %i[id created_at updated_at deleted_at] end |
#excluded_columns_outgoing ⇒ Object
58 59 60 |
# File 'lib/oas_rails/configuration.rb', line 58 def excluded_columns_outgoing [] end |