Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 868 Bytes

README.md

File metadata and controls

29 lines (17 loc) · 868 Bytes

nodejs version status

moleculer-schema-adapter (MSA)

An adapter that allows events and actions parameters to be validated against JSON schemas.

Table of Contents

  1. Requirements
  2. Usage
  3. Distribution

Requirements

MSA assumes that you are using the Moleculer microservice framework.

How it works

When MSA loads, it reads the schema directory, validating and caching all schemas. Subsequently, MSA chooses the schema to use based on the name of the event or action.

Usage

  • Require the package;
  • Add the middleware to the service configuration;
  • Add the mixin to the service;

Distribution