Class: Fakeit::Openapi::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/fakeit/openapi/specification.rb

Instance Method Summary collapse

Constructor Details

#initialize(doc) ⇒ Specification



4
5
6
# File 'lib/fakeit/openapi/specification.rb', line 4

def initialize(doc)
  @doc = doc
end

Instance Method Details

#operation(method, path, options) ⇒ Object



8
9
10
11
12
# File 'lib/fakeit/openapi/specification.rb', line 8

def operation(method, path, options)
  @doc
    .request_operation(method, path)
    &.then { |operation| Operation.new(operation, options) }
end