-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schema/state-schema.json: Add a JSON Schema for the state JSON
The IDs namespace the fields within the OCI, with /runtime to select the opencontainers/runtime-spec project, and /state to select the state JSON within runtime-spec. Signed-off-by: W. Trevor King <[email protected]>
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"description": "Open Container Runtime State Schema", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://opencontainers.org/schema/state", | ||
"type": "object", | ||
"properties": { | ||
"ociVersion": { | ||
"id": "https://opencontainers.org/schema/runtime/state/ociVersion", | ||
"$ref": "defs.json#/definitions/ociVersion" | ||
}, | ||
"id": { | ||
"id": "https://opencontainers.org/schema/runtime/state/id", | ||
"description": "the container's ID", | ||
"type": "string" | ||
}, | ||
"status": { | ||
"id": "https://opencontainers.org/schema/runtime/state/status", | ||
"type": "string", | ||
"enum": [ | ||
"created", | ||
"running", | ||
"stopped" | ||
] | ||
}, | ||
"pid": { | ||
"id": "https://opencontainers.org/schema/runtime/state/pid", | ||
"type": "integer", | ||
"minimum": 0 | ||
}, | ||
"bundlePath": { | ||
"id": "https://opencontainers.org/schema/runtime/state/bundlePath", | ||
"type": "string" | ||
}, | ||
"annotations": { | ||
"$ref": "defs.json#/definitions/annotations" | ||
} | ||
}, | ||
"required": [ | ||
"ociVersion", | ||
"id", | ||
"status", | ||
"pid", | ||
"bundlePath" | ||
] | ||
} |