Skip to content

Commit

Permalink
Merge pull request #646 from q384566678/json-test
Browse files Browse the repository at this point in the history
Perfect json content
  • Loading branch information
Mrunal Patel authored Jan 11, 2017
2 parents 985b97a + 2d5e0df commit a3dd52f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 7 deletions.
11 changes: 9 additions & 2 deletions schema/config-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit",
"$ref": "defs.json#/definitions/int64"
}
}
},
"required": [
"limit"
]
},
"blockIO": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO",
Expand Down Expand Up @@ -222,7 +225,11 @@
"limit": {
"$ref": "defs.json#/definitions/int64"
}
}
},
"required": [
"pageSize",
"limit"
]
}
},
{
Expand Down
21 changes: 21 additions & 0 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 Down
22 changes: 19 additions & 3 deletions schema/defs-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
},
"Device": {
"type": "object",
"required": [
"type",
"path",
"major",
"minor"
],
"properties": {
"type": {
"$ref": "#/definitions/FileType"
Expand Down Expand Up @@ -249,7 +255,10 @@
"access": {
"$ref": "defs.json#/definitions/stringPointer"
}
}
},
"required": [
"allow"
]
},
"NetworkInterfacePriority": {
"type": "object",
Expand All @@ -260,7 +269,11 @@
"priority": {
"$ref": "defs.json#/definitions/uint32"
}
}
},
"required": [
"name",
"priority"
]
},
"NamespaceType": {
"type": "string",
Expand All @@ -283,7 +296,10 @@
"path": {
"$ref": "defs.json#/definitions/FilePath"
}
}
},
"required": [
"type"
]
}
}
}
7 changes: 6 additions & 1 deletion schema/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@
"size": {
"$ref": "#/definitions/uint32"
}
}
},
"required": [
"hostID",
"containerID",
"size"
]
},
"Mount": {
"type": "object",
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 a3dd52f

Please sign in to comment.