diff options
Diffstat (limited to 'lib/api/entities/npm_package.rb')
-rw-r--r-- | lib/api/entities/npm_package.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/api/entities/npm_package.rb b/lib/api/entities/npm_package.rb index b094f3acdb6..ad864f86fd5 100644 --- a/lib/api/entities/npm_package.rb +++ b/lib/api/entities/npm_package.rb @@ -3,9 +3,19 @@ module API module Entities class NpmPackage < Grape::Entity - expose :name - expose :versions - expose :dist_tags, as: 'dist-tags' + 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 |