Skip to content

Commit

Permalink
Merge pull request #1020 from vbatts/index_subject
Browse files Browse the repository at this point in the history
image-index: add the `subject` field
  • Loading branch information
vbatts committed Jun 15, 2023
2 parents 1d91a83 + c6854a6 commit 0851531
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions image-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ For the media type(s) that this document is compatible with, see the [matrix][ma

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

- **`subject`** *[descriptor](descriptor.md)*

This OPTIONAL property specifies a [descriptor](descriptor.md) of another manifest.
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.

- **`annotations`** *string-string map*

This OPTIONAL property contains arbitrary metadata for the image index.
Expand Down
3 changes: 3 additions & 0 deletions schema/image-index-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"description": "the mediatype of the referenced object",
"$ref": "defs-descriptor.json#/definitions/mediaType"
},
"subject": {
"$ref": "content-descriptor.json"
},
"manifests": {
"type": "array",
"items": {
Expand Down
3 changes: 3 additions & 0 deletions specs-go/v1/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ type Index struct {
// Manifests references platform specific manifests.
Manifests []Descriptor `json:"manifests"`

// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.
Subject *Descriptor `json:"subject,omitempty"`

// Annotations contains arbitrary metadata for the image index.
Annotations map[string]string `json:"annotations,omitempty"`
}

0 comments on commit 0851531

Please sign in to comment.