Class: LambdaOpenApi::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/lambda_open_api/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Response

Returns a new instance of Response.



5
6
7
# File 'lib/lambda_open_api/response.rb', line 5

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/lambda_open_api/response.rb', line 3

def data
  @data
end

Instance Method Details

#jsonObject



9
10
11
12
13
14
15
# File 'lib/lambda_open_api/response.rb', line 9

def json
  {
    "examples": {
      "application/json": @data
    }
  }
end