Skip to content

Commit 3f72813

Browse files
committed
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 <[email protected]>
1 parent 3297cd5 commit 3f72813

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

schema/defs-linux.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,14 @@
117117
"$ref": "defs.json#/definitions/FilePath"
118118
},
119119
"fileMode": {
120-
"$ref": "#/definitions/FileMode"
120+
"oneOf": [
121+
{
122+
"$ref": "#/definitions/FileMode"
123+
},
124+
{
125+
"type": "null"
126+
}
127+
]
121128
},
122129
"major": {
123130
"$ref": "#/definitions/Major"

0 commit comments

Comments
 (0)