Add post response for robot account API (#6906)

This commit is to do:
1, Add post response on creating robot account
2, Lower-case the attribute of response

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
Yan 2019-02-13 14:40:04 +08:00 committed by GitHub
parent 161f2127e2
commit e9556a4cec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -3232,6 +3232,8 @@ paths:
responses: responses:
'201': '201':
description: Project member created successfully. description: Project member created successfully.
schema:
$ref: '#/definitions/RobotAccountPostRep'
'400': '400':
description: Project id is not valid. description: Project id is not valid.
'401': '401':
@ -4774,6 +4776,15 @@ definitions:
description: The permission of robot account description: The permission of robot account
items: items:
$ref: '#/definitions/RobotAccountAccess' $ref: '#/definitions/RobotAccountAccess'
RobotAccountPostRep:
type: object
properties:
name:
type: string
description: the name of robot account
token:
type: string
description: the token of robot account
RobotAccountAccess: RobotAccountAccess:
type: object type: object
properties: properties:

View File

@ -59,8 +59,8 @@ func (rq *RobotReq) Valid(v *validation.Validation) {
// RobotRep ... // RobotRep ...
type RobotRep struct { type RobotRep struct {
Name string Name string `json:"name"`
Token string Token string `json:"token"`
} }
// TableName ... // TableName ...