Class: Fictium::OpenApi::V3Exporter::PathFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/fictium/exporters/open_api/v3_exporter/path_formatter.rb

Instance Method Summary collapse

Instance Method Details

#add_path(paths, action) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fictium/exporters/open_api/v3_exporter/path_formatter.rb', line 5

def add_path(paths, action)
  return if action.method.blank?

  path_object = paths[action.full_path] || default_path_object
  path_object[action.method.to_sym] = create_operation(action)
  paths[action.full_path] = path_object
end