Skip to content

Commit

Permalink
schema: allow Device.fileMode set to null.
Browse files Browse the repository at this point in the history
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 <kxuanobj@gmail.com>
  • Loading branch information
Kxuan committed Jan 25, 2017
1 parent 3297cd5 commit 3f72813
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion schema/defs-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@
"$ref": "defs.json#/definitions/FilePath"
},
"fileMode": {
"$ref": "#/definitions/FileMode"
"oneOf": [
{
"$ref": "#/definitions/FileMode"
},
{
"type": "null"
}
]
},
"major": {
"$ref": "#/definitions/Major"
Expand Down

0 comments on commit 3f72813

Please sign in to comment.