Class: Swagger::Blocks::ResponseNode
- Inherits:
-
Node
- Object
- Node
- Swagger::Blocks::ResponseNode
show all
- Defined in:
- lib/swagger/blocks.rb
Overview
Instance Attribute Summary
Attributes inherited from Node
#name, #version
Instance Method Summary
collapse
Methods inherited from Node
#as_json, call, #data, #is_swagger_1_2?, #is_swagger_2_0?, #key
Instance Method Details
#example(exam, &block) ⇒ Object
606
607
608
609
610
|
# File 'lib/swagger/blocks.rb', line 606
def example(exam, &block)
self.data[:examples] ||= {}
self.data[:examples][exam] = Swagger::Blocks::ExampleNode.call(version: version, &block)
end
|
600
601
602
603
604
|
# File 'lib/swagger/blocks.rb', line 600
def (head, &block)
self.data[:headers] ||= {}
self.data[:headers][head] = Swagger::Blocks::.call(version: version, &block)
end
|
#schema(&block) ⇒ Object
596
597
598
|
# File 'lib/swagger/blocks.rb', line 596
def schema(&block)
self.data[:schema] = Swagger::Blocks::SchemaNode.call(version: version, &block)
end
|