mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
feat: support pushing multiple tags for a single manifest (#3885)
* feat: support pushing multiple tags for a single manifest See https://github.com/opencontainers/distribution-spec/pull/600 Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com> * fix: constants not replaced in swagger output Also godot mandates comments ending in dots, which produces bad results in the swagger generated files, see the extra ". which is now fixed below: ``` diff --git a/swagger/docs.go b/swagger/docs.go index 84b08277..fb2c45c3 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -114,7 +114,7 @@ const docTemplate = `{ } }, "400": { - "description": "bad request\".", + "description": "bad request", "schema": { "type": "string" } @@ -200,7 +200,7 @@ const docTemplate = `{ } }, "400": { - "description": "bad request\".", + "description": "bad request", "schema": { "type": "string" } diff --git a/swagger/swagger.json b/swagger/swagger.json index cfeb3900..247f95fa 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -106,7 +106,7 @@ } }, "400": { - "description": "bad request\".", + "description": "bad request", "schema": { "type": "string" } @@ -192,7 +192,7 @@ } }, "400": { - "description": "bad request\".", + "description": "bad request", "schema": { "type": "string" } diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 57641c2f..09b30dcc 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -310,7 +310,7 @@ paths: schema: type: string "400": - description: bad request". + description: bad request schema: type: string "500": @@ -366,7 +366,7 @@ paths: schema: type: string "400": - description: bad request". + description: bad request schema: type: string "500": ``` Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com> --------- Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
This commit is contained in:
+103
-38
@@ -23,7 +23,7 @@
|
||||
"summary": "Check API support",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ok\".",
|
||||
"description": "ok",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -106,13 +106,13 @@
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "bad request\".",
|
||||
"description": "bad request",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error\".",
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -149,7 +149,7 @@
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error\".",
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -192,13 +192,13 @@
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "bad request\".",
|
||||
"description": "bad request",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error\".",
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -292,9 +292,6 @@
|
||||
"responses": {
|
||||
"202": {
|
||||
"description": "accepted",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"headers": {
|
||||
"Location": {
|
||||
"type": "string",
|
||||
@@ -356,6 +353,19 @@
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "no content",
|
||||
"headers": {
|
||||
"Location": {
|
||||
"type": "string",
|
||||
"description": "/v2/{name}/blobs/uploads/{session_id}"
|
||||
},
|
||||
"Range": {
|
||||
"type": "string",
|
||||
"description": "0-128"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "bad request",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -409,8 +419,15 @@
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "created",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"headers": {
|
||||
"Docker-Content-Digest": {
|
||||
"type": "string",
|
||||
"description": "Digest of the committed blob"
|
||||
},
|
||||
"Location": {
|
||||
"type": "string",
|
||||
"description": "/v2/{name}/blobs/{digest}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@@ -453,11 +470,8 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ok",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
"204": {
|
||||
"description": "no content"
|
||||
},
|
||||
"404": {
|
||||
"description": "not found",
|
||||
@@ -501,10 +515,11 @@
|
||||
"responses": {
|
||||
"202": {
|
||||
"description": "accepted",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"headers": {
|
||||
"Blob-Upload-UUID": {
|
||||
"type": "string",
|
||||
"description": "Opaque blob upload session identifier"
|
||||
},
|
||||
"Location": {
|
||||
"type": "string",
|
||||
"description": "/v2/{name}/blobs/uploads/{session_id}"
|
||||
@@ -604,10 +619,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"202": {
|
||||
"description": "accepted",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
"description": "accepted"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -643,8 +655,9 @@
|
||||
"$ref": "#/definitions/api.ImageManifest"
|
||||
},
|
||||
"headers": {
|
||||
"constants.DistContentDigestKey": {
|
||||
"type": "object"
|
||||
"Docker-Content-Digest": {
|
||||
"type": "string",
|
||||
"description": "Manifest digest of the content"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -684,8 +697,9 @@
|
||||
"$ref": "#/definitions/api.ImageManifest"
|
||||
},
|
||||
"headers": {
|
||||
"constants.DistContentDigestKey": {
|
||||
"type": "object"
|
||||
"Docker-Content-Digest": {
|
||||
"type": "string",
|
||||
"description": "Manifest digest of the content"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -704,7 +718,7 @@
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"description": "Update an image's manifest given a reference or a digest",
|
||||
"description": "Update an image's manifest given a reference or a digest. On digest pushes with `tag=` query\nparameters, 201 responses repeat the `OCI-Tag` header once per tag value.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -726,13 +740,30 @@
|
||||
"name": "reference",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "multi",
|
||||
"description": "additional tag(s) for digest pushes",
|
||||
"name": "tag",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "created",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"headers": {
|
||||
"Docker-Content-Digest": {
|
||||
"type": "string",
|
||||
"description": "Manifest digest of the uploaded content"
|
||||
},
|
||||
"OCI-Tag": {
|
||||
"type": "string",
|
||||
"description": "Echoed tag= value; this header is repeatable (one field per tag= query parameter)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@@ -747,6 +778,12 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"414": {
|
||||
"description": "too many tag query parameters",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
@@ -781,8 +818,35 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ok",
|
||||
"202": {
|
||||
"description": "accepted"
|
||||
},
|
||||
"400": {
|
||||
"description": "bad request",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "not found",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"405": {
|
||||
"description": "method not allowed",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "conflict",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -821,8 +885,9 @@
|
||||
"type": "string"
|
||||
},
|
||||
"headers": {
|
||||
"constants.DistContentDigestKey": {
|
||||
"type": "object"
|
||||
"Docker-Content-Digest": {
|
||||
"type": "string",
|
||||
"description": "Manifest digest of the content"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -833,7 +898,7 @@
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error\".",
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -936,7 +1001,7 @@
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "bad request\".",
|
||||
"description": "bad request",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -1086,13 +1151,13 @@
|
||||
"summary": "Logout by removing current session",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ok\".",
|
||||
"description": "ok",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "internal server error\".",
|
||||
"description": "internal server error",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user