Sha256: e7e3840f88ff64b75dad47f86c2f661701781c51dc11dbe69420871bde147414

Contents?: true

Size: 1.52 KB

Versions: 4

Compression:

Stored size: 1.52 KB

Contents

# frozen_string_literal: true

RSpec.shared_context "parameters" do |parameter_tags|
  if parameter_tags.include?(:Authorization)
    parameter name: :Authorization,
              description: "Client token",
              in: :header,
              type: :string,
              required: true
  end
  if parameter_tags.include?(:organization_id)
    parameter name: :'Organization-Id',
              description: "Organization ID текущей организации",
              in: :header,
              type: :string,
              required: true
  end
  if parameter_tags.include?(:id)
    parameter name: :id,
              description: "Идентификатор",
              in: :path,
              type: :string,
              required: true
  end
  if parameter_tags.include?(:base_for_index)
    parameter name: :search,
              description: "Строка для поиска ресурса (часть имени, как пример)",
              in: :query, type: :string, required: false
    parameter name: :limit,
              description: "Ограничение кол-ва записей на странице.(20)",
              in: :query, type: :integer, required: false
    parameter name: :sort,
              description: "Поле по которому производится сортировка.",
              in: :query, type: :integer, required: false
    parameter name: :page,
              description: "Номер страницы",
              in: :query, type: :integer, required: false
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
care-0.1.6 lib/care/support/parameters.rb
care-0.1.5 lib/care/support/parameters.rb
care-0.1.4 lib/care/support/parameters.rb
care-0.1.3 lib/care/support/parameters.rb