@@ -226,10 +226,10 @@ func getUIHeadersHandler(config *config.Config, allowedMethods ...string) func(h
226
226
// CheckVersionSupport godoc
227
227
// @Summary Check API support
228
228
// @Description Check if this API version is supported
229
- // @Router /v2/ [get]
229
+ // @Router /v2/ [get]
230
230
// @Accept json
231
231
// @Produce json
232
- // @Success 200 {string} string "ok".
232
+ // @Success 200 {string} string "ok".
233
233
func (rh * RouteHandler ) CheckVersionSupport (response http.ResponseWriter , request * http.Request ) {
234
234
if request .Method == http .MethodOptions {
235
235
return
@@ -255,15 +255,15 @@ func (rh *RouteHandler) CheckVersionSupport(response http.ResponseWriter, reques
255
255
// ListTags godoc
256
256
// @Summary List image tags
257
257
// @Description List all image tags in a repository
258
- // @Router /v2/{name}/tags/list [get]
258
+ // @Router /v2/{name}/tags/list [get]
259
259
// @Accept json
260
260
// @Produce json
261
- // @Param name path string true "test "
262
- // @Param n query integer true "limit entries for pagination"
263
- // @Param last query string true "last tag value for pagination"
264
- // @Success 200 {object} common.ImageTags
265
- // @Failure 404 {string} string "not found"
266
- // @Failure 400 {string} string "bad request".
261
+ // @Param name path string true "repository name "
262
+ // @Param n query integer true "limit entries for pagination"
263
+ // @Param last query string true "last tag value for pagination"
264
+ // @Success 200 {object} common.ImageTags
265
+ // @Failure 404 {string} string "not found"
266
+ // @Failure 400 {string} string "bad request".
267
267
func (rh * RouteHandler ) ListTags (response http.ResponseWriter , request * http.Request ) {
268
268
if request .Method == http .MethodOptions {
269
269
return
@@ -389,12 +389,12 @@ func (rh *RouteHandler) ListTags(response http.ResponseWriter, request *http.Req
389
389
// CheckManifest godoc
390
390
// @Summary Check image manifest
391
391
// @Description Check an image's manifest given a reference or a digest
392
- // @Router /v2/{name}/manifests/{reference} [head]
392
+ // @Router /v2/{name}/manifests/{reference} [head]
393
393
// @Accept json
394
394
// @Produce json
395
- // @Param name path string true "repository name"
395
+ // @Param name path string true "repository name"
396
396
// @Param reference path string true "image reference or digest"
397
- // @Success 200 {string} string "ok"
397
+ // @Success 200 {string} string "ok"
398
398
// @Header 200 {object} constants.DistContentDigestKey
399
399
// @Failure 404 {string} string "not found"
400
400
// @Failure 500 {string} string "internal server error".
@@ -461,9 +461,9 @@ type ExtensionList struct {
461
461
// @Description Get an image's manifest given a reference or a digest
462
462
// @Accept json
463
463
// @Produce application/vnd.oci.image.manifest.v1+json
464
- // @Param name path string true "repository name"
465
- // @Param reference path string true "image reference or digest"
466
- // @Success 200 {object} api.ImageManifest
464
+ // @Param name path string true "repository name"
465
+ // @Param reference path string true "image reference or digest"
466
+ // @Success 200 {object} api.ImageManifest
467
467
// @Header 200 {object} constants.DistContentDigestKey
468
468
// @Failure 404 {string} string "not found"
469
469
// @Failure 500 {string} string "internal server error"
@@ -562,10 +562,10 @@ func getReferrers(ctx context.Context, routeHandler *RouteHandler,
562
562
// @Description Get referrers given a digest
563
563
// @Accept json
564
564
// @Produce application/vnd.oci.image.index.v1+json
565
- // @Param name path string true "repository name"
565
+ // @Param name path string true "repository name"
566
566
// @Param digest path string true "digest"
567
567
// @Param artifactType query string false "artifact type"
568
- // @Success 200 {object} api.ImageIndex
568
+ // @Success 200 {object} api.ImageIndex
569
569
// @Failure 404 {string} string "not found"
570
570
// @Failure 500 {string} string "internal server error"
571
571
// @Router /v2/{name}/referrers/{digest} [get].
@@ -633,10 +633,10 @@ func (rh *RouteHandler) GetReferrers(response http.ResponseWriter, request *http
633
633
// @Description Update an image's manifest given a reference or a digest
634
634
// @Accept json
635
635
// @Produce json
636
- // @Param name path string true "repository name"
637
- // @Param reference path string true "image reference or digest"
636
+ // @Param name path string true "repository name"
637
+ // @Param reference path string true "image reference or digest"
638
638
// @Header 201 {object} constants.DistContentDigestKey
639
- // @Success 201 {string} string "created"
639
+ // @Success 201 {string} string "created"
640
640
// @Failure 400 {string} string "bad request"
641
641
// @Failure 404 {string} string "not found"
642
642
// @Failure 500 {string} string "internal server error"
@@ -744,9 +744,9 @@ func (rh *RouteHandler) UpdateManifest(response http.ResponseWriter, request *ht
744
744
// @Description Delete an image's manifest given a reference or a digest
745
745
// @Accept json
746
746
// @Produce json
747
- // @Param name path string true "repository name"
747
+ // @Param name path string true "repository name"
748
748
// @Param reference path string true "image reference or digest"
749
- // @Success 200 {string} string "ok"
749
+ // @Success 200 {string} string "ok"
750
750
// @Router /v2/{name}/manifests/{reference} [delete].
751
751
func (rh * RouteHandler ) DeleteManifest (response http.ResponseWriter , request * http.Request ) {
752
752
vars := mux .Vars (request )
@@ -853,8 +853,8 @@ func (rh *RouteHandler) DeleteManifest(response http.ResponseWriter, request *ht
853
853
// @Description Check an image's blob/layer given a digest
854
854
// @Accept json
855
855
// @Produce json
856
- // @Param name path string true "repository name"
857
- // @Param digest path string true "blob/layer digest"
856
+ // @Param name path string true "repository name"
857
+ // @Param digest path string true "blob/layer digest"
858
858
// @Success 200 {object} api.ImageManifest
859
859
// @Header 200 {object} constants.DistContentDigestKey
860
860
// @Router /v2/{name}/blobs/{digest} [head].
@@ -967,8 +967,8 @@ func parseRangeHeader(contentRange string) (int64, int64, error) {
967
967
// @Description Get an image's blob/layer given a digest
968
968
// @Accept json
969
969
// @Produce application/vnd.oci.image.layer.v1.tar+gzip
970
- // @Param name path string true "repository name"
971
- // @Param digest path string true "blob/layer digest"
970
+ // @Param name path string true "repository name"
971
+ // @Param digest path string true "blob/layer digest"
972
972
// @Header 200 {object} constants.DistContentDigestKey
973
973
// @Success 200 {object} api.ImageManifest
974
974
// @Router /v2/{name}/blobs/{digest} [get].
@@ -1077,8 +1077,8 @@ func (rh *RouteHandler) GetBlob(response http.ResponseWriter, request *http.Requ
1077
1077
// @Description Delete an image's blob/layer given a digest
1078
1078
// @Accept json
1079
1079
// @Produce json
1080
- // @Param name path string true "repository name"
1081
- // @Param digest path string true "blob/layer digest"
1080
+ // @Param name path string true "repository name"
1081
+ // @Param digest path string true "blob/layer digest"
1082
1082
// @Success 202 {string} string "accepted"
1083
1083
// @Router /v2/{name}/blobs/{digest} [delete].
1084
1084
func (rh * RouteHandler ) DeleteBlob (response http.ResponseWriter , request * http.Request ) {
@@ -1137,8 +1137,8 @@ func (rh *RouteHandler) DeleteBlob(response http.ResponseWriter, request *http.R
1137
1137
// @Description Create a new image blob/layer upload
1138
1138
// @Accept json
1139
1139
// @Produce json
1140
- // @Param name path string true "repository name"
1141
- // @Success 202 {string} string "accepted"
1140
+ // @Param name path string true "repository name"
1141
+ // @Success 202 {string} string "accepted"
1142
1142
// @Header 202 {string} Location "/v2/{name}/blobs/uploads/{session_id}"
1143
1143
// @Header 202 {string} Range "0-0"
1144
1144
// @Failure 401 {string} string "unauthorized"
@@ -1292,8 +1292,8 @@ func (rh *RouteHandler) CreateBlobUpload(response http.ResponseWriter, request *
1292
1292
// @Description Get an image's blob/layer upload given a session_id
1293
1293
// @Accept json
1294
1294
// @Produce json
1295
- // @Param name path string true "repository name"
1296
- // @Param session_id path string true "upload session_id"
1295
+ // @Param name path string true "repository name"
1296
+ // @Param session_id path string true "upload session_id"
1297
1297
// @Success 204 {string} string "no content"
1298
1298
// @Header 202 {string} Location "/v2/{name}/blobs/uploads/{session_id}"
1299
1299
// @Header 202 {string} Range "0-128"
@@ -1353,9 +1353,9 @@ func (rh *RouteHandler) GetBlobUpload(response http.ResponseWriter, request *htt
1353
1353
// @Description Resume an image's blob/layer upload given an session_id
1354
1354
// @Accept json
1355
1355
// @Produce json
1356
- // @Param name path string true "repository name"
1357
- // @Param session_id path string true "upload session_id"
1358
- // @Success 202 {string} string "accepted"
1356
+ // @Param name path string true "repository name"
1357
+ // @Param session_id path string true "upload session_id"
1358
+ // @Success 202 {string} string "accepted"
1359
1359
// @Header 202 {string} Location "/v2/{name}/blobs/uploads/{session_id}"
1360
1360
// @Header 202 {string} Range "0-128"
1361
1361
// @Header 200 {object} api.BlobUploadUUID
@@ -1452,10 +1452,10 @@ func (rh *RouteHandler) PatchBlobUpload(response http.ResponseWriter, request *h
1452
1452
// @Description Update and finish an image's blob/layer upload given a digest
1453
1453
// @Accept json
1454
1454
// @Produce json
1455
- // @Param name path string true "repository name"
1456
- // @Param session_id path string true "upload session_id"
1457
- // @Param digest query string true "blob/layer digest"
1458
- // @Success 201 {string} string "created"
1455
+ // @Param name path string true "repository name"
1456
+ // @Param session_id path string true "upload session_id"
1457
+ // @Param digest query string true "blob/layer digest"
1458
+ // @Success 201 {string} string "created"
1459
1459
// @Header 202 {string} Location "/v2/{name}/blobs/uploads/{digest}"
1460
1460
// @Header 200 {object} constants.DistContentDigestKey
1461
1461
// @Failure 404 {string} string "not found"
@@ -1610,8 +1610,8 @@ finish:
1610
1610
// @Description Delete an image's blob/layer given a digest
1611
1611
// @Accept json
1612
1612
// @Produce json
1613
- // @Param name path string true "repository name"
1614
- // @Param session_id path string true "upload session_id"
1613
+ // @Param name path string true "repository name"
1614
+ // @Param session_id path string true "upload session_id"
1615
1615
// @Success 200 {string} string "ok"
1616
1616
// @Failure 404 {string} string "not found"
1617
1617
// @Failure 500 {string} string "internal server error"
@@ -1665,7 +1665,7 @@ type RepositoryList struct {
1665
1665
// @Description List all image repositories
1666
1666
// @Accept json
1667
1667
// @Produce json
1668
- // @Success 200 {object} api.RepositoryList
1668
+ // @Success 200 {object} api.RepositoryList
1669
1669
// @Failure 500 {string} string "internal server error"
1670
1670
// @Router /v2/_catalog [get].
1671
1671
func (rh * RouteHandler ) ListRepositories (response http.ResponseWriter , request * http.Request ) {
@@ -1729,7 +1729,7 @@ func (rh *RouteHandler) ListRepositories(response http.ResponseWriter, request *
1729
1729
// @Description List all extensions present on registry
1730
1730
// @Accept json
1731
1731
// @Produce json
1732
- // @Success 200 {object} api.ExtensionList
1732
+ // @Success 200 {object} api.ExtensionList
1733
1733
// @Router /v2/_oci/ext/discover [get].
1734
1734
func (rh * RouteHandler ) ListExtensions (w http.ResponseWriter , r * http.Request ) {
1735
1735
if r .Method == http .MethodOptions {
@@ -1746,10 +1746,10 @@ func (rh *RouteHandler) ListExtensions(w http.ResponseWriter, r *http.Request) {
1746
1746
// Logout godoc
1747
1747
// @Summary Logout by removing current session
1748
1748
// @Description Logout by removing current session
1749
- // @Router /auth/logout [post]
1749
+ // @Router /zot /auth/logout [post]
1750
1750
// @Accept json
1751
1751
// @Produce json
1752
- // @Success 200 {string} string "ok".
1752
+ // @Success 200 {string} string "ok".
1753
1753
// @Failure 500 {string} string "internal server error".
1754
1754
func (rh * RouteHandler ) Logout (response http.ResponseWriter , request * http.Request ) {
1755
1755
if request .Method == http .MethodOptions {
@@ -1958,9 +1958,9 @@ type ReferenceList struct {
1958
1958
// @Description Get references for an image given a digest and artifact type
1959
1959
// @Accept json
1960
1960
// @Produce json
1961
- // @Param name path string true "repository name"
1962
- // @Param digest path string true "image digest"
1963
- // @Param artifactType query string true "artifact type"
1961
+ // @Param name path string true "repository name"
1962
+ // @Param digest path string true "image digest"
1963
+ // @Param artifactType query string true "artifact type"
1964
1964
// @Success 200 {string} string "ok"
1965
1965
// @Failure 404 {string} string "not found"
1966
1966
// @Failure 500 {string} string "internal server error"
@@ -2035,7 +2035,7 @@ type APIKeyPayload struct { //nolint:revive
2035
2035
// @Success 200 {string} string "ok"
2036
2036
// @Failure 401 {string} string "unauthorized"
2037
2037
// @Failure 500 {string} string "internal server error"
2038
- // @Router /auth/apikey [get].
2038
+ // @Router /zot /auth/apikey [get].
2039
2039
func (rh * RouteHandler ) GetAPIKeys (resp http.ResponseWriter , req * http.Request ) {
2040
2040
apiKeys , err := rh .c .MetaDB .GetUserAPIKeys (req .Context ())
2041
2041
if err != nil {
@@ -2077,7 +2077,7 @@ func (rh *RouteHandler) GetAPIKeys(resp http.ResponseWriter, req *http.Request)
2077
2077
// @Failure 400 {string} string "bad request"
2078
2078
// @Failure 401 {string} string "unauthorized"
2079
2079
// @Failure 500 {string} string "internal server error"
2080
- // @Router /auth/apikey [post].
2080
+ // @Router /zot /auth/apikey [post].
2081
2081
func (rh * RouteHandler ) CreateAPIKey (resp http.ResponseWriter , req * http.Request ) {
2082
2082
var payload APIKeyPayload
2083
2083
@@ -2178,7 +2178,7 @@ func (rh *RouteHandler) CreateAPIKey(resp http.ResponseWriter, req *http.Request
2178
2178
// @Failure 500 {string} string "internal server error"
2179
2179
// @Failure 401 {string} string "unauthorized"
2180
2180
// @Failure 400 {string} string "bad request"
2181
- // @Router /auth/apikey [delete].
2181
+ // @Router /zot /auth/apikey [delete].
2182
2182
func (rh * RouteHandler ) RevokeAPIKey (resp http.ResponseWriter , req * http.Request ) {
2183
2183
ids , ok := req .URL .Query ()["id" ]
2184
2184
if ! ok || len (ids ) != 1 {
0 commit comments