diff --git a/manifest.md b/manifest.md index 415635f80..6ccf01ad3 100644 --- a/manifest.md +++ b/manifest.md @@ -179,7 +179,8 @@ The design of the artifact depends on what content is being packaged with the ar The decision tree below MAY be used to structure your artifact: 1. Does the artifact consist of at least one file or blob? If yes, continue to 2. If no, specify the `artifactType`, and set the `config` and `layers` to their empty descriptor values. - ```json + + ```json,title=Artifact%20with%20annotations%20and%20artifactType=application/vnd.example%2Btype { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", @@ -202,12 +203,14 @@ The decision tree below MAY be used to structure your artifact: } } ``` + 2. Does the artifact have additional JSON formatted metadata as configuration? If yes, continue to 3. If no, specify the `artifactType`, include the artifact in the `layers`, and set `config` to the empty descriptor value. - ```json + + ```json,title=Artifact%20with%20artifactType=application/vnd.example%2Btype%20and%20layers { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", - "artifactType": "application/vnd.example+type1", + "artifactType": "application/vnd.example+type", "config": { "mediaType": "application/vnd.oci.empty.v1+json", "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", @@ -220,10 +223,12 @@ The decision tree below MAY be used to structure your artifact: "size": 1234 } ] - } + } ``` + 3. Does the artifact require a different `artifactType` from the `config.mediaType`, to support multiple configuration formats or versions for the same artifact tooling? If yes, continue to 4. If no, specify the `config` with the metadata, include the artifact in the `layers`, but do not set the `artifactType`. - ```json + + ```json,title=Artifact%20with%20metadata%20config.mediaType=application/vnd.example%2Btype%20and%20layers { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", @@ -241,13 +246,14 @@ The decision tree below MAY be used to structure your artifact: ] } ``` + 4. Specify the `artifactType` to a common value for your artifact tooling, specify the `config` with the metadata for this artifact, and include the artifact in the `layers`. - ```json + ```json,title=Artifact%20with%20metadata%20artifactType=application/vnd.example%2Btype%20with%20config.mediaType=application/vnd.example.config.v1%2Bjson%20and%20layers { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", - "artifactType": "application/vnd.example+type1", + "artifactType": "application/vnd.example+type", "config": { "mediaType": "application/vnd.example.config.v1+json", "digest": "sha256:5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03",