diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 2adb9265f..37983fd86 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -3232,6 +3232,8 @@ paths: responses: '201': description: Project member created successfully. + schema: + $ref: '#/definitions/RobotAccountPostRep' '400': description: Project id is not valid. '401': @@ -4774,6 +4776,15 @@ definitions: description: The permission of robot account items: $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: type: object properties: diff --git a/src/common/models/robot.go b/src/common/models/robot.go index 52a7c2975..df23631b8 100644 --- a/src/common/models/robot.go +++ b/src/common/models/robot.go @@ -59,8 +59,8 @@ func (rq *RobotReq) Valid(v *validation.Validation) { // RobotRep ... type RobotRep struct { - Name string - Token string + Name string `json:"name"` + Token string `json:"token"` } // TableName ...