...

Text file src/github.com/opencontainers/runtime-spec/schema/README.md

Documentation: github.com/opencontainers/runtime-spec/schema

     1# JSON schema
     2
     3## Overview
     4
     5This directory contains the [JSON Schema](http://json-schema.org/) for validating JSON covered by this specification.
     6
     7The layout of the files is as follows:
     8
     9* [config-schema.json](config-schema.json) - the primary entrypoint for the [configuration](../config.md) schema
    10* [config-linux.json](config-linux.json) - the [Linux-specific configuration sub-structure](../config-linux.md)
    11* [config-solaris.json](config-solaris.json) - the [Solaris-specific configuration sub-structure](../config-solaris.md)
    12* [config-windows.json](config-windows.json) - the [Windows-specific configuration sub-structure](../config-windows.md)
    13* [state-schema.json](state-schema.json) - the primary entrypoint for the [state JSON](../runtime.md#state) schema
    14* [defs.json](defs.json) - definitions for general types
    15* [defs-linux.json](defs-linux.json) - definitions for Linux-specific types
    16* [defs-windows.json](defs-windows.json) - definitions for Windows-specific types
    17* [validate.go](validate.go) - validation utility source code
    18
    19
    20## Utility
    21
    22There is also included a simple utility for facilitating validation.
    23To build it:
    24
    25```bash
    26go get github.com/xeipuuv/gojsonschema
    27go build ./validate.go
    28```
    29
    30Or you can just use make command to create the utility:
    31
    32```bash
    33make validate
    34```
    35
    36Then use it like:
    37
    38```bash
    39./validate config-schema.json <yourpath>/config.json
    40```
    41
    42Or like:
    43
    44```bash
    45./validate https://raw.githubusercontent.com/opencontainers/runtime-spec/<runtime-spec-version>/schema/config-schema.json <yourpath>/config.json
    46```

View as plain text