Sha256: b3314633308aeeda0471ad9a2df0d8027c4db056724b40f9305257c1296990db

Contents?: true

Size: 605 Bytes

Versions: 8

Compression:

Stored size: 605 Bytes

Contents

# frozen_string_literal: true

# :reek:InstanceVariableAssumption
# :reek:NilCheck

module SwaggerDocsGenerator
  module Actions
    # Write parameter type :header
    class Header < Parameter
      def to_hash
        {
          in:               :header,
          name:             @name.nil? ? 'header' : @name,
          description:      @description.nil? ? '' : @description,
          required:         @required.nil? ? true : @required,
          type:             @type.nil? ? '' : @type
        }
      end

      private

      def type(text)
        @type = text
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
swagger_docs_generator-0.3.4.pre.26 lib/swagger_docs_generator/parser/actions/parameters/header.rb
swagger_docs_generator-0.3.4 lib/swagger_docs_generator/parser/actions/parameters/header.rb
swagger_docs_generator-0.3.4.pre.23 lib/swagger_docs_generator/parser/actions/parameters/header.rb
swagger_docs_generator-0.3.3 lib/swagger_docs_generator/parser/actions/parameters/header.rb
swagger_docs_generator-0.3.2 lib/swagger_docs_generator/parser/actions/parameters/header.rb
swagger_docs_generator-0.3.1 lib/swagger_docs_generator/parser/actions/parameters/header.rb
swagger_docs_generator-0.3.0.pre.19 lib/swagger_docs_generator/parser/actions/parameters/header.rb
swagger_docs_generator-0.3.0.pre.18 lib/swagger_docs_generator/parser/actions/parameters/header.rb