Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ajv-cli

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ajv-cli

Command line interface for Ajv JSON schema validator

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

What is ajv-cli?

The ajv-cli package is a command-line interface for the Ajv JSON schema validator. It allows users to validate JSON data against JSON schemas, compile schemas, and perform other schema-related tasks directly from the command line.

What are ajv-cli's main functionalities?

Validate JSON data against a schema

This command validates JSON data in 'data.json' against the JSON schema in 'schema.json'. If the data is valid, the command will exit with a status code of 0; otherwise, it will print validation errors.

ajv validate -s schema.json -d data.json

Compile a JSON schema

This command compiles the JSON schema in 'schema.json' and outputs the compiled schema to 'compiledSchema.js'. The compiled schema can be used for faster validation in JavaScript applications.

ajv compile -s schema.json -o compiledSchema.js

Generate a schema from JSON data

This command generates a JSON schema based on the structure of the JSON data in 'data.json' and outputs the schema to 'schema.json'. This is useful for creating initial schemas from example data.

ajv generate -d data.json -o schema.json

Other packages similar to ajv-cli

FAQs

Package last updated on 28 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc