From 89384541cce6c78401b53355589c4fdc5b56469c Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Thu, 24 Nov 2022 23:21:18 +0100 Subject: [PATCH] Fix json formatting in registry api docs Signed-off-by: Ilion Beyst --- docs/spec/api.md | 123 +++++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/docs/spec/api.md b/docs/spec/api.md index b8a3df996..b463d8bb8 100644 --- a/docs/spec/api.md +++ b/docs/spec/api.md @@ -266,7 +266,8 @@ are reported as part of 4xx responses, in a json response body. One or more errors will be returned in the following format: { - "errors": [{ + "errors": [ + { "code": , "message": , "detail": @@ -434,17 +435,16 @@ manifest will be returned, with the following format (see [docker/docker#8093](https://github.com/docker/docker/issues/8093) for details): { - "name": , - "tag": , - "fsLayers": [ - { - "blobSum": - }, - ... - ] - ], - "history": , - "signature": + "name": , + "tag": , + "fsLayers": [ + { + "blobSum": + }, + ... + ], + "history": , + "signature": } The client should verify the returned manifest signature for authenticity @@ -825,18 +825,17 @@ image manifest. An image can be pushed using the following request format: Content-Type: { - "name": , - "tag": , - "fsLayers": [ - { - "blobSum": - }, - ... - ] - ], - "history": , - "signature": , - ... + "name": , + "tag": , + "fsLayers": [ + { + "blobSum": + }, + ... + ], + "history": , + "signature": , + ... } The `name` and `reference` fields of the response body must match those @@ -855,7 +854,8 @@ identifying the missing blob. An error is returned for each unknown blob. The response format is as follows: { - "errors": [{ + "errors": [ + { "code": "BLOB_UNKNOWN", "message": "blob unknown to registry", "detail": { @@ -886,10 +886,10 @@ The response will be in the following format: Content-Type: application/json { - "repositories": [ - , - ... - ] + "repositories": [ + , + ... + ] } ``` @@ -933,10 +933,10 @@ Content-Type: application/json Link: <?n=&last=>; rel="next" { - "repositories": [ - , - ... - ] + "repositories": [ + , + ... + ] } ``` @@ -1043,11 +1043,11 @@ Content-Type: application/json Link: <?n=&last=>; rel="next" { - "name": , - "tags": [ - , - ... - ] + "name": , + "tags": [ + , + ... + ] } ``` @@ -1764,17 +1764,16 @@ Docker-Content-Digest: Content-Type: { - "name": , - "tag": , - "fsLayers": [ - { - "blobSum": "" - }, - ... - ] - ], - "history": , - "signature": + "name": , + "tag": , + "fsLayers": [ + { + "blobSum": "" + }, + ... + ], + "history": , + "signature": } ``` @@ -1984,17 +1983,16 @@ Authorization: Content-Type: { - "name": , - "tag": , - "fsLayers": [ - { - "blobSum": "" - }, - ... - ] - ], - "history": , - "signature": + "name": , + "tag": , + "fsLayers": [ + { + "blobSum": "" + }, + ... + ], + "history": , + "signature": } ``` @@ -2226,7 +2224,8 @@ The error codes that may be included in the response body are enumerated below: Content-Type: application/json { - "errors": [{ + "errors": [ + { "code": "BLOB_UNKNOWN", "message": "blob unknown to registry", "detail": { @@ -5499,7 +5498,7 @@ Content-Type: application/json "repositories": [ , ... - ] + ], "next": "?last=&n=" } ```