Skip to content

Commit

Permalink
add codeblock titles
Browse files Browse the repository at this point in the history
Signed-off-by: Dasith Wijesiriwardena <[email protected]>
  • Loading branch information
dasiths committed Aug 8, 2023
1 parent e77b00e commit c117be5
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit c117be5

Please sign in to comment.