mirror of
https://github.com/goharbor/harbor
synced 2025-04-13 16:53:43 +00:00
Revert "Updates Swagger YAML for new added APIs."
This commit is contained in:
parent
44205610ec
commit
96cf5ef866
|
@ -1309,41 +1309,7 @@ paths:
|
|||
403:
|
||||
description: User does not have permission of admin role.
|
||||
500:
|
||||
description: Unexpected internal errors.
|
||||
/systeminfo/volumes:
|
||||
get:
|
||||
summary: Get system volume info (total/free size).
|
||||
description: |
|
||||
This endpoint is for retrieving system volume info that only provides for admin user.
|
||||
tags:
|
||||
- Products
|
||||
responses:
|
||||
200:
|
||||
description: Get system volumes successfully.
|
||||
401:
|
||||
description: User need to log in first.
|
||||
403:
|
||||
description: User does not have permission of admin role.
|
||||
500:
|
||||
description: Unexpected internal errors.
|
||||
/systeminfo/getcert:
|
||||
get:
|
||||
summary: Get default root certificate under OVA deployment.
|
||||
description: |
|
||||
This endpoint is for downloading a default root certificate that only provides for admin user under OVA deployment.
|
||||
tags:
|
||||
- Products
|
||||
responses:
|
||||
200:
|
||||
description: Get default root certificate successfully.
|
||||
401:
|
||||
description: User need to log in first.
|
||||
403:
|
||||
description: User does not have permission of admin role.
|
||||
404:
|
||||
description: Not found the default root certificate.
|
||||
500:
|
||||
description: Unexpected internal errors.
|
||||
description: Unexpected internal errors.
|
||||
definitions:
|
||||
Search:
|
||||
type: object
|
||||
|
@ -1775,22 +1741,3 @@ definitions:
|
|||
comment:
|
||||
type: string
|
||||
description: The new comment.
|
||||
Storage:
|
||||
type: object
|
||||
properties:
|
||||
total:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Total volume size.
|
||||
free:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Free volume size.
|
||||
SystemInfo:
|
||||
type: object
|
||||
properties:
|
||||
storage:
|
||||
type: array
|
||||
description: The storage of system.
|
||||
items:
|
||||
$ref: '#/definitions/Storage'
|
|
@ -73,7 +73,6 @@ func (sia *SystemInfoAPI) GetVolumeInfo() {
|
|||
func (sia *SystemInfoAPI) GetCert() {
|
||||
if sia.isAdmin {
|
||||
if _, err := os.Stat(defaultRootCert); !os.IsNotExist(err) {
|
||||
sia.Ctx.Output.Header("Content-Type", "application/octet-stream")
|
||||
sia.Ctx.Output.Header("Content-Disposition", "attachment; filename=ca.crt")
|
||||
http.ServeFile(sia.Ctx.ResponseWriter, sia.Ctx.Request, defaultRootCert)
|
||||
} else {
|
||||
|
@ -81,5 +80,5 @@ func (sia *SystemInfoAPI) GetCert() {
|
|||
sia.CustomAbort(http.StatusNotFound, "No certificate found.")
|
||||
}
|
||||
}
|
||||
sia.CustomAbort(http.StatusForbidden, "")
|
||||
sia.CustomAbort(http.StatusUnauthorized, "")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user