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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/uint64"
}
}
},
"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"`
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 ;).

}