2020-02-14 10:09:08 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class Blob < Grape::Entity
|
|
|
|
expose :basename
|
|
|
|
expose :data
|
|
|
|
expose :path
|
|
|
|
# TODO: :filename was renamed to :path but both still return the full path,
|
|
|
|
# in the future we can only return the filename here without the leading
|
|
|
|
# directory path.
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/issues/34521
|
2021-09-15 05:09:47 -04:00
|
|
|
expose :path, as: :filename
|
2020-02-14 10:09:08 -05:00
|
|
|
expose :id
|
|
|
|
expose :ref
|
|
|
|
expose :startline
|
|
|
|
expose :project_id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|