From 3f728132d29c8d8cb5a9b81998c52a9d86e8f6e3 Mon Sep 17 00:00:00 2001 From: Zhai Zhao Xuan Date: Wed, 25 Jan 2017 09:39:48 +0800 Subject: [PATCH] schema: allow Device.fileMode set to null. The `fileMode` is marked optional in the description (https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#devices) In spec-go, fileMode can be set to null. (https://github.com/opencontainers/runtime-spec/blob/master/specs-go/config.go#L347). However, in the schema, a null type is not allowed for fileMode. This patch allows fileMode set to null, and consistent with other optional fields. Signed-off-by: Zhai Zhao Xuan --- schema/defs-linux.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/schema/defs-linux.json b/schema/defs-linux.json index 37a4c855b..55586a0a8 100644 --- a/schema/defs-linux.json +++ b/schema/defs-linux.json @@ -117,7 +117,14 @@ "$ref": "defs.json#/definitions/FilePath" }, "fileMode": { - "$ref": "#/definitions/FileMode" + "oneOf": [ + { + "$ref": "#/definitions/FileMode" + }, + { + "type": "null" + } + ] }, "major": { "$ref": "#/definitions/Major"