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/deploy_key.rb')
-rw-r--r--lib/api/entities/deploy_key.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/api/entities/deploy_key.rb b/lib/api/entities/deploy_key.rb
index 2c9c33549a1..1bcd06f2c88 100644
--- a/lib/api/entities/deploy_key.rb
+++ b/lib/api/entities/deploy_key.rb
@@ -3,9 +3,15 @@
module API
module Entities
class DeployKey < Entities::SSHKey
- expose :key
- expose :fingerprint, if: ->(key, _) { key.fingerprint.present? }
- expose :fingerprint_sha256
+ expose :key,
+ documentation: { type: 'string', example: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNJAkI3Wdf0r13c8a5pEExB2YowPWCSVzfZV22pNBc1CuEbyYLHpUyaD0GwpGvFdx2aP7lMEk35k6Rz3ccBF6jRaVJyhsn5VNnW92PMpBJ/P1UebhXwsFHdQf5rTt082cSxWuk61kGWRQtk4ozt/J2DF/dIUVaLvc+z4HomT41fQ==' }
+
+ expose :fingerprint,
+ documentation: { type: 'string', example: '4a:9d:64:15:ed:3a:e6:07:6e:89:36:b3:3b:03:05:d9' },
+ if: ->(key, _) { key.fingerprint.present? }
+
+ expose :fingerprint_sha256,
+ documentation: { type: 'string', example: 'SHA256:Jrs3LD1Ji30xNLtTVf9NDCj7kkBgPBb2pjvTZ3HfIgU' }
expose :projects_with_write_access, using: Entities::ProjectIdentity, if: -> (_, options) { options[:include_projects_with_write_access] }
end