Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/ci/runner.rb')
-rw-r--r--lib/api/entities/ci/runner.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/api/entities/ci/runner.rb b/lib/api/entities/ci/runner.rb
index f034eb5c94c..9361709b6ed 100644
--- a/lib/api/entities/ci/runner.rb
+++ b/lib/api/entities/ci/runner.rb
@@ -4,20 +4,22 @@ module API
module Entities
module Ci
class Runner < Grape::Entity
- expose :id
- expose :description
- expose :ip_address
- expose :active # TODO Remove in v5 in favor of `paused` for REST calls, see https://gitlab.com/gitlab-org/gitlab/-/issues/375709
- expose :paused do |runner|
+ expose :id, documentation: { type: 'integer', example: 8 }
+ expose :description, documentation: { type: 'string', example: 'test-1-20150125' }
+ expose :ip_address, documentation: { type: 'string', example: '127.0.0.1' }
+ # TODO Remove in v5 in favor of `paused` for REST calls, see https://gitlab.com/gitlab-org/gitlab/-/issues/375709
+ expose :active, documentation: { type: 'boolean', example: true }
+ expose :paused, documentation: { type: 'boolean', example: false } do |runner|
!runner.active
end
- expose :instance_type?, as: :is_shared
- expose :runner_type
- expose :name
- expose :online?, as: :online
+ expose :instance_type?, as: :is_shared, documentation: { type: 'boolean', example: true }
+ expose :runner_type,
+ documentation: { type: 'string', values: ::Ci::Runner.runner_types.keys, example: 'instance_type' }
+ expose :name, documentation: { type: 'string', example: 'test' }
+ expose :online?, as: :online, documentation: { type: 'boolean', example: true }
# DEPRECATED
# TODO Remove in v5 in favor of `status` for REST calls, see https://gitlab.com/gitlab-org/gitlab/-/issues/375709
- expose :deprecated_rest_status, as: :status
+ expose :deprecated_rest_status, as: :status, documentation: { type: 'string', example: 'online' }
end
end
end