Update swagger.yml

This commit is contained in:
wemeya 2016-09-22 13:20:10 +08:00 committed by GitHub
parent 9bbdbfa520
commit a75165adc5

View File

@ -524,7 +524,7 @@ paths:
description: Only email, realname and comment can be modified. description: Only email, realname and comment can be modified.
required: true required: true
schema: schema:
$ref: '#/definitions/User' $ref: '#/definitions/UserProfile'
tags: tags:
- Products - Products
responses: responses:
@ -611,6 +611,12 @@ paths:
format: int format: int
required: true required: true
description: Registered user ID description: Registered user ID
- name: has_admin_role
in: body
description: Toggle a user to admin or not.
required: true
schema:
$ref: '#/definitions/HasAdminRole'
tags: tags:
- Products - Products
responses: responses:
@ -1682,3 +1688,21 @@ definitions:
password: password:
type: string type: string
description: The target server password. description: The target server password.
HasAdminRole:
type: object
properties:
has_admin_role:
type: integer
description: 1-has admin, 0-not.
UserProfile:
type: object
properties:
email:
type: string
description: The new email.
realname:
type: string
description: The new realname.
comment:
type: string
description: The new comment.