Detalhes do pacote

@stardust-configs/json-schema-validator

JSON Schema validator

json-schema, json-schema-validator

readme (leia-me)

@stardust-configs/json-schema-validator

JSON Schema validator

  • Support for using CLI and module
  • Support for multiple sources
  • Support for Glob Pattern sources
  • Support for local and remote JSON Schema

Install

$ npm install @stardust-configs/json-schema-validator --save-dev

Usage

import jsv from '@stardust-configs/json-schema-validator'

// Truthy
await jsv({
  src: 'tsconfig.json',
  schema: 'https://json.schemastore.org/tsconfig',
})

// Falsy
await jsv({
  src: 'tsconfig.json',
  schema: 'https://json.schemastore.org/typoconfig',
})

In CLI.

# basic
$ jsv "tsconfig.json" --schema "https://json.schemastore.org/tsconfig"

# glob
$ jsv "tsconfig.*.json" --schema "https://json.schemastore.org/tsconfig"

# multiple
$ jsv "tsconfig.node.json" "tsconfig.jest.json" --schema "https://json.schemastore.org/tsconfig"

# strict
$ jsv "tsconfig.json" --schema "https://json.schemastore.org/tsconfig" --strict

Author

@p-chan

License

MIT

changelog (log de mudanças)

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.4.0 (2021-04-15)

Features

  • change module interface (8c04cb2)

Bug Fixes

  • change no strict flag to strict flag in cli (9de86a4), closes #34

0.3.0 (2021-04-06)

Bug Fixes

  • deps: update dependency ajv to v8 (61a704c)
  • deps: update dependency json-schema-migrate to v2 (c2ecc61)
  • disable strict mode (73c2d75)

0.2.0 (2021-01-26)

Features

  • Add local JSON Schema support (dcbfd05), closes #6

0.1.2 (2021-01-26)

Bug Fixes

0.1.1 (2021-01-26)

Bug Fixes

0.1.0 (2021-01-26)

Features

Bug Fixes

  • Fix json-schema-migrate (e6befca)