debian-mirror-gitlab/lib/api/entities/npm_package.rb

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

22 lines
648 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module API
module Entities
class NpmPackage < Grape::Entity
2023-03-04 22:38:38 +05:30
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" }' }
2020-07-28 23:09:34 +05:30
end
end
end