summaryrefslogtreecommitdiff
path: root/lib/api/entities/license_basic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/license_basic.rb')
-rw-r--r--lib/api/entities/license_basic.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/api/entities/license_basic.rb b/lib/api/entities/license_basic.rb
new file mode 100644
index 00000000000..08af68785a9
--- /dev/null
+++ b/lib/api/entities/license_basic.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class LicenseBasic < Grape::Entity
+ expose :key, :name, :nickname
+ expose :url, as: :html_url
+ expose(:source_url) { |license| license.meta['source'] }
+ end
+ end
+end