debian-mirror-gitlab/lib/api/entities/nuget/search_result.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
1.1 KiB
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module API
module Entities
module Nuget
class SearchResult < Grape::Entity
2023-03-04 22:38:38 +05:30
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' }
2020-07-28 23:09:34 +05:30
expose :versions, using: ::API::Entities::Nuget::SearchResultVersion
2023-03-04 22:38:38 +05:30
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' }
2020-07-28 23:09:34 +05:30
end
end
end
end