class Apicraft::Openapi::Contract

by this Contract class.
A single openapi yaml file is represented

def all

def all
  @store
end

def create!(document)

def create!(document)
  c = new(document)
  @store << c
  c
end

def find_by_operation(method, path)

def find_by_operation(method, path)
  found = nil
  all.each do |c|
    if c.operation(method, path).present?
      found = c
      break
    end
  end
  found
end

def initialize(document)

def initialize(document)
  @document = document
end

def operation(method, path)

def operation(method, path)
  # with_cache("operation-#{method.downcase}-#{path}") do
  op = document.request_operation(method.downcase, path)
  Operation.new(op) if op.present?
  # end
end