Class: OdataDuty::OAS2::IndividualGetPath
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- OdataDuty::OAS2::IndividualGetPath
- Defined in:
- lib/odata_duty/oas2/individual_get_path.rb
Instance Method Summary collapse
Instance Method Details
#oas2_parameters ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/odata_duty/oas2/individual_get_path.rb', line 13 def oas2_parameters [ { 'name' => 'id', 'in' => 'path', 'required' => true, 'type' => entity_type.integer_property_ref? ? 'integer' : 'string' } ] end |
#oas2_responses ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/odata_duty/oas2/individual_get_path.rb', line 24 def oas2_responses { '200' => { 'description' => 'Individual Response', 'schema' => { '$ref' => "#/definitions/#{entity_type_name}" } }, 'default' => DEFAULT_ERROR_RESPONSE } end |
#to_oas2 ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/odata_duty/oas2/individual_get_path.rb', line 4 def to_oas2 { 'operationId' => "GetIndividual#{name}ById", 'produces' => ['application/json'], 'parameters' => oas2_parameters, 'responses' => oas2_responses } end |