Skip to content
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

Perfect json content #646

Merged
merged 1 commit into from
Jan 11, 2017
Merged

Perfect json content #646

merged 1 commit into from
Jan 11, 2017

Conversation

zhouhao3
Copy link

@zhouhao3 zhouhao3 commented Jan 5, 2017

Signed-off-by: zhouhao zhouhao@cn.fujitsu.com

@zhouhao3 zhouhao3 force-pushed the json-test branch 2 times, most recently from b0228e5 to 1bd1fe3 Compare January 5, 2017 06:17
@@ -17,7 +17,7 @@ type Spec struct {
// Mounts configures additional mounts (on top of Root).
Mounts []Mount `json:"mounts,omitempty"`
// Hooks configures callbacks for container lifecycle events.
Hooks Hooks `json:"hooks"`
Hooks Hooks `json:"hooks,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is covered in #427.

@@ -13,5 +13,5 @@ type State struct {
// BundlePath is the path to the container's bundle directory.
BundlePath string `json:"bundlePath"`
// Annotations are the annotations associated with the container.
Annotations map[string]string `json:"annotations"`
Annotations map[string]string `json:"annotations,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The in-flight #507 is adding the associated REQUIRED and OPTIONAL wording to runtime.md.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is optional, it should not be so modified?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding omitempty (as you do here and as #507 does not do) makes sense. Adding REQUIRED/OPTIONAL to the Markdown spec (as #507 does and you do not do here) also makes sense. Once both PRs land, we'll be in the right place ;).

@@ -89,7 +89,10 @@
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit",
"$ref": "defs.json#/definitions/int64"
}
}
},
"required": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indent. Try running make fmt from the schema directory.

@@ -97,6 +118,10 @@
"user": {
"id": "https://opencontainers.org/schema/bundle/process/user",
"type": "object",
"required": [
"uid",
"gid"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only required on Linux/Solaris, and there's no way to enforce that constraint in JSON Schema without some serious oneOf hoop-jumping.

@@ -170,8 +195,6 @@
"ociVersion",
"platform",
"process",
"root",
"mounts",
"hooks"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing hooks is covered by the in-flight #427.

Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
@crosbymichael
Copy link
Member

crosbymichael commented Jan 11, 2017

LGTM

Approved with PullApprove

@RobDolinMS RobDolinMS added this to the 1.0.0 milestone Jan 11, 2017
@mrunalp
Copy link
Contributor

mrunalp commented Jan 11, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit a3dd52f into opencontainers:master Jan 11, 2017
@zhouhao3 zhouhao3 deleted the json-test branch January 12, 2017 02:35
Sign up for free to 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.

5 participants