debian-mirror-gitlab/lib/api/entities/npm_package.rb
2023-03-05 14:24:40 +05:30

21 lines
648 B
Ruby

# frozen_string_literal: true
module API
module Entities
class NpmPackage < Grape::Entity
expose :name, documentation: { type: 'string', example: 'my_package' }
expose :versions,
documentation: {
type: 'object',
example: '{
"1.0.0": {
"name": "my_package",
"version": "1.0.0",
"dist": { "shasum": "12345", "tarball": "https://..." }
}
}'
}
expose :dist_tags, as: 'dist-tags', documentation: { type: 'object', example: '{ "latest":"1.0.1" }' }
end
end
end