Class: Swagger::Docs::ApiDeclarationFileMetadata

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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, options={})
  @api_version = api_version
  @path = path
  @base_path = base_path
  @controller_base_path = controller_base_path
  @swagger_version = options.fetch(:swagger_version, DEFAULT_SWAGGER_VERSION)
  @camelize_model_properties = options.fetch(:camelize_model_properties, true)
  @authorizations = options.fetch(:authorizations, {})
  @overridden_resource_path = options.fetch(:resource_path, DEFAULT_RESOURCE_PATH)
end

Instance Attribute Details

#api_versionObject (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

#authorizationsObject (readonly)

Returns the value of attribute authorizations.



8
9
10
# File 'lib/swagger/docs/api_declaration_file_metadata.rb', line 8

def authorizations
  @authorizations
end

#base_pathObject (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_propertiesObject (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_pathObject (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_pathObject (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

#pathObject (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_versionObject (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