diff --git a/schema/defs-linux.json b/schema/defs-linux.json index 0d31897f9..1964e90e5 100644 --- a/schema/defs-linux.json +++ b/schema/defs-linux.json @@ -97,8 +97,8 @@ }, "blkioWeightPointer": { "oneOf": [ - { "type": "null" }, - { "$ref": "#/definitions/blkioWeight" } + { "$ref": "#/definitions/blkioWeight" }, + { "type": "null" } ] }, "blockIODevice": { @@ -125,8 +125,8 @@ }, "blockIODeviceWeightPointer": { "oneOf": [ - { "type": "null" }, - { "$ref": "#/definitions/blockIODeviceWeight" } + { "$ref": "#/definitions/blockIODeviceWeight" }, + { "type": "null" } ] }, "blockIODeviceThrottle": { @@ -141,8 +141,8 @@ }, "blockIODeviceThrottlePointer": { "oneOf": [ - { "type": "null" }, - { "$ref": "#/definitions/blockIODeviceThrottle" } + { "$ref": "#/definitions/blockIODeviceThrottle" }, + { "type": "null" } ] }, "NetworkInterfacePriority": { diff --git a/schema/defs.json b/schema/defs.json index 8f7052245..a2cd01376 100644 --- a/schema/defs.json +++ b/schema/defs.json @@ -43,14 +43,20 @@ }, "uint16Pointer": { "oneOf": [ - { "type": "null" }, - { "$ref": "#/definitions/uint16" } + { "$ref": "#/definitions/uint16" }, + { "type": "null" } ] }, "uint64Pointer": { "oneOf": [ - { "type": "null" }, - { "$ref": "#/definitions/uint64" } + { "$ref": "#/definitions/uint64" }, + { "type": "null" } + ] + }, + "stringPointer": { + "oneOf": [ + { "type": "string" }, + { "type": "null" } ] }, "mapStringString": { diff --git a/schema/schema.json b/schema/schema.json index e719b9087..a1d4bb6c9 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -91,41 +91,41 @@ "blkioThrottleReadBpsDevice": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleReadBpsDevice", "oneOf": [ - { "type": "null" }, { "type": "array", "items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ] - } + }, + { "type": "null" } ] }, "blkioThrottleWriteBpsDevice": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleWriteBpsDevice", "oneOf": [ - { "type": "null" }, { "type": "array", "items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ] - } + }, + { "type": "null" } ] }, "blkioThrottleReadIopsDevice": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleReadIopsDevice", "oneOf": [ - { "type": "null" }, { "type": "array", "items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ] - } + }, + { "type": "null" } ] }, "blkioThrottleWriteIopsDevice": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/blockIO/blkioThrottleWriteIopsDevice", "oneOf": [ - { "type": "null" }, { "type": "array", "items": [ { "$ref": "defs-linux.json#/definitions/blockIODeviceThrottlePointer" } ] - } + }, + { "type": "null" } ] }, "blkioWeightDevice": { @@ -142,31 +142,31 @@ "properties": { "cpus": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/cpus", - "type": "string" + "$ref": "defs.json#/definitions/stringPointer" }, "mems": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/mems", - "type": "string" + "$ref": "defs.json#/definitions/stringPointer" }, "period": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/period", - "$ref": "defs.json#/definitions/uint64" + "$ref": "defs.json#/definitions/uint64Pointer" }, "quota": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/quota", - "$ref": "defs.json#/definitions/uint64" + "$ref": "defs.json#/definitions/uint64Pointer" }, "realtimePeriod": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/realtimePeriod", - "$ref": "defs.json#/definitions/uint64" + "$ref": "defs.json#/definitions/uint64Pointer" }, "realtimeRuntime": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/realtimeRuntime", - "$ref": "defs.json#/definitions/uint64" + "$ref": "defs.json#/definitions/uint64Pointer" }, "shares": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/cpu/shares", - "$ref": "defs.json#/definitions/uint64" + "$ref": "defs.json#/definitions/uint64Pointer" } }, "type": "object" @@ -190,29 +190,29 @@ }, "memory": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/memory", + "type": "object", "properties": { "kernel": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/kernel", - "type": "integer" + "$ref": "defs.json#/definitions/uint64Pointer" }, "limit": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/limit", - "type": "integer" + "$ref": "defs.json#/definitions/uint64Pointer" }, "reservation": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/reservation", - "type": "integer" + "$ref": "defs.json#/definitions/uint64Pointer" }, "swap": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/swap", - "type": "integer" + "$ref": "defs.json#/definitions/uint64Pointer" }, "swappiness": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/memory/swappiness", - "type": "integer" + "$ref": "defs.json#/definitions/uint64Pointer" } - }, - "type": "object" + } }, "network": { "id": "https://www.opencontainers.org/jsonschema/linux/resources/network",