Class: OpenApiAnnotator::SpecBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/open_api_annotator/spec_builder.rb

Instance Method Summary collapse

Instance Method Details

#build(info:) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/open_api_annotator/spec_builder.rb', line 3

def build(info:)
  paths = PathsBuilder.new.build
  components = ComponentsBuilder.new.build

  OpenApi::Specification.new(
    openapi: "3.0.1",
    info: info,
    paths: paths,
    components: components,
  )
end