Skip to content

schema: allow Device.fileMode set to null. - #670

Closed
Kxuan wants to merge 1 commit into
opencontainers:masterfrom
Kxuan:optional_fileMode
Closed

schema: allow Device.fileMode set to null.#670
Kxuan wants to merge 1 commit into
opencontainers:masterfrom
Kxuan:optional_fileMode

Conversation

@Kxuan

@KxuanKxuan commented Jan 25, 2017

Copy link
Copy Markdown

The fileMode is marked optional in the description
In spec-go, fileMode can be set to null.
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.

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 ZhaoXuan <zhaizx.fnst@cn.fujitsu.com>
@wking

wking commented Jan 25, 2017 via email

Copy link
Copy Markdown
Contributor

@Kxuan

Copy link
Copy Markdown
Author

specs-go has it as an omitempty pointer, so instead of setting it to
null in the JSON, you should not set the property at all. More on
this in #662 and in [1].

@wking ok, but I think we should make the optional fields unified. All of them could accept null or all of them could not accept null.

@wking

Copy link
Copy Markdown
Contributor

I think we should make the optional fields unified. All of them could accept null or all of them could not accept null.

I agree. #662 removes all instances of null from the JSON Schema, after which it will be consistent.

@mikebrow

mikebrow commented Feb 2, 2017

Copy link
Copy Markdown
Member

So we're closing this PR in lieu of 662 correct?

@KxuanKxuan closed this Feb 5, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Kxuan@wking@mikebrow