Fix issue in API swagger doc

This commit add `reuse_sys_cve_whitelist` to project metadata, and fixes
a few issues in APIs related webhook.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
Daniel Jiang 2019-08-13 01:05:24 +08:00
parent 34f845b804
commit 50875593ba
1 changed files with 13 additions and 9 deletions

View File

@ -3684,7 +3684,7 @@ paths:
description: Unexpected internal errors.
'/projects/{project_id}/webhook/policies':
get:
sumary: List project webhook policies.
summary: List project webhook policies.
description: |
This endpoint returns webhook policies of a project.
parameters:
@ -3712,7 +3712,7 @@ paths:
'500':
description: Unexpected internal errors.
post:
sumary: Create project webhook policy.
summary: Create project webhook policy.
description: |
This endpoint create a webhook policy if the project does not have one.
parameters:
@ -3757,7 +3757,7 @@ paths:
in: path
description: The id of webhook policy.
required: true
type: int64
type: integer
format: int64
tags:
- Products
@ -3791,7 +3791,7 @@ paths:
in: path
description: The id of webhook policy.
required: true
type: int64
type: integer
format: int64
- name: policy
in: body
@ -3829,7 +3829,7 @@ paths:
in: path
description: The id of webhook policy.
required: true
type: int64
type: integer
format: int64
tags:
- Products
@ -3908,7 +3908,7 @@ paths:
description: Internal server errors.
'/projects/{project_id}/webhook/jobs':
get:
sumary: List project webhook jobs
summary: List project webhook jobs
description: |
This endpoint returns webhook jobs of a project.
parameters:
@ -4083,16 +4083,20 @@ definitions:
description: 'The public status of the project. The valid values are "true", "false".'
enable_content_trust:
type: string
description: 'Whether content trust is enabled or not. If it is enabled, user cann''t pull unsigned images from this project. The valid values are "true", "false".'
description: 'Whether content trust is enabled or not. If it is enabled, user can''t pull unsigned images from this project. The valid values are "true", "false".'
prevent_vul:
type: string
description: 'Whether prevent the vulnerable images from running. The valid values are "true", "false".'
severity:
type: string
description: 'If the vulnerability is high than severity defined here, the images cann''t be pulled. The valid values are "negligible", "low", "medium", "high", "critical".'
description: 'If the vulnerability is high than severity defined here, the images can''t be pulled. The valid values are "negligible", "low", "medium", "high", "critical".'
auto_scan:
type: string
description: 'Whether scan images automatically when pushing. The valid values are "true", "false".'
reuse_sys_cve_whitelist:
type: string
description: 'Whether this project reuse the system level CVE whitelist as the whitelist of its own. The valid values are "true", "false".
If it is set to "true" the actual whitelist associate with this project, if any, will be ignored.'
ProjectSummary:
type: object
properties:
@ -5724,7 +5728,7 @@ definitions:
description: The webhook job ID.
policy_id:
type: integer
fromat: int64
format: int64
description: The webhook policy ID.
event_type:
type: string