Skip to content

Commit

Permalink
schema: Move schema.json -> config-schema.json and similar
Browse files Browse the repository at this point in the history
To make it clear that these schemas are for validating config.json
(and not, for example, state JSON).  I've left the IDs alone for now,
because my PR adjusting those was rejected [1].

The rule for the -schema portion is "use it for entrypoint files" [2].

[1]: opencontainers#453
[2]: opencontainers#481 (comment)

Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking committed Jun 9, 2016
1 parent 79b26a1 commit 59ede1a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

## Overview

This directory contains the [JSON Schema](http://json-schema.org/) for
validating the `config.json` of this container runtime specification.
This directory contains the [JSON Schema](http://json-schema.org/) for validating JSON covered by this specification.

The layout of the files is as follows:
* [schema.json](schema.json) - the primary entrypoint for the whole schema document
* [schema-linux.json](schema-linux.json) - this schema is for the Linux-specific sub-structure
* [schema-solaris.json](schema-solaris.json) - this schema is for the Solaris-specific sub-structure

* [config-schema.json](config.json) - the primary entrypoint for the [configuration](../config.md) schema
* [config-linux.json](config-linux.json) - the [Linux-specific configuration sub-structure](../config-linux.md)
* [config-solaris.json](config-solaris.json) - the [Solaris-specific configuration sub-structure](../config-solaris.md)
* [defs.json](defs.json) - definitions for general types
* [defs-linux.json](defs-linux.json) - definitions for Linux-specific types
* [validate.go](validate.go) - validation utility source code


## Utility

There is also included a simple utility for facilitating validation of a
`config.json`. To build it:
There is also included a simple utility for facilitating validation.
To build it:

```bash
export GOPATH=`mktemp -d`
Expand All @@ -35,5 +35,5 @@ make validate
Then use it like:

```bash
./validate schema.json <yourpath>/config.json
./validate config-schema.json <yourpath>/config.json
```
File renamed without changes.
4 changes: 2 additions & 2 deletions schema/schema.json → schema/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@
}
},
"linux": {
"$ref": "schema-linux.json#/linux"
"$ref": "config-linux.json#/linux"
},
"solaris": {
"$ref": "schema-solaris.json#/solaris"
"$ref": "config-solaris.json#/solaris"
}
},
"required": [
Expand Down
File renamed without changes.

0 comments on commit 59ede1a

Please sign in to comment.