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

schema: fix items based on latest spec #655

Merged
merged 1 commit into from
Jan 18, 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
4 changes: 4 additions & 0 deletions schema/config-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernel",
"$ref": "defs.json#/definitions/int64Pointer"
},
"kernelTCP": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernelTCP",
"$ref": "defs.json#/definitions/int64Pointer"
Copy link
Contributor

Choose a reason for hiding this comment

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

We definitely need a kernelTCP entry (catching up with #235), but after #555 I'm not sure we want to use pointers here. The optional-ness is represented in JSON Schema by not listing these properties in a required array; we don't have to (or want to?) allow people to explicitly set a null value.

},
"limit": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/memory/limit",
"$ref": "defs.json#/definitions/int64Pointer"
Expand Down
24 changes: 16 additions & 8 deletions schema/defs-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@
"minimum": 0,
"maximum": 512
},
"FilePermissions": {
"type": "string"
},
"FileType": {
"description": "Type of a block or special character device",
"type": "string",
Expand All @@ -116,9 +113,6 @@
"type": {
"$ref": "#/definitions/FileType"
},
"permissions": {
"$ref": "#/definitions/FilePermissions"
},
"path": {
"$ref": "defs.json#/definitions/FilePath"
},
Expand All @@ -132,10 +126,24 @@
"$ref": "#/definitions/Minor"
},
"uid": {
"$ref": "defs.json#/definitions/UID"
"oneOf": [
{
"$ref": "defs.json#/definitions/UID"
},
{
"type": "null"
}
]
},
"gid": {
"$ref": "defs.json#/definitions/GID"
"oneOf": [
{
"$ref": "defs.json#/definitions/GID"
},
{
"type": "null"
}
]
}
}
},
Expand Down