From b603f8ab6227c1fc767c17d224f21dffdca7a034 Mon Sep 17 00:00:00 2001 From: wang yan Date: Tue, 17 Sep 2019 14:48:51 +0800 Subject: [PATCH] Add quota switcher swagger doc Signed-off-by: wang yan --- docs/swagger.yaml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 83cb717eb..b2cd2ee44 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -2415,7 +2415,7 @@ paths: description: | This endpoint is for syncing quota usage of registry/chart with database. tags: - - Products + - Products responses: '200': description: Sync repositories successfully. @@ -2423,6 +2423,28 @@ paths: description: User need to log in first. '403': description: User does not have permission of system admin role. + /internal/switchquota: + put: + summary: Enable or disable quota. + description: | + This endpoint is for enable/disable quota. When quota is disabled, no resource require/release in image/chart push and delete. + tags: + - Products + parameters: + - name: switcher + in: body + required: true + schema: + $ref: '#/definitions/QuotaSwitcher' + responses: + '200': + description: Enable/Disable quota successfully. + '401': + description: User need to log in first. + '403': + description: User does not have permission of system admin role. + '500': + description: Unexpected internal errors. /systeminfo: get: summary: Get general system info @@ -6248,3 +6270,9 @@ definitions: retained: type: integer + QuotaSwitcher: + type: object + properties: + enabled: + type: boolean + description: The quota is enable or disable