class Apicraft::Openapi::Operation

like GET /pets
Represents an OpenAPI operation.

def initialize(operation)

def initialize(operation)
  @operation = operation
  @operation_object = operation.operation_object
end

def raw_schema

def raw_schema
  @operation_object.raw_schema
end

def response_for(code)

def response_for(code)
  response = responses.response[code.to_s]
  return unless response.present?
  Response.new(
    response
  )
end

def responses

def responses
  @operation_object.responses
end

def summary

def summary
  @operation_object.summary
end

def validate_request_body(content_type, body)

def validate_request_body(content_type, body)
  operation.validate_request_body(
    content_type,
    body
  )
end