Sha256: b89cd3b5e2a11afa4ef742de28655a25119daa2500d7e332937f2d74f2a8797a

Contents?: true

Size: 516 Bytes

Versions: 2

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

module SwaggerDocsGenerator
  module Actions
    # # Test :response
    #
    # Complete description field for action
    class Response < Actions
      VALUE = :responses

      def initialize(data)
        super(VALUE)
        complete_hash(data)
      end

      private

      def complete_hash(data)
        default = { ok: { description: 'Request successfully processed.' } }
        raw = data.key?(key) ? data[key] : default
        hash[key] = raw
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
swagger_docs_generator-0.1.1 lib/swagger_docs_generator/parser/actions/response.rb
swagger_docs_generator-0.1.0 lib/swagger_docs_generator/parser/actions/response.rb