Class: Swaggard::Swagger::Parameters::List
- Defined in:
- lib/swaggard/swagger/parameters/list.rb
Instance Attribute Summary
Attributes inherited from Base
#description, #is_required, #name
Instance Method Summary collapse
-
#initialize(string) ⇒ List
constructor
A new instance of List.
- #to_doc ⇒ Object
Constructor Details
#initialize(string) ⇒ List
Returns a new instance of List.
7 8 9 10 |
# File 'lib/swaggard/swagger/parameters/list.rb', line 7 def initialize(string) @in = 'query' parse(string) end |
Instance Method Details
#to_doc ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/swaggard/swagger/parameters/list.rb', line 12 def to_doc doc = super doc.merge( { 'type' => 'array', 'items' => { 'type' => @data_type }, 'enum' => @list_values } ) end |