Class: SwaggerYard::Configuration
- Inherits:
-
Object
- Object
- SwaggerYard::Configuration
- Defined in:
- lib/swagger_yard/configuration.rb
Instance Attribute Summary collapse
-
#api_base_path ⇒ Object
Returns the value of attribute api_base_path.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#controller_path ⇒ Object
Returns the value of attribute controller_path.
-
#description ⇒ Object
Returns the value of attribute description.
-
#include_private ⇒ Object
Returns the value of attribute include_private.
-
#model_path ⇒ Object
Returns the value of attribute model_path.
-
#path_discovery_function ⇒ Object
Returns the value of attribute path_discovery_function.
-
#security_definitions ⇒ Object
(also: #security_schemes)
Returns the value of attribute security_definitions.
-
#swagger_version ⇒ Object
(also: #openapi_version)
Returns the value of attribute swagger_version.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #external_schema(mappings = nil) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #register_dsl_method(meth, options = {}) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 |
# File 'lib/swagger_yard/configuration.rb', line 17 def initialize @swagger_version = "2.0" @api_version = "0.1" @title = "Configure title with SwaggerYard.config.title" @description = "Configure description with SwaggerYard.config.description" @security_definitions = {} @external_schema = {} @include_private = true end |
Instance Attribute Details
#api_base_path ⇒ Object
Returns the value of attribute api_base_path.
3 4 5 |
# File 'lib/swagger_yard/configuration.rb', line 3 def api_base_path @api_base_path end |
#api_version ⇒ Object
Returns the value of attribute api_version.
3 4 5 |
# File 'lib/swagger_yard/configuration.rb', line 3 def api_version @api_version end |
#controller_path ⇒ Object
Returns the value of attribute controller_path.
6 7 8 |
# File 'lib/swagger_yard/configuration.rb', line 6 def controller_path @controller_path end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/swagger_yard/configuration.rb', line 5 def description @description end |
#include_private ⇒ Object
Returns the value of attribute include_private.
9 10 11 |
# File 'lib/swagger_yard/configuration.rb', line 9 def include_private @include_private end |
#model_path ⇒ Object
Returns the value of attribute model_path.
6 7 8 |
# File 'lib/swagger_yard/configuration.rb', line 6 def model_path @model_path end |
#path_discovery_function ⇒ Object
Returns the value of attribute path_discovery_function.
7 8 9 |
# File 'lib/swagger_yard/configuration.rb', line 7 def path_discovery_function @path_discovery_function end |
#security_definitions ⇒ Object Also known as: security_schemes
Returns the value of attribute security_definitions.
8 9 10 |
# File 'lib/swagger_yard/configuration.rb', line 8 def security_definitions @security_definitions end |
#swagger_version ⇒ Object Also known as: openapi_version
Returns the value of attribute swagger_version.
4 5 6 |
# File 'lib/swagger_yard/configuration.rb', line 4 def swagger_version @swagger_version end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/swagger_yard/configuration.rb', line 5 def title @title end |
Instance Method Details
#external_schema(mappings = nil) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/swagger_yard/configuration.rb', line 27 def external_schema(mappings = nil) mappings.each do |prefix, url| @external_schema[prefix.to_s] = url end if mappings @external_schema end |
#register_dsl_method(meth, options = {}) ⇒ Object
34 35 36 |
# File 'lib/swagger_yard/configuration.rb', line 34 def register_dsl_method(meth, = {}) SwaggerYard::Handlers::DSLHandler.register_dsl_method(meth, ) end |