Class: OdataDuty::OAS2::IndividualDeletePath
- Inherits:
-
Object
- Object
- OdataDuty::OAS2::IndividualDeletePath
- Defined in:
- lib/odata_duty/oas2/individual_delete_path.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entity_set) ⇒ IndividualDeletePath
constructor
A new instance of IndividualDeletePath.
- #operation_id ⇒ Object
- #parameters ⇒ Object
- #responses ⇒ Object
Constructor Details
#initialize(entity_set) ⇒ IndividualDeletePath
Returns a new instance of IndividualDeletePath.
13 14 15 |
# File 'lib/odata_duty/oas2/individual_delete_path.rb', line 13 def initialize(entity_set) @entity_set = entity_set end |
Class Method Details
.to_oas2(entity_set) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/odata_duty/oas2/individual_delete_path.rb', line 4 def self.to_oas2(entity_set) path_info = new(entity_set) { 'operationId' => path_info.operation_id, 'parameters' => path_info.parameters, 'responses' => path_info.responses } end |
Instance Method Details
#operation_id ⇒ Object
17 18 19 |
# File 'lib/odata_duty/oas2/individual_delete_path.rb', line 17 def operation_id "Delete#{@entity_set.name}" end |
#parameters ⇒ Object
21 22 23 24 25 |
# File 'lib/odata_duty/oas2/individual_delete_path.rb', line 21 def parameters [ { 'name' => 'id', 'in' => 'path', 'required' => true, 'type' => id_type } ] end |
#responses ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/odata_duty/oas2/individual_delete_path.rb', line 27 def responses { '204' => { 'description' => 'No Content' }, 'default' => { 'description' => 'Unexpected error', 'schema' => { '$ref' => '#/definitions/Error' } } } end |