Merge pull request #6017 from steven-zou/update_swagger_chart_labels_API

Update swagger document to reflect the changes of Chart API for supporting labels
This commit is contained in:
Qian Deng 2018-10-22 10:15:19 +08:00 committed by GitHub
commit 64d83101f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2730,7 +2730,7 @@ paths:
$ref: '#/definitions/UnauthorizedChartAPIError' $ref: '#/definitions/UnauthorizedChartAPIError'
'403': '403':
$ref: '#/definitions/ForbiddenChartAPIError' $ref: '#/definitions/ForbiddenChartAPIError'
'/chartrepo/{repo}/charts': /chartrepo/{repo}/charts:
get: get:
summary: Get all the charts under the specified project summary: Get all the charts under the specified project
description: Get all the charts under the specified project description: Get all the charts under the specified project
@ -2787,7 +2787,7 @@ paths:
$ref: '#/definitions/InternalChartAPIError' $ref: '#/definitions/InternalChartAPIError'
'507': '507':
$ref: '#/definitions/InsufficientStorageChartAPIError' $ref: '#/definitions/InsufficientStorageChartAPIError'
'/chartrepo/{repo}/charts/{name}': /chartrepo/{repo}/charts/{name}:
get: get:
summary: Get all the versions of the specified chart summary: Get all the versions of the specified chart
description: Get all the versions of the specified chart description: Get all the versions of the specified chart
@ -2842,7 +2842,7 @@ paths:
$ref: '#/definitions/ForbiddenChartAPIError' $ref: '#/definitions/ForbiddenChartAPIError'
'500': '500':
$ref: '#/definitions/InternalChartAPIError' $ref: '#/definitions/InternalChartAPIError'
'/chartrepo/{repo}/charts/{name}/{version}': /chartrepo/{repo}/charts/{name}/{version}:
get: get:
summary: Get the specified chart version summary: Get the specified chart version
description: Get the specified chart version description: Get the specified chart version
@ -2909,7 +2909,7 @@ paths:
$ref: '#/definitions/NotFoundChartAPIError' $ref: '#/definitions/NotFoundChartAPIError'
'500': '500':
$ref: '#/definitions/InternalChartAPIError' $ref: '#/definitions/InternalChartAPIError'
'/chartrepo/{repo}/prov': /chartrepo/{repo}/prov:
post: post:
summary: Upload a provance file to the specified project. summary: Upload a provance file to the specified project.
description: Upload a provance file to the specified project. The provance file should be targeted for an existing chart file. description: Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.
@ -2971,6 +2971,127 @@ paths:
$ref: '#/definitions/InternalChartAPIError' $ref: '#/definitions/InternalChartAPIError'
'507': '507':
$ref: '#/definitions/InsufficientStorageChartAPIError' $ref: '#/definitions/InsufficientStorageChartAPIError'
/chartrepo/:repo/charts/:name/:version/labels:
get:
summary: Return the attahced labels of chart.
description: Return the attahced labels of the specified chart version.
tags:
- Products
- Chart Repository
- Label
parameters:
- name: repo
in: path
type: string
required: true
description: The project name
- name: name
in: path
type: string
required: true
description: The chart name
- name: version
in: path
type: string
required: true
description: The chart version
responses:
'200':
$ref: '#/definitions/Labels'
'401':
$ref: '#/definitions/UnauthorizedChartAPIError'
'403':
$ref: '#/definitions/ForbiddenChartAPIError'
'404':
$ref: '#/definitions/NotFoundChartAPIError'
'500':
$ref: '#/definitions/InternalChartAPIError'
post:
summary: Mark label to chart.
description: Mark label to the specified chart version.
tags:
- Products
- Chart Repository
- Label
parameters:
- name: repo
in: path
type: string
required: true
description: The project name
- name: name
in: path
type: string
required: true
description: The chart name
- name: version
in: path
type: string
required: true
description: The chart version
- name: label
in: body
required: true
schema:
$ref: '#/definitions/Label'
description: 'The label being marked to the chart version'
responses:
'200':
description: The label is successfully marked to the chart version.
'400':
$ref: '#/definitions/BadRequestFormatedError'
'401':
$ref: '#/definitions/UnauthorizedChartAPIError'
'403':
$ref: '#/definitions/ForbiddenChartAPIError'
'404':
$ref: '#/definitions/NotFoundChartAPIError'
'409':
$ref: '#/definitions/ConflictFormatedError'
'500':
$ref: '#/definitions/InternalChartAPIError'
/chartrepo/:repo/charts/:name/:version/labels/:id:
delete:
summary: Remove label from chart.
description: Remove label from the specified chart version.
tags:
- Products
- Chart Repository
- Label
parameters:
- name: repo
in: path
type: string
required: true
description: The project name
- name: name
in: path
type: string
required: true
description: The chart name
- name: version
in: path
type: string
required: true
description: The chart version
- name: id
in: path
type: integer
required: true
description: The label ID
responses:
'200':
description: The label is successfully unmarked from the chart version.
'400':
$ref: '#/definitions/BadRequestFormatedError'
'401':
$ref: '#/definitions/UnauthorizedChartAPIError'
'403':
$ref: '#/definitions/ForbiddenChartAPIError'
'404':
$ref: '#/definitions/NotFoundChartAPIError'
'500':
$ref: '#/definitions/InternalChartAPIError'
responses: responses:
UnsupportedMediaType: UnsupportedMediaType:
description: 'The Media Type of the request is not supported, it has to be "application/json"' description: 'The Media Type of the request is not supported, it has to be "application/json"'
@ -4104,6 +4225,16 @@ definitions:
type: object type: object
allOf: allOf:
- $ref: '#/definitions/ChartAPIError' - $ref: '#/definitions/ChartAPIError'
BadRequestFormatedError:
description: Bad request
type: object
allOf:
- $ref: '#/definitions/ChartAPIError'
ConflictFormatedError:
description: Conflicts
type: object
allOf:
- $ref: '#/definitions/ChartAPIError'
ChartInfoEntry: ChartInfoEntry:
type: object type: object
description: The object contains basic chart information description: The object contains basic chart information
@ -4204,6 +4335,9 @@ definitions:
description: The urls of the chart entry description: The urls of the chart entry
items: items:
type: string type: string
properties:
labels:
$ref: '#/definitions/Labels'
ChartVersions: ChartVersions:
type: array type: array
description: A list of chart entry description: A list of chart entry
@ -4250,6 +4384,8 @@ definitions:
security: security:
$ref: '#/definitions/SecurityReport' $ref: '#/definitions/SecurityReport'
dependencies: dependencies:
type: array
items:
$ref: '#/definitions/Dependency' $ref: '#/definitions/Dependency'
values: values:
type: object type: object
@ -4259,6 +4395,8 @@ definitions:
type: object type: object
additionalProperties: additionalProperties:
type: string type: string
labels:
$ref: '#/definitions/Labels'
GCResult: GCResult:
type: object type: object
properties: properties:
@ -4300,3 +4438,8 @@ definitions:
description: The matched level description: The matched level
chart: chart:
$ref: '#/definitions/ChartVersion' $ref: '#/definitions/ChartVersion'
Labels:
type: array
description: A list of label
items:
$ref: '#/definitions/Label'