From acd8a30618d50d067c5c79b46220e95c86b13de1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 27 Jan 2017 21:23:14 -0800 Subject: [PATCH] schema/defs-image: Remove 'null' from valid annotations The 'null' option has been in the JSON Schema since 78c7ff7f (manifest: add annotations, 2016-04-27, #44), although I expect it was accidental. The spec has clearly not allowed: "annotations": null since 873b9b64 (Add some text about extensions, 2016-06-26, #164) landed with the following (still current) requirements: Annotations MUST be a key-value map where both the key and value MUST be strings. and: If there are no annotations then this property MUST either be absent or be an empty map. Folks without annotations should not set the property at all, or they should set it to: "annotations": {} Signed-off-by: W. Trevor King --- schema/defs-image.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/schema/defs-image.json b/schema/defs-image.json index ad584dac0..c2623c053 100644 --- a/schema/defs-image.json +++ b/schema/defs-image.json @@ -83,14 +83,7 @@ }, "annotations": { "id": "https://opencontainers.org/schema/image/annotations", - "oneOf": [ - { - "$ref": "defs.json#/definitions/mapStringString" - }, - { - "type": "null" - } - ] + "$ref": "defs.json#/definitions/mapStringString" } } }