Comparing version 0.1.11 to 0.1.12
@@ -126,2 +126,6 @@ 'use strict'; | ||
current.pattern && (joischema = joischema.regex(new RegExp(current.pattern))); | ||
thing.isNumber(current.minLength) && (joischema = joischema.min(current.minLength)); | ||
thing.isNumber(current.maxLength) && (joischema = joischema.max(current.maxLength)); | ||
return joischema; | ||
@@ -128,0 +132,0 @@ } |
{ | ||
"name": "enjoi", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"description": "Converts json-schema to Joi schema for validation.", | ||
@@ -5,0 +5,0 @@ "main": "lib/enjoi.js", |
@@ -7,2 +7,22 @@ [![Build Status](https://travis-ci.org/tlivings/enjoi.png)](https://travis-ci.org/tlivings/enjoi) [![NPM version](https://badge.fury.io/js/enjoi.png)](http://badge.fury.io/js/enjoi) | ||
### Schema Support | ||
`enjoi` is built against json-schema v4, but does not support all json-schema properties | ||
(sometimes due to lack of support in Joi). | ||
Here is a list of some missing keyword support: | ||
- enum | ||
- allOf | ||
- anyOf | ||
- oneOf | ||
- not | ||
- format | ||
- `object:patternProperties` | ||
- `object:additionalProperties` | ||
- `object:maxProperties` | ||
- `object:minProperties` | ||
- `array:items` (supports as schema, not supported as array). | ||
- `array:additionalItems` | ||
### API | ||
@@ -9,0 +29,0 @@ |
10022
106
107