class APIGatewayDSL::DSL::OperationNode

Public Class Methods

new(operation, &block) click to toggle source
# File lib/api_gateway_dsl/dsl/operation_node.rb, line 5
def initialize(operation, &block)
  @operation = operation
  instance_eval(&block) if block
end

Public Instance Methods

LAMBDA(lambda_arn, **options, &block) click to toggle source
# File lib/api_gateway_dsl/dsl/operation_node.rb, line 50
def LAMBDA(lambda_arn, **options, &block) # rubocop:disable Style/MethodName
  @operation.integrations << Integration::Lambda.new(@operation, lambda_arn, **options, &block)
end
MOCK(status_code, **options) click to toggle source
# File lib/api_gateway_dsl/dsl/operation_node.rb, line 54
def MOCK(status_code, **options) # rubocop:disable Style/MethodName
  @operation.integrations << Integration::Mock.new(@operation, status_code, **options)
end
RESPONSE(status_code, regexp = nil, &block) click to toggle source

Responses

# File lib/api_gateway_dsl/dsl/operation_node.rb, line 60
def RESPONSE(status_code, regexp = nil, &block) # rubocop:disable Style/MethodName
  @operation.responses << Response.new(@operation, status_code, regexp, &block)
end
description(value) click to toggle source
# File lib/api_gateway_dsl/dsl/operation_node.rb, line 16
def description(value)
  @operation.description = value
end
header(name, **options) click to toggle source
# File lib/api_gateway_dsl/dsl/operation_node.rb, line 30
def header(name, **options)
  @operation.parameters << Parameter::Header.new(name, **options)
end
path(name, **options) click to toggle source

Parameters

# File lib/api_gateway_dsl/dsl/operation_node.rb, line 22
def path(name, **options)
  @operation.parameters << Parameter::Path.new(name, **options)
end
query(name, **options) click to toggle source
# File lib/api_gateway_dsl/dsl/operation_node.rb, line 26
def query(name, **options)
  @operation.parameters << Parameter::Query.new(name, **options)
end
summary(value) click to toggle source

General

# File lib/api_gateway_dsl/dsl/operation_node.rb, line 12
def summary(value)
  @operation.summary = value
end