Categorygithub.com/adrielp/schemacheck
modulepackage
1.8.1
Repository: https://github.com/adrielp/schemacheck.git
Documentation: pkg.go.dev

# README

OpenSSF Scorecard CodeQL Go Report Card Tests Passing

schemacheck

A CLI utility written in go that validates json and yaml files against a schema.

Usage

schemacheck is meant to be used against one schema and one or more yaml or json files.

After installation, you can run it like:

schemacheck --schema myschema.json --file myjson.json --file myyaml.yaml .......

You can get the usage at any time by running:

schemacheck --help

You can also call this CLI from other command line utililties like find.

find . -type f -name "*.json" -exec ./dist/bin/schemacheck -s test_data/schema.json -f {} \+

Install

There are a couple different methods to install schemacheck.

Preferred methods

  • Via go (recommended): go install github.com/adrielp/schemacheck
  • Via brew: brew install adrielp/tap/schemacheck (Mac / Linux)

Mac/Linux during local development

  • Clone down this repository and run make install

Windows

There's a binary for that, but it's not directly supported or tested because #windows

Getting Started

Prereqs

Instructions

  • Clone down this repository
  • Run commands in the Makefile like make build

# Functions

Checks whether a given file is of the supported extension type and if not returns false with an error.
Check whether or not a required flag like file and schema is set and return true or false.
No description provided by the author
No description provided by the author

# Variables

Core flag variables.
Core variables for flag pointers and info, warning, and error loggers.
Core variables for flag pointers and info, warning, and error loggers.
Core variables for flag pointers and info, warning, and error loggers.
Core variables for flag pointers and info, warning, and error loggers.