diff --git a/schema/config-linux.json b/schema/config-linux.json index 518b71ae7..e83b43f25 100644 --- a/schema/config-linux.json +++ b/schema/config-linux.json @@ -89,7 +89,10 @@ "id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit", "$ref": "defs.json#/definitions/int64" } - } + }, + "required": [ + "limit" + ] }, "blockIO": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO", @@ -222,7 +225,11 @@ "limit": { "$ref": "defs.json#/definitions/uint64" } - } + }, + "required": [ + "pageSize", + "limit" + ] } }, { diff --git a/schema/config-schema.json b/schema/config-schema.json index 95113a800..94808e839 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -59,6 +59,9 @@ "description": "Configures the container's root filesystem.", "id": "https://opencontainers.org/schema/bundle/root", "type": "object", + "required": [ + "path" + ], "properties": { "path": { "id": "https://opencontainers.org/schema/bundle/root/path", @@ -82,6 +85,24 @@ "id": "https://opencontainers.org/schema/bundle/process/args", "$ref": "defs.json#/definitions/ArrayOfStrings" }, + "consoleSize": { + "id": "https://opencontainers.org/schema/bundle/process/consoleSize", + "type": "object", + "required": [ + "height", + "width" + ], + "properties": { + "height": { + "id": "https://opencontainers.org/schema/bundle/process/consoleSize/height", + "$ref": "defs.json#/definitions/unit64" + }, + "width": { + "id": "https://opencontainers.org/schema/bundle/process/consoleSize/width", + "$ref": "defs.json#/definitions/unit64" + } + } + }, "cwd": { "id": "https://opencontainers.org/schema/bundle/process/cwd", "type": "string" diff --git a/schema/defs-linux.json b/schema/defs-linux.json index 9ccad6b06..0cecb14a0 100644 --- a/schema/defs-linux.json +++ b/schema/defs-linux.json @@ -106,6 +106,12 @@ }, "Device": { "type": "object", + "required": [ + "type", + "path", + "major", + "minor" + ], "properties": { "type": { "$ref": "#/definitions/FileType" @@ -249,7 +255,10 @@ "access": { "$ref": "defs.json#/definitions/stringPointer" } - } + }, + "required": [ + "allow" + ] }, "NetworkInterfacePriority": { "type": "object", @@ -260,7 +269,11 @@ "priority": { "$ref": "defs.json#/definitions/uint32" } - } + }, + "required": [ + "name", + "priority" + ] }, "NamespaceType": { "type": "string", @@ -283,7 +296,10 @@ "path": { "$ref": "defs.json#/definitions/FilePath" } - } + }, + "required": [ + "type" + ] } } } diff --git a/schema/defs.json b/schema/defs.json index aa03170af..89523607d 100644 --- a/schema/defs.json +++ b/schema/defs.json @@ -163,7 +163,12 @@ "size": { "$ref": "#/definitions/uint32" } - } + }, + "required": [ + "hostID", + "containerID", + "size" + ] }, "Mount": { "type": "object", diff --git a/specs-go/state.go b/specs-go/state.go index a74874ed5..cecfa408e 100644 --- a/specs-go/state.go +++ b/specs-go/state.go @@ -13,5 +13,5 @@ type State struct { // BundlePath is the path to the container's bundle directory. BundlePath string `json:"bundlePath"` // Annotations are the annotations associated with the container. - Annotations map[string]string `json:"annotations"` + Annotations map[string]string `json:"annotations,omitempty"` }