debian-mirror-gitlab/app/serializers/project_entity.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
561 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
class ProjectEntity < Grape::Entity
include RequestAwareEntity
2018-03-17 18:26:18 +05:30
2023-01-13 00:05:48 +05:30
expose :id, documentation: { type: 'integer', example: 1 }
expose :name, documentation: { type: 'string', example: 'GitLab' }
2017-08-17 22:00:37 +05:30
2023-01-13 00:05:48 +05:30
expose :full_path, documentation: { type: 'string', example: 'gitlab-org/gitlab' } do |project|
2017-09-10 17:25:29 +05:30
project_path(project)
2017-08-17 22:00:37 +05:30
end
2023-01-13 00:05:48 +05:30
expose :full_name, documentation: { type: 'string', example: 'GitLab Org / GitLab' } do |project|
2017-08-17 22:00:37 +05:30
project.full_name
end
2023-03-04 22:38:38 +05:30
expose :refs_url do |project|
refs_project_path(project)
end
2017-08-17 22:00:37 +05:30
end