File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ # JSON schema
2+
3+ ## Overview
4+
5+ This directory contains the [ JSON Schema] ( http://json-schema.org/ ) for
6+ validating the ` config.json ` of this container runtime specification.
7+
8+ The layout of the files is as follows:
9+ * [ schema.json] ( ./schema.json ) - the primary entrypoint for the whole schema document
10+ * [ schema-linux.json] ( schema-linux.json ) - this schema is for the Linux-specific sub-structure
11+ * [ defs.json] ( defs.json ) - definitions for general types
12+ * [ defs-linux.json] ( defs-linux.json ) - definitions for Linux-specific types
13+ * [ validate.go] ( validate.go ) - validation utility source code
14+
15+
16+ ## Utility
17+
18+ There is also included a simple utility for facilitating validation of a
19+ ` config.json ` . To build it:
20+
21+ ``` bash
22+ export GOPATH=` mktemp -d`
23+ go get ./...
24+ go build .
25+ rm -rf $GOPATH
26+ ```
27+
28+ Then use it like:
29+
30+ ``` bash
31+ ./schema schema.json < yourpath> /config.json
32+ ```
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
1010
1111func main () {
1212 if len (os .Args [1 :]) != 2 {
13- fmt .Printf ("ERROR: usage is: %s <schema.json> <config.json>" , os .Args [0 ])
13+ fmt .Printf ("ERROR: usage is: %s <schema.json> <config.json>\n " , os .Args [0 ])
1414 os .Exit (1 )
1515 }
1616
You can’t perform that action at this time.
0 commit comments