Evgeny Poberezkin
faae5585c2
semicolon
2015-12-05 21:31:56 +00:00
Evgeny Poberezkin
d7fd8229a9
time format; formatMaximum/formatMinimum and exclusiveFormatMaximum/exclusiveFormatMinimum keywords from v5 proposals
2015-12-05 21:16:28 +00:00
Evgeny Poberezkin
5ebfb41903
fixed missing schemaPath in type keyword
2015-11-29 00:44:25 +00:00
Evgeny Poberezkin
8a0719ea27
additionalItems added to reserved keywords (can be defined as custom)
2015-11-28 16:11:56 +00:00
Evgeny Poberezkin
7d96e1b642
patternGroups keyword (v5 proposals)
2015-11-28 14:59:08 +00:00
Evgeny Poberezkin
cf35958df4
schemaPath in errors, #76
2015-11-27 09:19:04 +00:00
Evgeny Poberezkin
2ddf957554
fixed schema substitution with some options when refs are inlined, closes #77
2015-11-26 22:49:49 +00:00
Evgeny Poberezkin
06fd23217a
removed peerDependency, closes #78
2015-11-24 06:35:50 +00:00
Evgeny Poberezkin
cffb7c7f72
move compileAsync and addKeyword to Ajv prototype, remove reduce
2015-11-22 02:13:03 +00:00
Evgeny Poberezkin
a6de2b8047
addKeyword to separate file, whitespace
2015-11-22 02:07:41 +00:00
Evgeny Poberezkin
6ab3337ddf
compileAsync to separate file
2015-11-22 01:47:15 +00:00
Evgeny Poberezkin
0fe807b68a
v5 keywords constant and contains
2015-11-22 00:31:01 +00:00
Evgeny Poberezkin
65e534ee8b
check/extend errors in inline custom keywords; tests for custom keywords creating errors
2015-11-21 23:12:03 +00:00
Evgeny Poberezkin
56a8b5b582
"dependencies" with option errorDataPath = "property" sets dataPath to missing property, error params has missingProperty, #68 , #69
2015-11-21 12:43:44 +00:00
Evgeny Poberezkin
5c0c8b3b1c
default behaviour of "additionalProperties" in >=2.0.0 ( #69 ) reverts #11 - now dataPath points to the object that is validated and not to the additional property; old (<=1.4.10 ) error reporting of dataPath for "additionalProperties" keyword is available with option errorDataPath == "property"
2015-11-21 01:45:52 +00:00
Evgeny Poberezkin
79ab4add57
fixed errors for "required", tests
2015-11-20 22:52:54 +00:00
Evgeny Poberezkin
a46600e14a
default behaviour in >=2.0.0 ( #69 ) reverts #18 and #55 - now dataPath points to the object that is validated and not to the missing property; old (<=1.4.10 ) error reporting of dataPath for "required" keyword is available with option errorDataPath == "property"
2015-11-19 23:59:10 +00:00
Evgeny Poberezkin
982264f192
removed i18n option (params always added to error objects)
2015-11-17 23:45:19 +00:00
Evgeny Poberezkin
6a2961bcf3
updated error parameters so that ajv-i18n does not depend on schema, compatible with ajv-i18n >= 1.0.0
2015-11-17 23:20:12 +00:00
Evgeny Poberezkin
ee450ec8d0
removed caching of compiled subschemas of custom keywords (it made performance worse in most cases)
2015-11-17 23:20:12 +00:00
Evgeny Poberezkin
ae5b4c0f45
support for "inline" custom keywords, #69
2015-11-17 23:20:12 +00:00
Evgeny Poberezkin
87292f80ea
validate schemas generated by macro keywords
2015-11-17 23:20:12 +00:00
Evgeny Poberezkin
18c1ef858c
support for "macro" custom keywords, #69
2015-11-17 23:20:11 +00:00
Evgeny Poberezkin
285850ce20
pass parent schema to compile/validate functions of custom keywords if they use it, #69
2015-11-17 23:17:59 +00:00
Evgeny Poberezkin
5e45d4eadf
support compiling schemas in custom keywords, #69
2015-11-17 23:17:59 +00:00
Evgeny Poberezkin
fcc776e794
basic implementation of custom keywords, #69
2015-11-17 23:17:59 +00:00
Evgeny Poberezkin
368332ab42
fixed bug in remote ref resolution, closes #70
2015-11-07 13:53:41 +00:00
Evgeny Poberezkin
7b142c56bd
optimized generated code for deep schemas
2015-10-25 21:55:07 +00:00
Evgeny Poberezkin
889fcc12c5
fixed email format regex
2015-10-25 18:50:50 +00:00
Evgeny Poberezkin
c4bf67cab0
changed uri format to allow URNs, closes #59
2015-10-25 11:31:07 +00:00
Evgeny Poberezkin
d1ff86ef5e
refactor resolve
2015-10-25 01:49:07 +01:00
Evgeny Poberezkin
70844207cf
fixed resolution scope change - changing folder in subschema, closes #62
2015-10-25 01:03:19 +01:00
Evgeny Poberezkin
b161a6f1d0
fixed resolution scope change - changing folder, fixed test for #62
2015-10-24 23:16:37 +01:00
Evgeny Poberezkin
2259dc76cd
find schema ref that changes resolution scope in another schema, fixed one test for #62
2015-10-24 22:25:08 +01:00
Evgeny Poberezkin
579e5c5a1d
refactor, remove unused code, test
2015-10-16 19:37:43 +01:00
Evgeny Poberezkin
40eafe036f
removed unused code
2015-10-15 21:41:50 +01:00
Evgeny Poberezkin
50d30a262a
fixed incorrect resolution scope change when "id" property is not a schema id - closes #61 , closes #63
2015-10-15 18:53:55 +01:00
Le Lan Johan
c486e8f25b
Do not force two slashes for uris
...
To allow relative urls (conformed to https://tools.ietf.org/html/rfc1808 ), URI regex do not force two slashes after scheme.
2015-10-14 09:52:28 +02:00
Evgeny Poberezkin
e02972207c
validate "required" properties within "properties" keyword, closes #41
2015-10-11 00:08:58 +01:00
Evgeny Poberezkin
80dc982d59
replaced Array functions with for loop, added ajv instances to tests
2015-10-10 20:50:57 +01:00
Evgeny Poberezkin
738e343ccf
fixed reference resolution when multiple schema files are compiled, closes #50 , closes #53
2015-10-02 22:06:00 +01:00
Marc MacLeod
71e8ff3f2c
update the required message rather than dataPath
2015-09-26 12:11:20 -05:00
Marc MacLeod
f024918133
remove redundant property val in error message
...
For required properties, the error message is currently:
"data.name should have required property .name"
This works for other validations, where the property is present, but required is a special case that indicates the property is not there. The above message is somewhat confusing. I've simply updated the required errors to read:
"data should have required property .name"
2015-09-25 15:18:17 -05:00
Evgeny Poberezkin
a67b661e10
fixed #52 (compileAsync); loadSchema should be called only once for any schema; error is always passed via callback
2015-09-23 23:42:33 +01:00
Evgeny Poberezkin
d6ed06766c
fixed #48 - indices in dataPath in error messages for items keyword
2015-09-23 21:58:19 +01:00
Evgeny Poberezkin
de3d3469fe
fixed #51 (compileAsync); ensure that callback in compileAsync is always called asynchronously
2015-09-23 21:04:34 +01:00
Evgeny Poberezkin
f23deffff3
update text returned by errorsText method
2015-09-22 22:47:54 +01:00
Evgeny Poberezkin
34993de951
i18n support for ajv-i18n package
2015-09-13 01:01:20 +01:00
Evgeny Poberezkin
6723287c3e
optimized equal
2015-09-07 09:58:33 +01:00
Yury Chebotaev
de02d4d8ab
Compare objects with better approach by @blakeembrey that not count order of keys
2015-09-07 03:45:10 +05:00
Yury Chebotaev
1b0a471448
equal fail when order of keys is different
2015-09-07 02:58:01 +05:00
Evgeny Poberezkin
fe097794a9
asynchronous schema compilation with loading missing remote schemas using supplied function, #43 , mulesoft-labs/osprey-mock-service#11
2015-09-03 00:17:50 +01:00
Evgeny Poberezkin
bec34c5ba5
error thrown in case of missing reference has properties missingRef and missingSchema, related to #43 , mulesoft-labs/osprey-mock-service#11
2015-09-02 18:20:43 +01:00
Evgeny Poberezkin
ed7c14801d
jshint, closes #34
2015-08-27 20:55:44 +01:00
Evgeny Poberezkin
d99e707a69
improved performance of "properties" keyword; schema tests for 64 options combinations
2015-08-24 00:40:27 +01:00
Evgeny Poberezkin
cc8de5bb8e
tests for inlined schemas, #6
2015-08-23 21:17:11 +01:00
Evgeny Poberezkin
69bc41a38c
optimised access to compiled/inlined referenced schemas
2015-08-23 13:27:05 +01:00
Evgeny Poberezkin
f3b65f4a58
Merge branch 'master' into inline
2015-08-23 12:04:38 +01:00
Evgeny Poberezkin
843557e03f
optimised regexps to create them during compile time, reuse regexp instances
2015-08-22 23:57:16 +01:00
Evgeny Poberezkin
1c508fa98c
removed compiled dot templates from the repo, #34
2015-08-22 22:17:07 +01:00
Evgeny Poberezkin
f9017a54d3
dataPath using jsonPointers in "required" keyword when allErrors == false, #32
2015-08-22 21:58:38 +01:00
Evgeny Poberezkin
4c4fdd5afc
optimised getExprPath for numbers (items keyword), #32
2015-08-22 21:21:18 +01:00
Evgeny Poberezkin
00419a120e
Merge pull request #36 from blakeembrey/json-pointers
...
Support JSON pointers
2015-08-22 20:23:55 +01:00
Blake Embrey
e6da675f91
Support JSON pointers
2015-08-22 11:52:05 -07:00
Evgeny Poberezkin
7f37f1b546
removed hyper meta-schema, same schema is used as latest meta-schema
2015-08-21 23:11:18 +01:00
Evgeny Poberezkin
d8d59ed352
inline refs with all keywords but "$ref"
2015-08-21 22:52:29 +01:00
Blake Embrey
4989662947
Add latest meta schemas according to schema spec
2015-08-21 10:14:36 -07:00
Evgeny Poberezkin
7d0c6d1d25
inline simple refs, #6
2015-08-19 22:54:05 +01:00
Evgeny Poberezkin
cfec9e3fb3
removed unused it.dataPath, related to #32
2015-08-19 00:31:19 +01:00
Evgeny Poberezkin
e74f79eea6
removed unused code with _debug option
2015-08-19 00:22:05 +01:00
Evgeny Poberezkin
8abbf63e9b
Merge branch 'master' into 1.0.0
2015-08-16 23:00:43 +01:00
Evgeny Poberezkin
982cfab809
removed unused code
2015-08-16 02:11:00 +01:00
Evgeny Poberezkin
704fb11c1d
optimized not rule
2015-08-16 01:21:35 +01:00
Evgeny Poberezkin
286368fb23
optimized required rule compilation
2015-08-16 01:10:43 +01:00
Evgeny Poberezkin
dfd6de5857
removed _debug option
2015-08-16 00:59:28 +01:00
Evgeny Poberezkin
fe53458a6e
missingRefs option tests
2015-08-15 23:59:14 +01:00
Evgeny Poberezkin
87cc09501b
tests: options, format regex
2015-08-12 01:00:46 +01:00
Evgeny Poberezkin
c4fb165f8d
simplified util.toHash
2015-08-11 22:52:34 +01:00
Evgeny Poberezkin
eeb1307448
jshint "validthis" option
2015-08-11 19:24:31 +01:00
Evgeny Poberezkin
a3be10e40d
.jshintrc: node, allow ==
2015-08-11 19:13:08 +01:00
Evgeny Poberezkin
1a1353717b
.jshintrc, code style
2015-08-11 19:06:32 +01:00
Evgeny Poberezkin
dfa640a1b2
readme, fixed addMetaSchema
2015-08-09 12:49:05 +01:00
Evgeny Poberezkin
22d4c6e40d
addSchema no longer returns compiled schema
2015-08-09 11:46:44 +01:00
Evgeny Poberezkin
0012b09ccf
do not replace schema object with compiled function
2015-08-09 00:54:06 +01:00
Evgeny Poberezkin
c175259b48
clean up resolve
2015-08-08 20:57:50 +01:00
Evgeny Poberezkin
234729121f
Merge branch 'master' into 1.0.0
2015-08-08 19:39:27 +01:00
Evgeny Poberezkin
ab32638acc
addMetaSchema validates metaschema by default
2015-08-08 19:34:01 +01:00
Evgeny Poberezkin
1b8c922ebc
preserve roots during ref resolution, closes #27
2015-08-08 19:06:51 +01:00
Evgeny Poberezkin
41ed37f36f
resolves recursive schema issue #27 , breaks test for issue #13 , raml schema has regex issue
2015-08-08 12:21:41 +01:00
Evgeny Poberezkin
9466859f92
addMetaSchema method, closes #26
2015-08-08 10:56:19 +01:00
Evgeny Poberezkin
22513f598a
Merge branch 'master' into 1.0.0
2015-08-07 23:17:06 +01:00
Evgeny Poberezkin
a0c342c58f
fixed resolving recursive references, closes issue #27
2015-08-07 01:54:07 +01:00
Evgeny Poberezkin
bde23cbe9e
removed type escaping in errors
2015-08-07 00:14:08 +01:00
Blake Embrey
b7877a2dcf
Compile dot templates
2015-08-06 14:47:17 -07:00
Blake Embrey
2a8ce631dd
Escape everything else that might need escaping
2015-08-06 14:47:17 -07:00
Blake Embrey
02d6a5431d
Escape schema strings in output
2015-08-06 14:29:45 -07:00
Evgeny Poberezkin
021b20a366
fixed removeAdditional/validateSchema
2015-07-31 21:00:44 +01:00
Evgeny Poberezkin
94f51e1248
Merge branch 'master' into 1.0.0
2015-07-31 20:06:43 +01:00
Evgeny Poberezkin
62adbbe1ed
fixed removeAdditional, tests, added "failing" for removeAdditional; closes #25 , related to #23
2015-07-31 19:23:35 +01:00
Evgeny Poberezkin
23bf0ac5fb
option removeAdditional equal to "all"
2015-07-30 09:22:15 +01:00