mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-25 14:25:45 +01:00
commit
464f73e20f
@ -81,6 +81,7 @@ func main() {
|
||||
h.Before("project > /api/project/{project_id}/keys/{key_id} > Removes access key > 204 > application/json", capabilityWrapper("access_key"))
|
||||
|
||||
h.Before("project > /api/project/{project_id}/repositories > Add repository > 204 > application/json", capabilityWrapper("access_key"))
|
||||
h.Before("project > /api/project/{project_id}/repositories/{repository_id} > Updates repository > 204 > application/json", capabilityWrapper("repository"))
|
||||
h.Before("project > /api/project/{project_id}/repositories/{repository_id} > Removes repository > 204 > application/json", capabilityWrapper("repository"))
|
||||
|
||||
h.Before("project > /api/project/{project_id}/inventory > create inventory > 201 > application/json", capabilityWrapper("inventory"))
|
||||
|
94
api-docs.yml
94
api-docs.yml
@ -186,6 +186,28 @@ definitions:
|
||||
type: integer
|
||||
minimum: 1
|
||||
x-example: 2
|
||||
login_password:
|
||||
type: object
|
||||
properties:
|
||||
password:
|
||||
type: string
|
||||
x-example: password
|
||||
example: password
|
||||
login:
|
||||
type: string
|
||||
x-example: username
|
||||
example: username
|
||||
ssh:
|
||||
type: object
|
||||
properties:
|
||||
login:
|
||||
type: string
|
||||
x-example: user
|
||||
example: user
|
||||
private_key:
|
||||
type: string
|
||||
x-example: private key
|
||||
example: private key
|
||||
|
||||
AccessKey:
|
||||
type: object
|
||||
@ -200,6 +222,28 @@ definitions:
|
||||
enum: [none,ssh,login_password]
|
||||
project_id:
|
||||
type: integer
|
||||
login_password:
|
||||
type: object
|
||||
properties:
|
||||
password:
|
||||
type: string
|
||||
x-example: password
|
||||
example: password
|
||||
login:
|
||||
type: string
|
||||
x-example: username
|
||||
example: username
|
||||
ssh:
|
||||
type: object
|
||||
properties:
|
||||
login:
|
||||
type: string
|
||||
x-example: user
|
||||
example: user
|
||||
private_key:
|
||||
type: string
|
||||
x-example: private key
|
||||
example: private key
|
||||
|
||||
EnvironmentRequest:
|
||||
type: object
|
||||
@ -383,6 +427,12 @@ definitions:
|
||||
limit:
|
||||
type: string
|
||||
example: ''
|
||||
suppress_success_alerts:
|
||||
type: boolean
|
||||
survey_vars:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/definitions/TemplateSurveyVar"
|
||||
Template:
|
||||
type: object
|
||||
properties:
|
||||
@ -418,6 +468,22 @@ definitions:
|
||||
allow_override_args_in_task:
|
||||
type: boolean
|
||||
example: false
|
||||
suppress_success_alerts:
|
||||
type: boolean
|
||||
TemplateSurveyVar:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
example: String => "", Integer => "int"
|
||||
required:
|
||||
type: boolean
|
||||
|
||||
ScheduleRequest:
|
||||
type: object
|
||||
@ -1016,6 +1082,7 @@ paths:
|
||||
minimum: 2
|
||||
role:
|
||||
type: string
|
||||
enum: [owner,manager,task_runner,guest]
|
||||
example: owner
|
||||
responses:
|
||||
204:
|
||||
@ -1041,6 +1108,7 @@ paths:
|
||||
properties:
|
||||
role:
|
||||
type: string
|
||||
enum: [owner,manager,task_runner,guest]
|
||||
example: owner
|
||||
summary: Update user role
|
||||
responses:
|
||||
@ -1173,6 +1241,21 @@ paths:
|
||||
parameters:
|
||||
- $ref: "#/parameters/project_id"
|
||||
- $ref: "#/parameters/repository_id"
|
||||
put:
|
||||
tags:
|
||||
- project
|
||||
summary: Updates repository
|
||||
parameters:
|
||||
- name: Repository
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/RepositoryRequest"
|
||||
responses:
|
||||
204:
|
||||
description: Repository updated
|
||||
400:
|
||||
description: Bad request
|
||||
delete:
|
||||
tags:
|
||||
- project
|
||||
@ -1345,12 +1428,19 @@ paths:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/definitions/Template"
|
||||
properties:
|
||||
survey_vars:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/definitions/TemplateSurveyVar"
|
||||
last_task:
|
||||
$ref: "#/definitions/Task"
|
||||
post:
|
||||
tags:
|
||||
- project
|
||||
summary: create template
|
||||
parameters:
|
||||
- name: template
|
||||
- name: templateyes
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
@ -1359,7 +1449,7 @@ paths:
|
||||
201:
|
||||
description: template created
|
||||
schema:
|
||||
$ref: "#/definitions/Template"
|
||||
$ref: "#/definitions/TemplateRequest"
|
||||
/project/{project_id}/templates/{template_id}:
|
||||
parameters:
|
||||
- $ref: "#/parameters/project_id"
|
||||
|
Loading…
Reference in New Issue
Block a user