Victor Emanouilov
4246d726a9
chore: move date-time guard for missing time part to date_time function rather than date function
2016-08-05 09:53:00 +03:00
Dalci de Jesus Bagolin
2fc93a8acd
[typescript] Allow use 'new' operator
2016-08-04 22:41:17 -04:00
Victor Emanouilov
6df7b2040b
fix: date-time string validation to fail validating for date-only strings instead of throwing a TypeError
2016-08-04 13:49:53 +03:00
will Farrell
a21cf02f43
update `==`, `object <-> array`
2016-07-26 14:43:20 -06:00
will Farrell
ec09c3c735
allow reversal and add more tests
2016-07-24 19:03:27 -06:00
will Farrell
4d1aa5fe31
linting
2016-07-22 18:41:57 -06:00
will Farrell
9e18e68ce7
Add in ability to coerce to an array
2016-07-22 18:07:10 -06:00
Evgeny Poberezkin
d64b84f5ff
Merge branch 'master' into 4.2
2016-07-22 15:00:44 +01:00
Evgeny Poberezkin
ac5c746f0a
Revert "Revert "feat: meta schema for custom keywords schemas, closes #230""
...
This reverts commit 09879d21ad
.
2016-07-22 14:49:43 +01:00
Evgeny Poberezkin
5a80c7cff6
feat: support meta-schema validation in custom keywords with $data support, #146
2016-07-22 14:25:41 +01:00
Evgeny Poberezkin
f06008a84f
fix: error when mutually recursive fragment refs reference a common schema, closes #240
2016-07-22 00:37:35 +01:00
Evgeny Poberezkin
7f5fe70cdb
feat: $data support in custom keywords, #146
2016-07-19 22:50:10 +01:00
Evgeny Poberezkin
ab4f65800b
refactor: remove parallel ifs from def.$data partial
2016-07-18 22:27:17 +01:00
Evgeny Poberezkin
caf7557bc0
refactor: convert custom.def partial into custom.jst function (for better encapsulation)
2016-07-18 22:14:02 +01:00
Evgeny Poberezkin
09879d21ad
Revert "feat: meta schema for custom keywords schemas, closes #230"
...
This reverts commit 1a6e4b576c
.
2016-07-18 18:51:57 +01:00
Evgeny Poberezkin
1a6e4b576c
feat: meta schema for custom keywords schemas, closes #230
2016-07-17 11:20:47 +01:00
Evgeny Poberezkin
2bcb74fc8c
fix: support mutual recursive refs when both refs are schema fragments, closes #210
2016-07-10 18:36:09 +01:00
Evgeny Poberezkin
7e0482619d
fix: support control characters in "properties" and "required", closes #226
2016-07-09 23:16:24 +01:00
Evgeny Poberezkin
3f96062745
fix: ref resolution does not fail when it should; closes #220
2016-06-28 21:30:55 +01:00
Dan Casey
3de58ec4cd
Add `schema` to interface returned by `getSchema`
2016-06-26 16:00:23 -04:00
Evgeny Poberezkin
8c0b3d8321
fix custom keyword that defines errors, closes #181
2016-06-11 12:00:10 +01:00
Evgeny Poberezkin
95c40a55d4
fix: v5 with "schemas" option when schemas dont have $schema keyword (or use v5 metaschema), closes #204
2016-06-01 07:01:46 +01:00
Evgeny Poberezkin
9a9ba82729
refactor, bump version
2016-05-27 21:21:11 +01:00
Matt Broadstone
84ef7ab728
feat(own-properties): support optionally checking own properties
...
Traditionally ajv validates additionalProperties by checking all
enumerable properties of an object. This patch allows the user to
specify that they only want own properties of an object to be
considered in this validation
2016-05-26 17:50:52 -04:00
Evgeny Poberezkin
81f442b325
NaN validation, closes #182
2016-05-16 22:05:08 +01:00
Evgeny Poberezkin
68cfec3b99
Merge pull request #184 from HolgerJeromin/patch-1
...
Copy jsdoc comments to typescript definition file
2016-05-16 20:53:44 +01:00
Evgeny Poberezkin
d90e7abd45
fix no-invalid-rule, closes #187 , #188
2016-05-16 20:51:48 +01:00
Holger Jeromin
c28a2f8f5d
Removed internal Parameters and added .errors
2016-05-13 00:54:18 +02:00
Holger Jeromin
1726e98878
copy jsdoc comment to typescript definition file
2016-05-10 11:25:18 +02:00
Evgeny Poberezkin
a8af73f45f
fix incorrect change of resolution scope when sibling subschema has id in switch keyword, issue #170
2016-04-23 19:36:47 +01:00
Evgeny Poberezkin
07f344e752
fix incorrect change of resolution scope when sibling subschema has id in allOf, oneOf, anyOf and dependencies keywords, issue #170
2016-04-23 17:00:32 +01:00
Evgeny Poberezkin
a2610bca0d
fix incorrect change of resolution scope when sibling schema has id, closes #170
2016-04-23 14:56:16 +01:00
Evgeny Poberezkin
2db1de98f3
removed unused variable
2016-04-22 10:21:51 +01:00
Blake Embrey
67f224630a
TypeScript: Fix implicit any, fix `Promise` usage
2016-04-21 17:38:06 -07:00
Evgeny Poberezkin
254deb5a03
Merge pull request #165 from epoberezkin/typescript
...
TypeScript type definitions - corrections
2016-04-20 21:20:49 +01:00
Evgeny Poberezkin
a954845be2
use typescript ES2015 for Promise support
2016-04-20 21:01:22 +01:00
Evgeny Poberezkin
f7bfc49a55
fix and add tests for typescript type definitions
2016-04-20 20:55:43 +01:00
Evgeny Poberezkin
18ca34253f
TypeScript type definitions
2016-04-18 22:11:26 +01:00
Evgeny Poberezkin
44dd6b78b9
Android 4 compatibility, #143
2016-04-18 21:15:38 +01:00
Evgeny Poberezkin
76bdf0796e
TypeScript: Promise return value for validation functions
2016-04-17 20:10:12 +01:00
Evgeny Poberezkin
e1f30a201b
TypeScript format and keyword definition
2016-04-17 20:07:00 +01:00
Evgeny Poberezkin
6a2c8633cb
correct TypeScript definitions
2016-04-17 19:37:40 +01:00
Evgeny Poberezkin
8020465d74
Merge branch 'master' into v4.0
2016-04-15 22:20:40 +01:00
Evgeny Poberezkin
26964e4996
Merge pull request #150 from lyngaas/format-exclusive-names
...
Rename exclusiveFormat to formatExclusive (v5 draft)
2016-04-15 22:16:30 +01:00
Evgeny Poberezkin
b92e6e86a7
property dependencies in allErrors mode create error for each missing dependency; #151 , closes 73
2016-04-15 22:10:30 +01:00
Blake Embrey
83427b8712
Support initial TypeScript definition
2016-04-15 12:20:35 -07:00
Evgeny Poberezkin
d730049184
meteor compatibility: error reporting, closes #159
2016-04-11 20:40:31 +01:00
Evgeny Poberezkin
84e8782605
rename property "async" of asynchronous validation function to "$async" for meteor compatibility, #151 , #159
2016-04-10 20:17:06 +01:00
Evgeny Poberezkin
d3d31d285a
Merge branch 'master' into v4.0
2016-04-10 20:03:03 +01:00
Evgeny Poberezkin
8676a3f62e
meteor compatibility; closes #159
2016-04-10 11:44:22 +01:00
Evgeny Poberezkin
404bff5bcf
error parameters for formatMaximum/formatMinimum, #151
2016-03-26 22:35:46 +00:00
Evgeny Poberezkin
e6a22be556
fix type coercion for multiple items/properties; closes #152
2016-03-25 20:13:39 +00:00
Evgeny Poberezkin
cbd9467bd6
useDefaults: use literals (deep-clone) of defaults unless useDefaults: "shared" is passed, #151 , #136
2016-03-24 23:27:13 +00:00
Evgeny Poberezkin
69d897f31a
fix errorsTexts
2016-03-23 23:25:54 +00:00
Ståle Lyngaas
98368bc363
Rename exclusiveFormat to formatExclusive (v5 draft)
2016-03-22 19:40:15 +01:00
Evgeny Poberezkin
dc10816fc3
refactor using options ignored for meta schemas
2016-03-20 18:12:14 +00:00
Evgeny Poberezkin
6a587c8729
restore readme in dotjs folder
2016-03-15 08:43:54 +00:00
Evgeny Poberezkin
ce86641657
pass default meta-schema via "meta" option, closes #90
2016-03-14 20:56:07 +00:00
Evgeny Poberezkin
192d73f74e
use meta schema from options as default meta-schema
2016-03-14 00:16:38 +00:00
Evgeny Poberezkin
f068d73693
add meta schema from option meta, #90
2016-03-13 23:15:37 +00:00
Evgeny Poberezkin
e1a38d2d90
accept array of schemas in addMetaSchema method
2016-03-09 23:20:35 +00:00
Brian Stack
bf76acfc21
Make cloning optional and based on stringify
2016-03-03 11:23:49 -08:00
Brian Stack
82f283fe7e
Clone default values to do least surprising thing
2016-03-02 16:04:21 -08:00
Evgeny Poberezkin
f4ca190010
fixed browser tests for async validation
2016-03-02 07:09:11 +00:00
Evgeny Poberezkin
53a6c70138
asynchronous custom keywords can define custom errors by returning the promise that rejects with Ajv.ValidationError, closes #118
2016-02-28 22:14:18 +00:00
Evgeny Poberezkin
3aaeaf6ec0
removeSchema with RegExp to remove multiple schemas or without argument to remove all schemas, closes #103
2016-02-28 01:16:48 +00:00
Evgeny Poberezkin
f48efb564a
optimised "not" keyword in {allErrors: true} mode to fail on the first error in subschema, closes #131
2016-02-27 23:01:03 +00:00
Evgeny Poberezkin
ec0f1c1b22
patternRequired keyword (v5 proposal), closes #123
2016-02-27 22:36:11 +00:00
Evgeny Poberezkin
503b427b7f
eslint no-trailing spaces
2016-02-26 20:25:15 +00:00
Evgeny Poberezkin
bdd1748dec
schema: false option in "validate" custom keyword definition for custom keywords that do not depend on the schema
2016-02-21 13:27:38 +00:00
Evgeny Poberezkin
8fa4d0f05f
test for passContext option
2016-02-16 10:12:32 +00:00
Evgeny Poberezkin
de65510f1e
passContext option; pass parent data to custom keyword functions
2016-02-16 00:15:20 +00:00
Evgeny Poberezkin
14d0eb0645
fix inlineRefs option, fix test, fix $ref to pass parentData[Property] to the referenced schema if it was passed to validate function
2016-02-15 22:04:04 +00:00
Evgeny Poberezkin
b2a67e7a65
options passContext (undocumented) to pass the context of validation function to referenced (not inlined) schemas
2016-02-14 20:34:10 +00:00
Evgeny Poberezkin
a0a172c90a
removeSchema called with id without matching schema does not throw error
2016-02-13 20:14:04 +00:00
Evgeny Poberezkin
79d16b3dee
alvays pass parent data and current data property when referenced schema called as a function (previously was passed only with option coerceTypes)
2016-02-12 23:08:28 +00:00
Evgeny Poberezkin
fa6b702db0
error message for enum keyword, closes #115
2016-02-07 20:03:14 +00:00
Evgeny Poberezkin
c62c6452aa
eslint: no-console
2016-02-04 22:36:12 +00:00
Evgeny Poberezkin
5c8e32dffc
eslint: no-shadow, no-invalid-this
2016-02-04 22:24:59 +00:00
Evgeny Poberezkin
5db986276c
fixed bug: custom sync keyword in async schema
2016-02-04 19:56:04 +00:00
Evgeny Poberezkin
2f6213111d
validate method for asynchronous schema always returns promise
2016-02-02 23:42:07 +00:00
Evgeny Poberezkin
cc32c46a25
update json-stable-stringify; closes #67
2016-02-02 21:39:45 +00:00
Evgeny Poberezkin
89a5ce76f9
eslint; code style
2016-02-02 18:55:02 +00:00
Evgeny Poberezkin
644a73b8f7
enable tests for nodent
2016-02-01 17:56:47 +00:00
Evgeny Poberezkin
0ecd3eaa13
change async/transpile options
2016-01-31 22:07:19 +00:00
Evgeny Poberezkin
86d97d4337
async options, expose Ajv.ValidationError class
2016-01-30 22:13:00 +00:00
Evgeny Poberezkin
c19c02aa04
nodent usage
2016-01-29 23:29:45 +00:00
Evgeny Poberezkin
2fe6715e3c
readme: async and transpile options
2016-01-29 18:01:03 +00:00
Evgeny Poberezkin
dba7096f2b
additional check for compatibility with nodent
2016-01-29 15:11:13 +00:00
Evgeny Poberezkin
6e583554a1
async with nodent transpiler
2016-01-29 09:26:11 +00:00
Evgeny Poberezkin
7365dd6e41
transpiling async validation functions from es7 with nodent
2016-01-28 12:31:20 +00:00
Evgeny Poberezkin
98c9c195aa
references to async schemas
2016-01-27 23:43:28 +00:00
Evgeny Poberezkin
002c99311f
use regenerator to transpile asynchronous validation functions if generators are not supported, #40
2016-01-26 23:56:38 +00:00
Evgeny Poberezkin
873426b6a7
async custom keywords, #40
2016-01-25 23:57:16 +00:00
Evgeny Poberezkin
d5808a3ee4
async format when format is $data, #40
2016-01-25 22:05:15 +00:00
Evgeny Poberezkin
0729d6d19d
async schemas and async formats using generators, #40
2016-01-25 06:37:36 +00:00
Evgeny Poberezkin
27bd49f182
renamed opts property of ajv instance to _opts; options object passed to constructor is copied
2016-01-25 06:37:36 +00:00
Evgeny Poberezkin
0c60364a7f
coerce type when schema is in ref that is not inlined, #95
2016-01-17 14:08:50 +00:00
Evgeny Poberezkin
878f3559f6
do not try to coerce to object/array, #95
2016-01-17 13:12:28 +00:00
Evgeny Poberezkin
b5b6a06f09
coerceTypes option, #95
2016-01-17 01:05:06 +00:00