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/applications.rb')
-rw-r--r--lib/api/applications.rb21
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/api/applications.rb b/lib/api/applications.rb
index 4048215160f..6fc9408a570 100644
--- a/lib/api/applications.rb
+++ b/lib/api/applications.rb
@@ -10,17 +10,21 @@ module API
resource :applications do
desc 'Create a new application' do
detail 'This feature was introduced in GitLab 10.5'
- success Entities::ApplicationWithSecret
+ success code: 200, model: Entities::ApplicationWithSecret
end
params do
- requires :name, type: String, desc: 'Application name'
- requires :redirect_uri, type: String, desc: 'Application redirect URI'
- requires :scopes, type: String, desc: 'Application scopes', allow_blank: false
+ requires :name, type: String, desc: 'Name of the application.', documentation: { example: 'MyApplication' }
+ requires :redirect_uri, type: String, desc: 'Redirect URI of the application.', documentation: { example: 'https://redirect.uri' }
+ requires :scopes, type: String,
+ desc: 'Scopes of the application. You can specify multiple scopes by separating\
+ each scope using a space',
+ allow_blank: false
optional :confidential,
type: Boolean,
default: true,
- desc: 'Application will be used where the client secret is confidential'
+ desc: 'The application is used where the client secret can be kept confidential. Native mobile apps \
+ and Single Page Apps are considered non-confidential. Defaults to true if not supplied'
end
post do
application = Doorkeeper::Application.new(declared_params)
@@ -33,14 +37,19 @@ module API
end
desc 'Get applications' do
+ detail 'List all registered applications'
success Entities::Application
+ is_array true
end
get do
applications = ApplicationsFinder.new.execute
present applications, with: Entities::Application
end
- desc 'Delete an application'
+ desc 'Delete an application' do
+ detail 'Delete a specific application'
+ success code: 204
+ end
params do
requires :id, type: Integer, desc: 'The ID of the application (not the application_id)'
end