protodef-validator
Validate ProtoDef protocol definition in node
Last updated 10 years ago by rom1504 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install protodef-validator 
SYNC missed versions from official npm registry.

ProtoDef-validator

NPM version Discord Gitter Irc Build Status Try it on gitpod

Validate ProtoDef protocol definition in node

Installing

npm install protodef-validator

Usage

See example

Command Line Interface

You can install this package globally with npm install -g protodef-validator and then run protodef-validator someProtocol.json to validate it.

API

Validator

Class to make validator instances

Validator.addType(name [,schema])

add the type name with schema schema

If schema isn't specified, use a default schema.

Validator.addTypes(schemas)

Add schemas which is an object with keys the name of the schemas and values the schema definitions.

Validator.validateType(type)

validates a type definition type

throws an exception if the type isn't correct

Validator.validateProtocol(protocol)

validates a protocol definition protocol

throws an exception if the protocol isn't correct

History

1.3.0

  • update protodef

1.2.3

  • add .json suffix when requiring (for webpack)

1.2.2

  • fix release

1.2.1

  • update ajv and protodef

1.2.0

  • allow : in switch keys

1.1.7

  • properly define compareTo/compareToValue

1.1.6

  • fix compareToValue switch property allowance

1.1.5

  • properly normalize schema names

1.1.4

  • normalize refs

1.1.3

  • print errors again

1.1.2

  • fix release

1.1.1

  • recreate ajv instance to recompile if types were validated hence compiled

1.1.0

  • check the datatypes have been defined
  • make it possible to add types with a default schema
  • better errors

1.0.2

  • ignore already added types

1.0.1

  • fix index.js

1.0.0

  • can validate types and protocols

Current Tags

  • 1.5.0                                ...           latest (3 months ago)

18 Versions

  • 1.5.0                                ...           3 months ago
  • 1.4.0                                ...           2 years ago
  • 1.3.1                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.3                                ...           7 years ago
  • 1.2.2                                ...           8 years ago
  • 1.2.1                                ...           8 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.7                                ...           10 years ago
  • 1.1.6                                ...           10 years ago
  • 1.1.5                                ...           10 years ago
  • 1.1.4                                ...           10 years ago
  • 1.1.3                                ...           10 years ago
  • 1.1.2                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 86
Today 0
This Week 14
This Month 33
Last Day 0
Last Week 3
Last Month 19
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE