mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 05:28:07 +08:00
a5cc8ab810
* 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>
1523 lines
54 KiB
Go
1523 lines
54 KiB
Go
// Package swagger Code generated by swaggo/swag. DO NOT EDIT
|
|
package swagger
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {},
|
|
"license": {
|
|
"name": "Apache 2.0",
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/v2/": {
|
|
"get": {
|
|
"description": "Check if this API version is supported",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Check API support",
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/_catalog": {
|
|
"get": {
|
|
"description": "List all image repositories",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "List image repositories",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.RepositoryList"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/_oci/ext/discover": {
|
|
"get": {
|
|
"description": "List all extensions present on registry",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "List Registry level extensions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.ExtensionList"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/_zot/ext/cosign": {
|
|
"post": {
|
|
"description": "Upload cosign public keys for verifying signatures",
|
|
"consumes": [
|
|
"application/octet-stream"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Upload cosign public keys for verifying signatures",
|
|
"parameters": [
|
|
{
|
|
"description": "Public key content",
|
|
"name": "requestBody",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/_zot/ext/mgmt": {
|
|
"get": {
|
|
"description": "Get current server configuration",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Get current server configuration",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"config"
|
|
],
|
|
"type": "string",
|
|
"description": "specify resource",
|
|
"name": "resource",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/extensions.StrippedConfig"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/_zot/ext/notation": {
|
|
"post": {
|
|
"description": "Upload notation certificates for verifying signatures",
|
|
"consumes": [
|
|
"application/octet-stream"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Upload notation certificates for verifying signatures",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "truststore type",
|
|
"name": "truststoreType",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"description": "Certificate content",
|
|
"name": "requestBody",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/_zot/ext/userprefs": {
|
|
"put": {
|
|
"description": "Add bookmarks/stars info",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Add bookmarks/stars info",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"toggleBookmark",
|
|
"toggleStar"
|
|
],
|
|
"type": "string",
|
|
"description": "specify action",
|
|
"name": "action",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "repo",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request\".",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "forbidden",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/{name}/blobs/uploads": {
|
|
"post": {
|
|
"description": "Create a new image blob/layer upload",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Create image blob/layer upload",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "accepted",
|
|
"headers": {
|
|
"Location": {
|
|
"type": "string",
|
|
"description": "/v2/{name}/blobs/uploads/{session_id}"
|
|
},
|
|
"Range": {
|
|
"type": "string",
|
|
"description": "0-0"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/{name}/blobs/uploads/{session_id}": {
|
|
"get": {
|
|
"description": "Get an image's blob/layer upload given a session_id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Get image blob/layer upload",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "upload session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Update and finish an image's blob/layer upload given a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Update image blob/layer upload",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "upload session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "blob/layer digest",
|
|
"name": "digest",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "created",
|
|
"headers": {
|
|
"Docker-Content-Digest": {
|
|
"type": "string",
|
|
"description": "Digest of the committed blob"
|
|
},
|
|
"Location": {
|
|
"type": "string",
|
|
"description": "/v2/{name}/blobs/{digest}"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete an image's blob/layer given a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Delete image blob/layer",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "upload session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "no content"
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Resume an image's blob/layer upload given an session_id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Resume image blob/layer upload",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "upload session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "accepted",
|
|
"headers": {
|
|
"Blob-Upload-UUID": {
|
|
"type": "string",
|
|
"description": "Opaque blob upload session identifier"
|
|
},
|
|
"Location": {
|
|
"type": "string",
|
|
"description": "/v2/{name}/blobs/uploads/{session_id}"
|
|
},
|
|
"Range": {
|
|
"type": "string",
|
|
"description": "0-128"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"416": {
|
|
"description": "range not satisfiable",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/{name}/blobs/{digest}": {
|
|
"get": {
|
|
"description": "Get an image's blob/layer given a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/vnd.oci.image.layer.v1.tar+gzip"
|
|
],
|
|
"summary": "Get image blob/layer",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "blob/layer digest",
|
|
"name": "digest",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.ImageManifest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete an image's blob/layer given a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Delete image blob/layer",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "blob/layer digest",
|
|
"name": "digest",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "accepted"
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"description": "Check an image's blob/layer given a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Check image blob/layer",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "blob/layer digest",
|
|
"name": "digest",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.ImageManifest"
|
|
},
|
|
"headers": {
|
|
"Docker-Content-Digest": {
|
|
"type": "string",
|
|
"description": "Manifest digest of the content"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/{name}/manifests/{reference}": {
|
|
"get": {
|
|
"description": "Get an image's manifest given a reference or a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/vnd.oci.image.manifest.v1+json"
|
|
],
|
|
"summary": "Get image manifest",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "image reference or digest",
|
|
"name": "reference",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.ImageManifest"
|
|
},
|
|
"headers": {
|
|
"Docker-Content-Digest": {
|
|
"type": "string",
|
|
"description": "Manifest digest of the content"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"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"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Update image manifest",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "image reference or digest",
|
|
"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",
|
|
"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": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"414": {
|
|
"description": "too many tag query parameters",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete an image's manifest given a reference or a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Delete image manifest",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "image reference or digest",
|
|
"name": "reference",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"head": {
|
|
"description": "Check an image's manifest given a reference or a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Check image manifest",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "image reference or digest",
|
|
"name": "reference",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"headers": {
|
|
"Docker-Content-Digest": {
|
|
"type": "string",
|
|
"description": "Manifest digest of the content"
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/{name}/referrers/{digest}": {
|
|
"get": {
|
|
"description": "Get referrers given a digest",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/vnd.oci.image.index.v1+json"
|
|
],
|
|
"summary": "Get referrers for a given digest",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "digest",
|
|
"name": "digest",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "artifact type",
|
|
"name": "artifactType",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.ImageIndex"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/{name}/tags/list": {
|
|
"get": {
|
|
"description": "List all image tags in a repository",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "List image tags",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "repository name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "limit entries for pagination",
|
|
"name": "n",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "last tag value for pagination",
|
|
"name": "last",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/common.ImageTags"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "not found",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/zot/auth/apikey": {
|
|
"get": {
|
|
"description": "Get list of all API keys for a logged in user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Get list of API keys for the current user",
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Can create an api key for a logged in user, based on the provided label and scopes.",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Create an API key for the current user",
|
|
"parameters": [
|
|
{
|
|
"description": "api token id (UUID)",
|
|
"name": "id",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/api.APIKeyPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "created",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Revokes one current user API key based on given key ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Revokes one current user API key",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "api token id (UUID)",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "unauthorized",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/zot/auth/logout": {
|
|
"post": {
|
|
"description": "Logout by removing current session",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Logout by removing current session",
|
|
"responses": {
|
|
"200": {
|
|
"description": "ok",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "internal server error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"api.APIKeyPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expirationDate": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"scopes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"api.ExtensionList": {
|
|
"type": "object",
|
|
"properties": {
|
|
"extensions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/extensions.Extension"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"api.ImageIndex": {
|
|
"type": "object",
|
|
"properties": {
|
|
"annotations": {
|
|
"description": "Annotations contains arbitrary metadata for the image index.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"artifactType": {
|
|
"description": "ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.",
|
|
"type": "string"
|
|
},
|
|
"manifests": {
|
|
"description": "Manifests references platform specific manifests.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.Descriptor"
|
|
}
|
|
},
|
|
"mediaType": {
|
|
"description": "MediaType specifies the type of this document data structure e.g. ` + "`" + `application/vnd.oci.image.index.v1+json` + "`" + `",
|
|
"type": "string"
|
|
},
|
|
"schemaVersion": {
|
|
"description": "SchemaVersion is the image manifest schema that this image follows",
|
|
"type": "integer"
|
|
},
|
|
"subject": {
|
|
"description": "Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/v1.Descriptor"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"api.ImageManifest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"annotations": {
|
|
"description": "Annotations contains arbitrary metadata for the image manifest.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"artifactType": {
|
|
"description": "ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.",
|
|
"type": "string"
|
|
},
|
|
"config": {
|
|
"description": "Config references a configuration object for a container, by digest.\nThe referenced configuration object is a JSON blob that the runtime uses to set up the container.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/v1.Descriptor"
|
|
}
|
|
]
|
|
},
|
|
"layers": {
|
|
"description": "Layers is an indexed list of layers referenced by the manifest.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.Descriptor"
|
|
}
|
|
},
|
|
"mediaType": {
|
|
"description": "MediaType specifies the type of this document data structure e.g. ` + "`" + `application/vnd.oci.image.manifest.v1+json` + "`" + `",
|
|
"type": "string"
|
|
},
|
|
"schemaVersion": {
|
|
"description": "SchemaVersion is the image manifest schema that this image follows",
|
|
"type": "integer"
|
|
},
|
|
"subject": {
|
|
"description": "Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/v1.Descriptor"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"api.RepositoryList": {
|
|
"type": "object",
|
|
"properties": {
|
|
"repositories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"common.ImageTags": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"extensions.Auth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apikey": {
|
|
"type": "boolean"
|
|
},
|
|
"bearer": {
|
|
"$ref": "#/definitions/extensions.BearerConfig"
|
|
},
|
|
"htpasswd": {
|
|
"$ref": "#/definitions/extensions.HTPasswd"
|
|
},
|
|
"ldap": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"openid": {
|
|
"$ref": "#/definitions/extensions.OpenIDConfig"
|
|
}
|
|
}
|
|
},
|
|
"extensions.BearerConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"realm": {
|
|
"type": "string"
|
|
},
|
|
"service": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"extensions.Extension": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"endpoints": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"extensions.HTPasswd": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"extensions.OpenIDConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"providers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/extensions.OpenIDProviderConfig"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"extensions.OpenIDProviderConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"extensions.StrippedConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"binaryType": {
|
|
"type": "string"
|
|
},
|
|
"commit": {
|
|
"type": "string"
|
|
},
|
|
"distSpecVersion": {
|
|
"type": "string"
|
|
},
|
|
"http": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auth": {
|
|
"$ref": "#/definitions/extensions.Auth"
|
|
}
|
|
}
|
|
},
|
|
"releaseTag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.Descriptor": {
|
|
"type": "object",
|
|
"properties": {
|
|
"annotations": {
|
|
"description": "Annotations contains arbitrary metadata relating to the targeted content.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"artifactType": {
|
|
"description": "ArtifactType is the IANA media type of this artifact.",
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"description": "Data is an embedding of the targeted content. This is encoded as a base64\nstring when marshalled to JSON (automatically, by encoding/json). If\npresent, Data can be used directly to avoid fetching the targeted content.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"digest": {
|
|
"description": "Digest is the digest of the targeted content.",
|
|
"type": "string"
|
|
},
|
|
"mediaType": {
|
|
"description": "MediaType is the media type of the object this schema refers to.",
|
|
"type": "string"
|
|
},
|
|
"platform": {
|
|
"description": "Platform describes the platform which the image in the manifest runs on.\n\nThis should only be used when referring to a manifest.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/v1.Platform"
|
|
}
|
|
]
|
|
},
|
|
"size": {
|
|
"description": "Size specifies the size in bytes of the blob.",
|
|
"type": "integer"
|
|
},
|
|
"urls": {
|
|
"description": "URLs specifies a list of URLs from which this object MAY be downloaded",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.Platform": {
|
|
"type": "object",
|
|
"properties": {
|
|
"architecture": {
|
|
"description": "Architecture field specifies the CPU architecture, for example\n` + "`" + `amd64` + "`" + ` or ` + "`" + `ppc64le` + "`" + `.",
|
|
"type": "string"
|
|
},
|
|
"os": {
|
|
"description": "OS specifies the operating system, for example ` + "`" + `linux` + "`" + ` or ` + "`" + `windows` + "`" + `.",
|
|
"type": "string"
|
|
},
|
|
"os.features": {
|
|
"description": "OSFeatures is an optional field specifying an array of strings,\neach listing a required OS feature (for example on Windows ` + "`" + `win32k` + "`" + `).",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"os.version": {
|
|
"description": "OSVersion is an optional field specifying the operating system\nversion, for example on Windows ` + "`" + `10.0.14393.1066` + "`" + `.",
|
|
"type": "string"
|
|
},
|
|
"variant": {
|
|
"description": "Variant is an optional field specifying a variant of the CPU, for\nexample ` + "`" + `v7` + "`" + ` to specify ARMv7 when architecture is ` + "`" + `arm` + "`" + `.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "v1.1.1",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "Open Container Initiative Distribution Specification",
|
|
Description: "APIs for Open Container Initiative Distribution Specification",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|