-
Notifications
You must be signed in to change notification settings - Fork 553
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
Perfect json content #646
Conversation
b0228e5
to
1bd1fe3
Compare
@@ -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"` |
There was a problem hiding this comment.
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"` |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -89,7 +89,10 @@ | |||
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit", | |||
"$ref": "defs.json#/definitions/int64" | |||
} | |||
} | |||
}, | |||
"required": [ |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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>
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com