From 1a6e7d336ed364982fef5e24349698d8af2d040d Mon Sep 17 00:00:00 2001 From: Brandon Mitchell Date: Wed, 25 Sep 2024 13:52:14 -0400 Subject: [PATCH] Align endpoint status with rest of spec Signed-off-by: Brandon Mitchell --- spec.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spec.md b/spec.md index 6df4996c..d5d769c2 100644 --- a/spec.md +++ b/spec.md @@ -669,12 +669,12 @@ Similarly, a registry MAY implement tag deletion, while others MAY allow deletio ##### Deleting tags +To delete a tag, perform a `DELETE` request to a path in the following format: `/v2//manifests/` [end-9](#endpoints) + `` is the namespace of the repository, and `` is the name of the tag to be deleted. Upon success, the registry MUST respond with a `202 Accepted` code. If tag deletion is disabled, the registry MUST respond with either a `400 Bad Request` or a `405 Method Not Allowed`. -To delete a tag, perform a `DELETE` request to a path in the following format: `/v2//manifests/` [end-9](#endpoints) - Once deleted, a `GET` to `/v2//manifests/` will return a 404. ##### Deleting Manifests @@ -684,6 +684,7 @@ To delete a manifest, perform a `DELETE` request to a path in the following form `` is the namespace of the repository, and `` is the digest of the manifest to be deleted. Upon success, the registry MUST respond with a `202 Accepted` code. If the repository does not exist, the response MUST return `404 Not Found`. +If manifest deletion is disabled, the registry MUST respond with either a `400 Bad Request` or a `405 Method Not Allowed`. Once deleted, a `GET` to `/v2//manifests/` and any tag pointing to that digest will return a 404. @@ -703,6 +704,7 @@ To delete a blob, perform a `DELETE` request to a path in the following format: `` is the namespace of the repository, and `` is the digest of the blob to be deleted. Upon success, the registry MUST respond with code `202 Accepted`. If the blob is not found, a `404 Not Found` code MUST be returned. +If blob deletion is disabled, the registry MUST respond with either a `400 Bad Request` or a `405 Method Not Allowed`. ### Backwards Compatibility @@ -768,12 +770,12 @@ This endpoint MAY be used for authentication/authorization purposes, but this is | end-4b | `POST` | `/v2//blobs/uploads/?digest=` | `201`/`202` | `404`/`400` | | end-5 | `PATCH` | `/v2//blobs/uploads/` | `202` | `404`/`416` | | end-6 | `PUT` | `/v2//blobs/uploads/?digest=` | `201` | `404`/`400` | -| end-7 | `PUT` | `/v2//manifests/` | `201` | `404` | +| end-7 | `PUT` | `/v2//manifests/` | `201` | `404`/`413` | | end-8a | `GET` | `/v2//tags/list` | `200` | `404` | | end-8b | `GET` | `/v2//tags/list?n=&last=` | `200` | `404` | | end-9 | `DELETE` | `/v2//manifests/` | `202` | `404`/`400`/`405` | -| end-10 | `DELETE` | `/v2//blobs/` | `202` | `404`/`405` | -| end-11 | `POST` | `/v2//blobs/uploads/?mount=&from=` | `201` | `404` | +| end-10 | `DELETE` | `/v2//blobs/` | `202` | `404`/`400`/`405` | +| end-11 | `POST` | `/v2//blobs/uploads/?mount=&from=` | `201`/`202` | `404` | | end-12a | `GET` | `/v2//referrers/` | `200` | `404`/`400` | | end-12b | `GET` | `/v2//referrers/?artifactType=` | `200` | `404`/`400` | | end-13 | `GET` | `/v2//blobs/uploads/` | `204` | `404` |