Class: Swagger::Blocks::PathNode
Overview
Constant Summary collapse
- OPERATION_TYPES =
[:get, :put, :post, :delete, :options, :head, :patch].freeze
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#operation(op, &block) ⇒ Object
TODO support ^x- Vendor Extensions.
Methods inherited from Node
#as_json, call, #data, #is_swagger_1_2?, #is_swagger_2_0?, #key
Instance Method Details
#operation(op, &block) ⇒ Object
TODO support ^x- Vendor Extensions
478 479 480 481 482 |
# File 'lib/swagger/blocks.rb', line 478 def operation(op, &block) op = op.to_sym raise ArgumentError.new("#{name} not in #{OPERATION_TYPES}") if !OPERATION_TYPES.include?(op) self.data[op] = Swagger::Blocks::OperationNode.call(version: version, &block) end |