Skip to content

Commit

Permalink
Perfect json content
Browse files Browse the repository at this point in the history
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
  • Loading branch information
zhouhao committed Jan 5, 2017
1 parent ced3365 commit b0228e5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
29 changes: 26 additions & 3 deletions schema/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
"description": "Configures the container's root filesystem.",
"id": "https://opencontainers.org/schema/bundle/root",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"id": "https://opencontainers.org/schema/bundle/root/path",
Expand All @@ -82,6 +85,24 @@
"id": "https://opencontainers.org/schema/bundle/process/args",
"$ref": "defs.json#/definitions/ArrayOfStrings"
},
"consoleSize": {
"id": "https://opencontainers.org/schema/bundle/process/consoleSize",
"type": "object",
"required": [
"height",
"width"
],
"properties": {
"height": {
"id": "https://opencontainers.org/schema/bundle/process/consoleSize/height",
"$ref": "defs.json#/definitions/unit64"
},
"width": {
"id": "https://opencontainers.org/schema/bundle/process/consoleSize/width",
"$ref": "defs.json#/definitions/unit64"
}
}
},
"cwd": {
"id": "https://opencontainers.org/schema/bundle/process/cwd",
"type": "string"
Expand All @@ -97,6 +118,10 @@
"user": {
"id": "https://opencontainers.org/schema/bundle/process/user",
"type": "object",
"required": [
"uid",
"gid"
],
"properties": {
"uid": {
"id": "https://opencontainers.org/schema/bundle/process/user/uid",
Expand Down Expand Up @@ -170,8 +195,6 @@
"ociVersion",
"platform",
"process",
"root",
"mounts",
"hooks"
"root"
]
}
2 changes: 1 addition & 1 deletion specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
// Annotations contains arbitrary metadata for the container.
Annotations map[string]string `json:"annotations,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion specs-go/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

0 comments on commit b0228e5

Please sign in to comment.