diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 907164078..8f7503ebb 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -4272,6 +4272,9 @@ definitions: name: type: string description: The registry name. + description: + type: string + description: Description of the registry. url: type: string description: The registry address URL string. diff --git a/src/core/api/models/registry.go b/src/core/api/models/registry.go index 4ee4e851a..09b12eb08 100644 --- a/src/core/api/models/registry.go +++ b/src/core/api/models/registry.go @@ -3,6 +3,7 @@ package models // RegistryUpdateRequest is request used to update a registry. type RegistryUpdateRequest struct { Name *string `json:"name"` + Description *string `json:"description"` URL *string `json:"url"` CredentialType *string `json:"credential_type"` AccessKey *string `json:"access_key"` diff --git a/src/core/api/registry.go b/src/core/api/registry.go index 5def7fa92..f221ccb7f 100644 --- a/src/core/api/registry.go +++ b/src/core/api/registry.go @@ -135,6 +135,9 @@ func (t *RegistryAPI) Put() { if req.Name != nil { registry.Name = *req.Name } + if req.Description != nil { + registry.Description = *req.Description + } if req.URL != nil { registry.URL = *req.URL }