-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
schema/config-linux: fix namespace based on runtime spec #555
schema/config-linux: fix namespace based on runtime spec #555
Conversation
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
I don't see a need to support ‘null’ when callers can use an empty type Linux struct { so I expect that will either generate non-empty array or However, my only concern with allowing ‘null’ is that it makes the |
On 09/07/2016 02:40 AM, W. Trevor King wrote:
That's right.
I agree. |
On Tue, Sep 06, 2016 at 10:46:43PM -0700, Ma Shimiao wrote:
Right. I'm saying I prefer making making ‘null’ invalid, because in On the other hand, those are small slightlies, so I'm ok with allowing |
ping @opencontainers/runtime-spec-maintainers |
I agree with not allowing null for an array. |
We discussed this on the call and decided that having null doesn't make sense. |
Maintainers feel (and I agree) that there's no point in explicitly allowing a null value when callers can simply leave the property unset [1]. This commit removes all references to "pointer" and "null" from the JSON Schema to support that decision. While optional properties may sometimes be represented as pointer types in Go [2], optional properties should be represented in JSON Schema by not including the properties in the 'required' array. [1]: opencontainers#555 (comment) [2]: style.md "Optional settings should not have pointer Go types" Signed-off-by: W. Trevor King <wking@tremily.us>
Maintainers feel (and I agree) that there's no point in explicitly allowing a null value when callers can simply leave the property unset [1]. This commit removes all references to "pointer" and "null" from the JSON Schema to support that decision. While optional properties may sometimes be represented as pointer types in Go [2], optional properties should be represented in JSON Schema by not including the properties in the 'required' array. [1]: opencontainers#555 (comment) [2]: style.md "Optional settings should not have pointer Go types" Signed-off-by: W. Trevor King <wking@tremily.us>
Catch the Markdown spec up with the JSON Schema change in 0927437 (schema: Drop pointers and nulls, 2017-01-18, opencontainers#662). The Markdown is canonical, so we could restore the explicit-null handling to the JSON Schema instead, but the maintainers feel (and I agree) that there's no point in explicitly allowing a null value when callers can simply leave the property unset [1]. [1]: opencontainers#555 (comment) Signed-off-by: W. Trevor King <wking@tremily.us>
Catch the Markdown spec up with the JSON Schema change in 0927437 (schema: Drop pointers and nulls, 2017-01-18, opencontainers#662). The Markdown is canonical, so we could restore the explicit-null handling to the JSON Schema instead, but the maintainers feel (and I agree) that there's no point in explicitly allowing a null value when callers can simply leave the property unset [1]. [1]: opencontainers#555 (comment) Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com