Class: SwaggerDocsGenerator::Actions::Header

Inherits:
Parameter
  • Object
show all
Defined in:
lib/swagger_docs_generator/parser/actions/parameters/header.rb

Overview

Write parameter type :header

Constant Summary collapse

FIELDS =
%w[description format default enum].freeze

Instance Method Summary collapse

Methods inherited from Parameter

#initialize

Constructor Details

This class inherits a constructor from SwaggerDocsGenerator::Actions::Parameter

Instance Method Details

#to_hashObject



12
13
14
15
16
17
18
19
# File 'lib/swagger_docs_generator/parser/actions/parameters/header.rb', line 12

def to_hash
  {
    in:               :header,
    name:             @name,
    required:         @required.nil? ? true : @required,
    type:             @type
  }.merge(no_mandatory_field)
end