Welcome to mirror list, hosted at ThFree Co, Russian Federation.

search_result.rb « nuget « entities « api « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bb3698de30b6cbc69c93513ac43cfa0fc6ae7be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module API
  module Entities
    module Nuget
      class SearchResult < Grape::Entity
        expose :type, as: :@type, documentation: { type: 'string', example: 'Package' }
        expose :authors, documentation: { type: 'string', example: 'Author' }
        expose :name, as: :id, documentation: { type: 'string', example: 'MyNuGetPkg' }
        expose :name, as: :title, documentation: { type: 'string', example: 'MyNuGetPkg' }
        expose :summary, documentation: { type: 'string', example: 'Summary' }
        expose :total_downloads, as: :totalDownloads, documentation: { type: 'integer', example: 1 }
        expose :verified, documentation: { type: 'boolean' }
        expose :version, documentation: { type: 'string', example: '1.3.0.17' }
        expose :versions, using: ::API::Entities::Nuget::SearchResultVersion
        expose :tags, documentation: { type: 'string', example: 'tag#1 tag#2' }
        expose :metadatum, using: ::API::Entities::Nuget::Metadatum, merge: true,
                           documentation: { is_array: true, type: 'API::Entities::Nuget::Metadatum' }
      end
    end
  end
end