Skip to content

Commit dcdcb7f

Browse files
committed
specs-go: adding mediaType to the index and manifest structures
Signed-off-by: Vincent Batts <[email protected]>
1 parent 5f31485 commit dcdcb7f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

specs-go/v1/index.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import "github.com/opencontainers/image-spec/specs-go"
2121
type Index struct {
2222
specs.Versioned
2323

24+
// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
25+
MediaType string `json:"mediaType,omitempty"`
26+
2427
// Manifests references platform specific manifests.
2528
Manifests []Descriptor `json:"manifests"`
2629

specs-go/v1/manifest.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import "github.com/opencontainers/image-spec/specs-go"
2020
type Manifest struct {
2121
specs.Versioned
2222

23+
// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
24+
MediaType string `json:"mediaType,omitempty"`
25+
2326
// Config references a configuration object for a container, by digest.
2427
// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
2528
Config Descriptor `json:"config"`

0 commit comments

Comments
 (0)