Class: Swaggable::EndpointDefinition
- Inherits:
-
Object
- Object
- Swaggable::EndpointDefinition
- Includes:
- DefinitionBase
- Defined in:
- lib/swaggable/endpoint_definition.rb
Instance Method Summary collapse
- #configure(&block) ⇒ Object
- #consumes ⇒ Object
- #parameters ⇒ Object
- #produces ⇒ Object
- #responses ⇒ Object
- #tags ⇒ Object
Methods included from DefinitionBase
Instance Method Details
#configure(&block) ⇒ Object
44 45 46 47 |
# File 'lib/swaggable/endpoint_definition.rb', line 44 def configure &block ForwardingDsl.run(self, &block) self end |
#consumes ⇒ Object
36 37 38 |
# File 'lib/swaggable/endpoint_definition.rb', line 36 def consumes @consumes ||= Set.new end |
#parameters ⇒ Object
22 23 24 25 26 27 |
# File 'lib/swaggable/endpoint_definition.rb', line 22 def parameters @parameters ||= MiniObject::IndexedList.new.tap do |l| l.build { ParameterDefinition.new } l.key {|e| e.name } end end |
#produces ⇒ Object
40 41 42 |
# File 'lib/swaggable/endpoint_definition.rb', line 40 def produces @produces ||= Set.new end |
#responses ⇒ Object
29 30 31 32 33 34 |
# File 'lib/swaggable/endpoint_definition.rb', line 29 def responses @responses ||= MiniObject::IndexedList.new.tap do |l| l.build { ResponseDefinition.new } l.key {|e| e.status } end end |
#tags ⇒ Object
15 16 17 18 19 20 |
# File 'lib/swaggable/endpoint_definition.rb', line 15 def @tags ||= MiniObject::IndexedList.new.tap do |l| l.build { TagDefinition.new } l.key {|e| e.name } end end |