mirror of
https://github.com/goharbor/harbor
synced 2025-04-22 18:31:41 +00:00
Merge pull request #1144 from vmware/revert-1143-master-update-swagger
Revert "Updates Swagger YAML for new added APIs."
This commit is contained in:
commit
2dee9c7b90
@ -1310,40 +1310,6 @@ paths:
|
|||||||
description: User does not have permission of admin role.
|
description: User does not have permission of admin role.
|
||||||
500:
|
500:
|
||||||
description: Unexpected internal errors.
|
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.
|
|
||||||
definitions:
|
definitions:
|
||||||
Search:
|
Search:
|
||||||
type: object
|
type: object
|
||||||
@ -1775,22 +1741,3 @@ definitions:
|
|||||||
comment:
|
comment:
|
||||||
type: string
|
type: string
|
||||||
description: The new comment.
|
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() {
|
func (sia *SystemInfoAPI) GetCert() {
|
||||||
if sia.isAdmin {
|
if sia.isAdmin {
|
||||||
if _, err := os.Stat(defaultRootCert); !os.IsNotExist(err) {
|
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")
|
sia.Ctx.Output.Header("Content-Disposition", "attachment; filename=ca.crt")
|
||||||
http.ServeFile(sia.Ctx.ResponseWriter, sia.Ctx.Request, defaultRootCert)
|
http.ServeFile(sia.Ctx.ResponseWriter, sia.Ctx.Request, defaultRootCert)
|
||||||
} else {
|
} else {
|
||||||
@ -81,5 +80,5 @@ func (sia *SystemInfoAPI) GetCert() {
|
|||||||
sia.CustomAbort(http.StatusNotFound, "No certificate found.")
|
sia.CustomAbort(http.StatusNotFound, "No certificate found.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sia.CustomAbort(http.StatusForbidden, "")
|
sia.CustomAbort(http.StatusUnauthorized, "")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user