Class: SwaggerApi::Paths

Inherits:
Object
  • Object
show all
Includes:
ActiveAttr::Model
Defined in:
lib/swagger_api/paths.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#controllersObject

Returns the value of attribute controllers.



6
7
8
# File 'lib/swagger_api/paths.rb', line 6

def controllers
  @controllers
end

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/swagger_api/paths.rb', line 8

def create
  return @paths unless @paths.nil?
  @paths = {}
  controllers.each do |controller|
    if controller.custom_path_file.nil?
      @paths.merge!(paths(controller))
    else
      @paths.merge!(custom_json(controller))
    end
  end
  @paths
end