Skip to content

Commit 5969565

Browse files
committed
schema: Limit schemaVersion to 2 and enumerate mediaType
For manifests and manifest lists, to match the requirements from their Markdown definitions. Signed-off-by: W. Trevor King <[email protected]>
1 parent c4b16c3 commit 5969565

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

schema/image-manifest-schema.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77
"schemaVersion": {
88
"description": "This field specifies the image manifest schema version as an integer",
99
"id": "https://opencontainers.org/schema/image/manifest/schemaVersion",
10-
"type": "integer"
10+
"type": "integer",
11+
"minimum": 2,
12+
"maximum": 2
1113
},
1214
"mediaType": {
1315
"id": "https://opencontainers.org/schema/image/manifest/mediaType",
14-
"$ref": "defs-image.json#/definitions/mediaType"
16+
"type": "string",
17+
"enum": [
18+
"application/vnd.oci.image.manifest.v1+json"
19+
]
1520
},
1621
"config": {
1722
"$ref": "content-descriptor.json"

schema/manifest-list-schema.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77
"schemaVersion": {
88
"description": "This field specifies the image manifest-list schema version as an integer",
99
"id": "https://opencontainers.org/schema/image/manifest-list/schemaVersion",
10-
"type": "integer"
10+
"type": "integer",
11+
"minimum": 2,
12+
"maximum": 2
1113
},
1214
"mediaType": {
1315
"id": "https://opencontainers.org/schema/image/manifest-list/mediaType",
14-
"$ref": "defs-image.json#/definitions/mediaType"
16+
"type": "string",
17+
"enum": [
18+
"application/vnd.oci.image.manifest.list.v1+json"
19+
]
1520
},
1621
"manifests": {
1722
"type": "array",

0 commit comments

Comments
 (0)