@mojaloop/ml-schema-validator

9.5.0 • Public • Published

ml-schema-validator

Git Commit Git Releases Npm Version NPM Vulnerabilities CircleCI

Shared Joi validation code for Mojaloop services

Contents:

Usage

The library supports both Joi validation >= version 17. To use the library you can import it into your project

Tests

Currently test coverage will automatically pass at 100% because these are just objects, I would always suggest creating a JSON and create a test against the schema if you are contributing. Both positive and negative scenarios

Running the tests:

npm run test
npm run test:unit
npm run test:coverage
npm run test:coverage-check

Tests include code coverage. See the test/unit/ folder for testing scripts.

Auditing Dependencies

We use npm-audit-resolver along with npm audit to check dependencies for vulnerabilities, and keep track of resolved dependencies with an audit-resolve.json file.

To start a new resolution process, run:

npm run audit:resolve

You can then check to see if the CI will pass based on the current dependencies with:

npm run audit:check

And commit the changed audit-resolve.json to ensure that CircleCI will build correctly.

Package Sidebar

Install

npm i @mojaloop/ml-schema-validator

Weekly Downloads

0

Version

9.5.0

License

Apache-2.0

Unpacked Size

70 kB

Total Files

26

Last publish

Collaborators

  • mojaloopci
  • pedrosousabarreto
  • mdebarros