Update swagger.yaml

This commit is contained in:
wemeya 2017-06-27 18:08:49 +08:00
parent 2ada2dbd16
commit ddee1ca7e8

View File

@ -566,6 +566,33 @@ paths:
$ref: '#/definitions/User' $ref: '#/definitions/User'
401: 401:
description: User need to log in first. description: User need to log in first.
/users/{user_id}:
get:
summary: Get a user's profile.
description: |
Get user's profile with user id.
parameters:
- name: user_id
in: path
type: integer
format: int
required: true
description: Registered user ID
tags:
- Products
responses:
200:
description: Get user's profile successfully.
400:
description: Invalid user ID.
401:
description: User need to log in first.
403:
description: User does not have permission of admin role.
404:
description: User ID does not exist.
500:
description: Unexpected internal errors.
/users/{user_id}: /users/{user_id}:
put: put:
summary: Update a registered user to change his profile. summary: Update a registered user to change his profile.
@ -588,7 +615,7 @@ paths:
- Products - Products
responses: responses:
200: 200:
description: Updated user's admin role successfully. description: Updated user's profile successfully.
400: 400:
description: Invalid user ID. description: Invalid user ID.
401: 401:
@ -905,7 +932,7 @@ paths:
503: 503:
description: Harbor is not deployed with Clair. description: Harbor is not deployed with Clair.
/repositories/{repo_name}/tags/{tag}/vulnerability/detail: /repositories/{repo_name}/tags/{tag}/vulnerability/details:
get: get:
summary: Get vulnerability details of the image. summary: Get vulnerability details of the image.
description: | description: |
@ -1065,7 +1092,7 @@ paths:
in: query in: query
type: integer type: integer
format: int format: int
required: false required: true
description: The ID of the policy that triggered this job. description: The ID of the policy that triggered this job.
- name: num - name: num
in: query in: query
@ -1113,7 +1140,7 @@ paths:
schema: schema:
type: array type: array
items: items:
$ref: '#/definitions/RepPolicy' $ref: '#/definitions/JobStatus'
headers: headers:
X-Total-Count: X-Total-Count:
description: The total count of jobs description: The total count of jobs
@ -1202,7 +1229,7 @@ paths:
schema: schema:
type: array type: array
items: items:
$ref: '#/definitions/JobStatus' $ref: '#/definitions/RepPolicy'
400: 400:
description: Invalid project ID. description: Invalid project ID.
401: 401: