diff --git a/img/media-types.dot b/img/media-types.dot index 81e68aa18..2e2304eed 100644 --- a/img/media-types.dot +++ b/img/media-types.dot @@ -3,11 +3,10 @@ digraph G { manifestList [shape=note, label="Manifest list\n<>\napplication/vnd.oci.image.manifest.list.v1+json"] manifest [shape=note, label="Image manifest\napplication/vnd.oci.image.manifest.v1+json"] config [shape=note, label="Image JSON\napplication/vnd.oci.image.config.v1+json"] - layer [shape=note, label="Layer tar+gzip\napplication/vnd.oci.image.layer.tar+gzip"] + layer [shape=note, label="Layer tar+gzip\napplication/vnd.oci.image.layer.tar+gzip\napplication/vnd.oci.image.layer.nondistributable.tar+gzip"] } manifestList -> manifest [label="1..*"] manifest -> config [label="1..1"] manifest -> layer [label="1..*"] - combined } diff --git a/img/media-types.png b/img/media-types.png index a8b944497..6d3049a1d 100644 Binary files a/img/media-types.png and b/img/media-types.png differ diff --git a/schema/manifest_test.go b/schema/manifest_test.go index a4da16e97..821e66824 100644 --- a/schema/manifest_test.go +++ b/schema/manifest_test.go @@ -37,17 +37,18 @@ func TestManifest(t *testing.T) { fail: true, }, - // expected failure: config.size is integer, expected string + // expected failure: config.size is a string, expected integer { manifest: ` { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "config": { - "mediaType": "application/vnd.oci.image.serialization.v1+json", + "mediaType": "application/vnd.oci.image.config.v1+json", "size": "1470", "digest": "sha256:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b" - } + }, + "layers": [] } `, fail: true, @@ -60,14 +61,15 @@ func TestManifest(t *testing.T) { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "config": { - "mediaType": "application/vnd.oci.image.serialization.v1+json", + "mediaType": "application/vnd.oci.image.config.v1+json", "size": 1470, "digest": "sha256:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b" }, "layers": [ { "mediaType": "application/vnd.oci.image.layer.tar+gzip", - "size": "675598" + "size": "675598", + "digest": "sha256:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b" } ] } @@ -82,7 +84,7 @@ func TestManifest(t *testing.T) { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "config": { - "mediaType": "application/vnd.oci.image.serialization.v1+json", + "mediaType": "application/vnd.oci.image.config.v1+json", "size": 1470, "digest": "sha256:c86f7763873b6c0aae22d963bab59b4f5debbed6685761b5951584f6efb0633b" },