Class: Swagger::Api::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.



5
6
7
# File 'lib/swagger/api/paths.rb', line 5

def controllers
  @controllers
end

Instance Method Details

#createObject



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

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