Skip to content

Commit 0851531

Browse files
authored
Merge pull request #1020 from vbatts/index_subject
image-index: add the `subject` field
2 parents 1d91a83 + c6854a6 commit 0851531

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

image-index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
9090

9191
If multiple manifests match a client or runtime's requirements, the first matching entry SHOULD be used.
9292

93+
- **`subject`** *[descriptor](descriptor.md)*
94+
95+
This OPTIONAL property specifies a [descriptor](descriptor.md) of another manifest.
96+
This value, used by the [`referrers` API](https://github.com/opencontainers/distribution-spec/blob/main/spec.md#listing-referrers), indicates a relationship to the specified manifest.
97+
9398
- **`annotations`** *string-string map*
9499

95100
This OPTIONAL property contains arbitrary metadata for the image index.

schema/image-index-schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
"description": "the mediatype of the referenced object",
1616
"$ref": "defs-descriptor.json#/definitions/mediaType"
1717
},
18+
"subject": {
19+
"$ref": "content-descriptor.json"
20+
},
1821
"manifests": {
1922
"type": "array",
2023
"items": {

specs-go/v1/index.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ type Index struct {
2727
// Manifests references platform specific manifests.
2828
Manifests []Descriptor `json:"manifests"`
2929

30+
// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.
31+
Subject *Descriptor `json:"subject,omitempty"`
32+
3033
// Annotations contains arbitrary metadata for the image index.
3134
Annotations map[string]string `json:"annotations,omitempty"`
3235
}

0 commit comments

Comments
 (0)