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

18 lines
486 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module API
module Entities
2022-11-25 23:54:43 +05:30
# Serializes a Gitlab::Git::DeclaredLicense
2020-03-13 15:44:24 +05:30
class LicenseBasic < Grape::Entity
expose :key, :name, :nickname
expose :url, as: :html_url
2022-11-25 23:54:43 +05:30
# This was dropped:
# https://github.com/github/choosealicense.com/commit/325806b42aa3d5b78e84120327ec877bc936dbdd#diff-66df8f1997786f7052d29010f2cbb4c66391d60d24ca624c356acc0ab986f139
expose :source_url do |_|
nil
end
2020-03-13 15:44:24 +05:30
end
end
end