fix: Update api-docs.yml

Add login_password and ssh for AccessKey
This commit is contained in:
Jonathan 2023-08-18 11:42:42 +08:00 committed by Jonathan Gao
parent b5a99eba7f
commit 7c34f2cdcd
2 changed files with 93 additions and 2 deletions

View File

@ -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"))

View File

@ -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
@ -1011,6 +1077,7 @@ paths:
minimum: 2
role:
type: string
enum: [owner,manager,task_runner,guest]
example: owner
responses:
204:
@ -1036,6 +1103,7 @@ paths:
properties:
role:
type: string
enum: [owner,manager,task_runner,guest]
example: owner
summary: Update user role
responses:
@ -1168,6 +1236,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
@ -1340,12 +1423,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:
@ -1354,7 +1444,7 @@ paths:
201:
description: template created
schema:
$ref: "#/definitions/Template"
$ref: "#/definitions/TemplateRequest"
/project/{project_id}/templates/{template_id}:
parameters:
- $ref: "#/parameters/project_id"