Class: Apipie::Generator::Swagger::ParamDescription::In
- Inherits:
-
Object
- Object
- Apipie::Generator::Swagger::ParamDescription::In
- Defined in:
- lib/apipie/generator/swagger/param_description/in.rb
Constant Summary collapse
- IN_KEYWORD_DEFAULT_VALUES =
{ form_data: 'formData', query: 'query' }
Instance Method Summary collapse
-
#initialize(param_description, in_schema:, default_in_value:, http_method:) ⇒ In
constructor
A new instance of In.
- #to_hash ⇒ Hash
Constructor Details
#initialize(param_description, in_schema:, default_in_value:, http_method:) ⇒ In
Returns a new instance of In.
7 8 9 10 11 12 |
# File 'lib/apipie/generator/swagger/param_description/in.rb', line 7 def initialize(param_description, in_schema:, default_in_value:, http_method:) @param_description = param_description @in_schema = in_schema @default_in_value = default_in_value @http_method = http_method end |
Instance Method Details
#to_hash ⇒ Hash
15 16 17 18 19 20 |
# File 'lib/apipie/generator/swagger/param_description/in.rb', line 15 def to_hash # The "name" and "in" keys can only be set on root parameters (non-nested) return {} if @in_schema { in: in_value } end |