38b7860096
We should only download dependence without installing, otherwise we'll probably get error: go install: no install location for directory /home/qhuang/specs/schema outside GOPATH For more details see: go help gopath Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> |
||
---|---|---|
.. | ||
Makefile | ||
README.md | ||
defs-linux.json | ||
defs.json | ||
schema-linux.json | ||
schema.json | ||
validate.go |
README.md
JSON schema
Overview
This directory contains the JSON Schema for
validating the config.json
of this container runtime specification.
The layout of the files is as follows:
- schema.json - the primary entrypoint for the whole schema document
- schema-linux.json - this schema is for the Linux-specific sub-structure
- defs.json - definitions for general types
- defs-linux.json - definitions for Linux-specific types
- validate.go - validation utility source code
Utility
There is also included a simple utility for facilitating validation of a
config.json
. To build it:
export GOPATH=`mktemp -d`
go get -d ./...
go build .
rm -rf $GOPATH
Then use it like:
./schema schema.json <yourpath>/config.json