API: update ScannerRegistration.properties.url format (#18799)

The format of ScannerRegistration.properties.url should be
`uri` but not `url`.

Fixes: #18798

Signed-off-by: bin liu <liubin0329@gmail.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
Bin Liu 2023-07-05 17:57:06 +08:00 committed by GitHub
parent 1efe944a8d
commit c8120d5712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -8182,7 +8182,7 @@ definitions:
x-omitempty: false x-omitempty: false
url: url:
type: string type: string
format: url format: uri
description: A base URL of the scanner adapter description: A base URL of the scanner adapter
example: http://harbor-scanner-trivy:8080 example: http://harbor-scanner-trivy:8080
disabled: disabled:

View File

@ -38,7 +38,7 @@ func (s *ScannerRegistration) ToSwagger(ctx context.Context) *models.ScannerRegi
return &models.ScannerRegistration{ return &models.ScannerRegistration{
UUID: s.UUID, UUID: s.UUID,
Name: s.Name, Name: s.Name,
URL: s.URL, URL: strfmt.URI(s.URL),
Description: s.Description, Description: s.Description,
Auth: s.Auth, Auth: s.Auth,
AccessCredential: s.AccessCredential, AccessCredential: s.AccessCredential,