validate-yaml

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2019 License: MIT Imports: 13 Imported by: 0

README

validate-yaml

Go Report Card

validate-yaml performs JSON Schema validation for YAML files. Under the hood, validation is always against a JSON schema. The YAML input is converted to JSON and then checked against the schema.

In fact, both schema and input files may be YAML documents.

JSON YAML
schema document
input document

Usage

$ validate-yaml -h
USAGE validate-yaml [-schema=PATH] FILE [FILE]
  -schema string
    	path to JSON schema definition
$ validate-yaml --schema=schema.json valid.yaml
Loading schema schema.json...
Validating valid.yaml...
OK

Alternatively, you could enter:

$ cat valid.yaml | validate-yaml --schema=schema.yaml
Loading schema schema.yaml...
Validating stream...
OK

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL