Code Monkey home page Code Monkey logo

boon's Introduction

License Crates.io docs.rs Build Status codecov dependency status

Examples Changelog

Library Features

  • pass JSON-Schema-Test-Suite excluding optional(compare with other impls at bowtie)
    • draft-04
    • draft-06
    • draft-07
    • draft/2019-09
    • draft/2020-12
  • detect infinite loop traps
    • $schema cycle
    • validation cycle
  • custom $schema url
  • vocabulary based validation
  • ECMA-262 regex compatibility (pass tests from optional/ecmascript-regex.json)
  • format assertions
    • flag to enable in draft >= 2019-09
    • custom format registration
    • built-in formats
      • regex, uuid
      • ipv4, ipv6
      • hostname, email
      • idn-hostname, idn-email
      • date, time, date-time, duration
      • json-pointer, relative-json-pointer
      • uri, uri-reference, uri-template
      • iri, iri-reference
      • period
  • content assertions
    • flag to enable in draft >= 7
    • contentEncoding
      • base64
      • custom
    • contentMediaType
      • application/json
      • custom
    • contentSchema
  • errors
    • introspectable
    • hierarchy
      • alternative display with #
    • output
      • flag
      • basic
      • detailed
  • custom vocabulary

CLI

to install: cargo install --example boon boon

Usage: boon [OPTIONS] SCHEMA [INSTANCE...]

Options:
    -h, --help          Print help information
    -q, --quiet         Do not print errors
    -d, --draft <VER>   Draft used when '$schema' is missing. Valid values 4,
                        6, 7, 2019, 2020 (default 2020)
    -o, --output <FMT>  Output format. Valid values simple, alt, flag, basic,
                        detailed (default simple)
    -f, --assert-format
                        Enable format assertions with draft >= 2019
    -c, --assert-content
                        Enable content assertions with draft >= 7

This cli can validate both schema and multiple instances.

It support both json and yaml files

exit code is:

  • 1 if command line arguments are invalid.
  • 2 if there are errors

boon's People

Contributors

santhosh-tekuri avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.