Class: GrapeOAS::Exporter::Base::Paths

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_oas/exporter/base/paths.rb

Overview

Base class for Paths exporters Contains common logic shared between OAS2 and OAS3

Direct Known Subclasses

OAS2::Paths, OAS3::Paths

Instance Method Summary collapse

Constructor Details

#initialize(source, ref_tracker = nil, **options) ⇒ Paths

Returns a new instance of Paths.



9
10
11
12
13
# File 'lib/grape_oas/exporter/base/paths.rb', line 9

def initialize(source, ref_tracker = nil, **options)
  @source = source
  @ref_tracker = ref_tracker
  @options = options
end

Instance Method Details

#buildObject



15
16
17
18
19
20
21
# File 'lib/grape_oas/exporter/base/paths.rb', line 15

def build
  if api?(@source)
    build_paths(@source)
  else
    build_path_item(@source)
  end
end