Class: LambdaOpenApi::BodyParameter
- Inherits:
-
Object
- Object
- LambdaOpenApi::BodyParameter
- Defined in:
- lib/lambda_open_api/body_parameter.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data = nil) ⇒ BodyParameter
constructor
A new instance of BodyParameter.
- #json ⇒ Object
Constructor Details
#initialize(data = nil) ⇒ BodyParameter
Returns a new instance of BodyParameter.
7 8 9 |
# File 'lib/lambda_open_api/body_parameter.rb', line 7 def initialize(data = nil) @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/lambda_open_api/body_parameter.rb', line 5 def data @data end |
Instance Method Details
#json ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lambda_open_api/body_parameter.rb', line 11 def json hash = LambdaOpenApi::BodyProperty.new hash.generate(@data) { "name"=> "body", "in"=> "body", "description"=> "", "required"=> false, "schema"=> { "description"=> "", "type"=> "object", "properties"=> hash.props, "required"=> [] } } end |