summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-04-20 12:24:42 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-04-20 12:24:42 -0500
commita45924348fca7eff4e26b3d9e47117b9fb3669ec (patch)
tree17531b97fd4a26e4f530dc5d35c2962fc0ed4f06 /lib/api/entities.rb
parentb41ddf9c6977e311b5085de8467ab450aa81b71b (diff)
parent832cdd3d516698d0e6a7257b3d94292819a0436a (diff)
downloadgitlab-ce-a45924348fca7eff4e26b3d9e47117b9fb3669ec.tar.gz
Merge remote-tracking branch 'origin/master' into issue_14904
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 60b9f5e0ece..716ca6f7ed9 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -439,5 +439,17 @@ module API
class Variable < Grape::Entity
expose :key, :value
end
+
+ class RepoLicense < Grape::Entity
+ expose :key, :name, :nickname
+ expose :featured, as: :popular
+ expose :url, as: :html_url
+ expose(:source_url) { |license| license.meta['source'] }
+ expose(:description) { |license| license.meta['description'] }
+ expose(:conditions) { |license| license.meta['conditions'] }
+ expose(:permissions) { |license| license.meta['permissions'] }
+ expose(:limitations) { |license| license.meta['limitations'] }
+ expose :content
+ end
end
end