2017 © Pedro Peláez
 

library json-guard-cli

A CLI tool for json-guard

image

yuloh/json-guard-cli

A CLI tool for json-guard

  • Sunday, April 30, 2017
  • by yuloh
  • Repository
  • 1 Watchers
  • 3 Stars
  • 684 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

json-guard-cli

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

This package is a CLI client for JSON Guard, a JSON Schema validator. You can easily validate data against a schema or check your schema itself., (*2)

json-guard-cli-screenshot, (*3)

Install

Installation uses Composer., (*4)

Project Install

``` bash $ composer require yuloh/json-guard-cli, (*5)


### Global Install If you don't want to install this per project, you can install it globally and use it anywhere. If you aren't familiar with Composer's global install functionality, [this tutorial should get you up and running](https://akrabat.com/global-installation-of-php-tools-with-composer/). ```bash $ composer global require yuloh/json-guard-cli

Usage

Validate

Validate Data Against a Schema., (*6)

Usage:, (*7)

$ json-guard validate [<data>] [<schema>]

Arguments:, (*8)

  • data: The data to validate.
  • schema: The schema to use.

Examples:, (*9)

# Using files
$ json-guard validate my-data.json my-schema.json
# Using JSON strings
$ json-guard validate \
'{ "id": "https://json-guard.dev/schema#" }' \
'{ "properties": { "id": { "type": "string", "format": "uri" } } }'
# Loading Schema with a Loader
$ json-guard validate my-data.json 'http://json-schema.org/draft-04/schema#'

Check

Check that a JSON Schema is valid., (*10)

Usage:, (*11)

$ json-guard check [<schema>]

Arguments:, (*12)

  • schema: The schema to check.

Examples:, (*13)

$ json-guard check my-schema.json

Loading JSON

All commands can load the JSON as a string, from a loader path, from a local file path, or from STDIN., (*14)

Change log

Please see CHANGELOG for more information what has changed recently., (*15)

Testing

bash $ composer test, (*16)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*17)

Credits

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions

30/04 2017
23/12 2016

0.2.1

0.2.1.0 https://github.com/yuloh/json-guard-cli

A CLI tool for json-guard

  Sources   Download

MIT

The Requires

 

The Development Requires

schema json validate json schema yuloh json-guard-cli

19/12 2016

0.2.0

0.2.0.0 https://github.com/yuloh/json-guard-cli

A CLI tool for json-guard

  Sources   Download

MIT

The Requires

 

The Development Requires

schema json validate json schema yuloh json-guard-cli

27/07 2016

0.1.0

0.1.0.0 https://github.com/yuloh/json-guard-cli

A CLI tool for json-guard

  Sources   Download

MIT

The Requires

 

The Development Requires

schema json validate json schema yuloh json-guard-cli