From dcdcb7f2cf08641d03189e5b09be32de5dcfe459 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 3 Nov 2021 14:26:23 -0400 Subject: [PATCH] specs-go: adding `mediaType` to the index and manifest structures Signed-off-by: Vincent Batts --- specs-go/v1/index.go | 3 +++ specs-go/v1/manifest.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/specs-go/v1/index.go b/specs-go/v1/index.go index 4e6c4b236..82da6c6a8 100644 --- a/specs-go/v1/index.go +++ b/specs-go/v1/index.go @@ -21,6 +21,9 @@ import "github.com/opencontainers/image-spec/specs-go" type Index struct { specs.Versioned + // MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` + MediaType string `json:"mediaType,omitempty"` + // Manifests references platform specific manifests. Manifests []Descriptor `json:"manifests"` diff --git a/specs-go/v1/manifest.go b/specs-go/v1/manifest.go index 7ff32c40b..d72d15ce4 100644 --- a/specs-go/v1/manifest.go +++ b/specs-go/v1/manifest.go @@ -20,6 +20,9 @@ import "github.com/opencontainers/image-spec/specs-go" type Manifest struct { specs.Versioned + // MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json` + MediaType string `json:"mediaType,omitempty"` + // Config references a configuration object for a container, by digest. // The referenced configuration object is a JSON blob that the runtime uses to set up the container. Config Descriptor `json:"config"`