File tree 3 files changed +32
-0
lines changed
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 15
15
"description" : " the mediatype of the referenced object" ,
16
16
"$ref" : " defs-descriptor.json#/definitions/mediaType"
17
17
},
18
+ "artifactType" : {
19
+ "description" : " the artifact mediatype of the referenced object" ,
20
+ "$ref" : " defs-descriptor.json#/definitions/mediaType"
21
+ },
18
22
"subject" : {
19
23
"$ref" : " content-descriptor.json"
20
24
},
Original file line number Diff line number Diff line change @@ -227,6 +227,31 @@ func TestImageIndex(t *testing.T) {
227
227
}
228
228
]
229
229
}
230
+ ` ,
231
+ fail : false ,
232
+ },
233
+
234
+ // valid image index with artifactType and manifests
235
+ {
236
+ imageIndex : `
237
+ {
238
+ "schemaVersion": 2,
239
+ "mediaType" : "application/vnd.oci.image.index.v1+json",
240
+ "artifactType": "application/vnd.example+type",
241
+ "manifests": [
242
+ {
243
+ "mediaType": "application/vnd.oci.image.manifest.v1+json",
244
+ "size": 7143,
245
+ "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270"
246
+ },
247
+ {
248
+ "mediaType": "application/vnd.oci.image.manifest.v1+json",
249
+ "artifactType": "application/vnd.example1+type",
250
+ "size": 506,
251
+ "digest": "sha256:99953afc4b90c7d78079d189ae10da0a1002e6be5e9e8dedaf9f7f29def42111"
252
+ }
253
+ ]
254
+ }
230
255
` ,
231
256
fail : false ,
232
257
},
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ type Index struct {
24
24
// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
25
25
MediaType string `json:"mediaType,omitempty"`
26
26
27
+ // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.
28
+ ArtifactType string `json:"artifactType,omitempty"`
29
+
27
30
// Manifests references platform specific manifests.
28
31
Manifests []Descriptor `json:"manifests"`
29
32
You can’t perform that action at this time.
0 commit comments