Class: Swagger::Docs::ApiDeclarationFileMetadata
- Inherits:
-
Object
- Object
- Swagger::Docs::ApiDeclarationFileMetadata
- Defined in:
- lib/swagger/docs/api_declaration_file_metadata.rb
Constant Summary collapse
- DEFAULT_SWAGGER_VERSION =
"1.2"
- DEFAULT_RESOURCE_PATH =
nil
Instance Attribute Summary collapse
-
#api_version ⇒ Object
readonly
Returns the value of attribute api_version.
-
#authorizations ⇒ Object
readonly
Returns the value of attribute authorizations.
-
#base_path ⇒ Object
readonly
Returns the value of attribute base_path.
-
#camelize_model_properties ⇒ Object
readonly
Returns the value of attribute camelize_model_properties.
-
#controller_base_path ⇒ Object
readonly
Returns the value of attribute controller_base_path.
-
#overridden_resource_path ⇒ Object
readonly
Returns the value of attribute overridden_resource_path.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#swagger_version ⇒ Object
readonly
Returns the value of attribute swagger_version.
Instance Method Summary collapse
-
#initialize(api_version, path, base_path, controller_base_path, options = {}) ⇒ ApiDeclarationFileMetadata
constructor
A new instance of ApiDeclarationFileMetadata.
Constructor Details
#initialize(api_version, path, base_path, controller_base_path, options = {}) ⇒ ApiDeclarationFileMetadata
Returns a new instance of ApiDeclarationFileMetadata.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 10 def initialize(api_version, path, base_path, controller_base_path, ={}) @api_version = api_version @path = path @base_path = base_path @controller_base_path = controller_base_path @swagger_version = .fetch(:swagger_version, DEFAULT_SWAGGER_VERSION) @camelize_model_properties = .fetch(:camelize_model_properties, true) @authorizations = .fetch(:authorizations, {}) @overridden_resource_path = .fetch(:resource_path, DEFAULT_RESOURCE_PATH) end |
Instance Attribute Details
#api_version ⇒ Object (readonly)
Returns the value of attribute api_version.
7 8 9 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 7 def api_version @api_version end |
#authorizations ⇒ Object (readonly)
Returns the value of attribute authorizations.
8 9 10 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 8 def @authorizations end |
#base_path ⇒ Object (readonly)
Returns the value of attribute base_path.
7 8 9 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 7 def base_path @base_path end |
#camelize_model_properties ⇒ Object (readonly)
Returns the value of attribute camelize_model_properties.
7 8 9 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 7 def camelize_model_properties @camelize_model_properties end |
#controller_base_path ⇒ Object (readonly)
Returns the value of attribute controller_base_path.
7 8 9 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 7 def controller_base_path @controller_base_path end |
#overridden_resource_path ⇒ Object (readonly)
Returns the value of attribute overridden_resource_path.
8 9 10 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 8 def overridden_resource_path @overridden_resource_path end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 7 def path @path end |
#swagger_version ⇒ Object (readonly)
Returns the value of attribute swagger_version.
7 8 9 |
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 7 def swagger_version @swagger_version end |