Class: LambdaOpenApi::PathParameter
- Inherits:
-
Object
- Object
- LambdaOpenApi::PathParameter
- Defined in:
- lib/lambda_open_api/path_parameter.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#in ⇒ Object
Returns the value of attribute in.
-
#name ⇒ Object
Returns the value of attribute name.
-
#required ⇒ Object
Returns the value of attribute required.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name: nil) ⇒ PathParameter
constructor
A new instance of PathParameter.
- #json ⇒ Object
Constructor Details
#initialize(name: nil) ⇒ PathParameter
Returns a new instance of PathParameter.
5 6 7 |
# File 'lib/lambda_open_api/path_parameter.rb', line 5 def initialize(name: nil) @name = name end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/lambda_open_api/path_parameter.rb', line 3 def description @description end |
#in ⇒ Object
Returns the value of attribute in.
3 4 5 |
# File 'lib/lambda_open_api/path_parameter.rb', line 3 def in @in end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/lambda_open_api/path_parameter.rb', line 3 def name @name end |
#required ⇒ Object
Returns the value of attribute required.
3 4 5 |
# File 'lib/lambda_open_api/path_parameter.rb', line 3 def required @required end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/lambda_open_api/path_parameter.rb', line 3 def type @type end |
Instance Method Details
#json ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/lambda_open_api/path_parameter.rb', line 9 def json { "name"=> @name || "id", "in"=> @in || "path", "description"=> @description || "", "required"=> @required || true, "type"=> @type || "integer" } end |