Sha256: ff27683d1f1d71dc92d4c624a84c89029d7010477ff6213101cfe9b45c1d8e26

Contents?: true

Size: 601 Bytes

Versions: 1

Compression:

Stored size: 601 Bytes

Contents

# :nodoc:
module RailsApiDoc::Controller::Response::Headers

  RESPONSE_HEADERS = {
    'Parameter' => {
      value: -> (row_name, row_values) { row_name },
      fill_type: :input,
      param: :name
    },
    'Value' => {
      value: -> (row_name, row_values) {
        title = row_values.attr.to_s
        title += '(NESTED)' if row_values.nested?
        title
      }
    },
    'Desc' => {
      value: -> (row_name, row_values) {
        'TODO: description' # if row_values[:desc]
      },
      fill_type: :input,
      param: :desc
    }
  }

  def headers
    RESPONSE_HEADERS
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_api_documentation-0.2.3 lib/rails_api_doc/controller/response/headers.rb