Commit Graph

911 Commits (df6ef691aea0b2a22a7b52706e4f7cb9c6023aeb)

Author SHA1 Message Date
Evgeny Poberezkin df6ef691ae fix: ownProperties option with required keyword, #197 2017-02-11 23:44:59 +00:00
Evgeny Poberezkin 57fc360285 test: ownProperties option with properties and required keywords, #197 2017-02-11 23:23:48 +00:00
Evgeny Poberezkin ea5b7008ae fix: support ownProperties option with properties keyword, #197 2017-02-11 23:11:41 +00:00
Evgeny Poberezkin dbe863032a test: failing tests for ownProperties option (skipped), #197 2017-02-11 22:31:37 +00:00
Evgeny Poberezkin c9fb5cafb9 refactor: tests for ownProperties option, #197 2017-02-11 22:20:46 +00:00
Evgeny Poberezkin fe4fb1f99d Merge branch 'master' into 5.0.0 2017-02-10 22:17:18 +00:00
Evgeny Poberezkin 5ba9f832d4 Merge branch 'nimerritt-master' into 5.0.0 2017-02-10 22:14:47 +00:00
Evgeny Poberezkin 7361f831fb docs: custom formats for numbers, closes #291 2017-02-10 22:08:41 +00:00
Evgeny Poberezkin 6bf7d19ff2 test: number format via $data, #291 2017-02-10 21:59:20 +00:00
Evgeny Poberezkin 901343c95d feat: support formats with $data for numbers, #291 2017-02-10 21:52:51 +00:00
Evgeny Poberezkin c21cbee56f fix: support multiple types for format, #291 2017-02-10 20:53:13 +00:00
Evgeny Poberezkin 1d84987baa Merge ssh://github.com/nimerritt/ajv into nimerritt-master 2017-02-10 19:59:27 +00:00
Evgeny Poberezkin f4f80784b4 feat: add meta-schema for $data reference with options {meta: false, $data: true} 2017-02-10 18:40:07 +00:00
Evgeny Poberezkin af458d3460 Merge pull request #412 from delavara/patch-1
Update CUSTOM.md
2017-02-09 20:28:05 +00:00
Cody De La Vara 9432451a84 Update CUSTOM.md
Minor typo in the `custom` validate keyword example.
2017-02-09 12:04:26 -05:00
Evgeny Poberezkin 03b24c72f8 fix: custom keywords with $data option validate as valid if their value (in data) is undefined 2017-02-05 17:40:39 +00:00
Evgeny Poberezkin 3bd2587b04 version 5.0.1-beta.3 2017-02-04 22:47:07 +00:00
Evgeny Poberezkin de0c827dec feat: throw exception if schema id is not a string and report error, closes #380 2017-02-04 22:36:21 +00:00
Evgeny Poberezkin f5bcd5735a fix: code clean-up, closes #388 2017-02-04 22:15:23 +00:00
Evgeny Poberezkin ca6916385b feat: throw exception if $schema is not a string, closes #394 2017-02-04 21:30:26 +00:00
Evgeny Poberezkin 553aae8097 Merge pull request #405 from ahmedsoliman92/patch-1
typo
2017-01-30 21:32:29 +00:00
Ahmed Soliman b587913c97 typo 2017-01-30 17:15:53 +02:00
Evgeny Poberezkin 8e37f84950 Merge pull request #403 from idangozlan/5.0.0
removed webpack attribute
2017-01-25 18:13:48 +00:00
Idan Gozlan d250405335 removed webpack attribute
Since it's breaking the webpack build.
2017-01-25 16:24:07 +02:00
Evgeny Poberezkin 254c2672d5 feat: format uri-template, #384 2017-01-23 22:08:05 +00:00
Evgeny Poberezkin e949b8462c test: patternGroups with meta; meta: false warns insead of throwing meta-schema validation 2017-01-23 20:16:38 +00:00
Evgeny Poberezkin 8892f98a4c fix: patternGroups without draft-06 meta-schema 2017-01-23 19:58:02 +00:00
Evgeny Poberezkin 8bb3b52f55 feat: serialize option, closes #385, closes #341 2017-01-21 20:28:50 +00:00
Evgeny Poberezkin d4fb50bdbe Merge branch 'master' into 5.0.0 2017-01-21 19:57:38 +00:00
Evgeny Poberezkin ccc9907d26 feat: allow setting dataPath in validate/compile keywords, closes #331 2017-01-21 19:44:08 +00:00
Evgeny Poberezkin 824d6258f1 Merge branch 'master' into 5.0.0 2017-01-21 00:34:19 +00:00
Evgeny Poberezkin cf39a53404 docs: update beta version 2017-01-21 00:31:34 +00:00
Evgeny Poberezkin 9e1c8d7576 chore: version 4.11.0 2017-01-20 23:53:44 +00:00
Evgeny Poberezkin 2cc48296f5 docs: update link to 5.0.1-beta docs 2017-01-20 23:43:21 +00:00
Evgeny Poberezkin f89a04de4c docs: fixed custom keyword definition typing 2017-01-20 23:39:27 +00:00
Evgeny Poberezkin a06327eab4 Merge branch 'master' into 5.0.0 2017-01-20 23:30:54 +00:00
Evgeny Poberezkin 7148ae3607 docs: update typings for "modifying" and "valid" custom keywords, #392, #393 2017-01-20 23:25:45 +00:00
Evgeny Poberezkin dc265ddf4a docs: custom keywords with pre-defined validation result, closes #393 2017-01-20 23:21:03 +00:00
Evgeny Poberezkin aa8de572df feat: custom keywords with predefined validation result, #393 2017-01-20 23:08:52 +00:00
Evgeny Poberezkin d314df2721 docs: modifying option in custom keyword definition, closes #392 2017-01-20 22:16:11 +00:00
Evgeny Poberezkin 33845cc397 feat: support custom keywords that modify data, #392 2017-01-20 22:03:36 +00:00
Evgeny Poberezkin 2468bd5014 refactor: custom keyword code generation, #392 2017-01-20 21:33:34 +00:00
Evgeny Poberezkin 82002ec5e8 test: failing test for custom keyword mutating data, #141, #392 2017-01-20 20:26:14 +00:00
Evgeny Poberezkin ac5e2cee55 docs: reference to 5.0.1-beta docs 2017-01-20 20:14:36 +00:00
Evgeny Poberezkin b2d641f244 feat: add schema id (URI) as a comment to generated code 2017-01-07 12:49:48 +00:00
Evgeny Poberezkin b4ecf27fb2 version 4.10.4 2017-01-05 18:46:14 +00:00
Evgeny Poberezkin 41aeb848f2 Merge pull request #391 from farrago/non-identifier-keywords
Allow custom keywords that are not valid JS identifiers (fixes issue #389)
2017-01-05 18:43:26 +00:00
Richard Taylor b1b0c553d8 Improve implementation of allowing hyphens in keywords
This:
- Updates the README with the new rules (and recommendations)
- Updates `keyword.js` to implement the agreed change to the naming rules:
- - Now same as before but also allow hyphens as second and subsequent characters
- Update tests to test the new keyword naming rules
- Update `definitions.def` to use it.util.getProperty() to dynamically choose dot
  or bracket notation as appropriate rather than hardcode bracket notation.

Test Plan:
- Run `npm test` and ensure all tests run and pass
2017-01-05 18:28:28 +00:00
Richard Taylor 66db560ca5 Allow custom keywords that are not valid JS identifiers
Custom keywords were required to be valid JS identifiers due to the
way they were being used in the generated code.  This prevented the use
of keywords with the `x-` prefix that is required by [swagger](http://swagger.io].

This change fixes that by updating the only place that was using them
directly as an identifier to use //brackets// notation rather than
//dot// notation.  This brings the definition of `$schemaPath` in
`definitions.def` in line with the way the rule definition is accessed
from `RULES.custom` at the top of `custom.jst`.

The validation of the keyword name has been changed to allow any name
in this change, but this should be updated to either just remove the
test or update it to a new rule before this change is included in
the project.

Finally, this also updates a number of the tests in `custom.spec.js` to
use non-valid identifiers for the names of some of the custom keywords
being tested (primarily by adding `x-` to the front of the name).

Test Plan:
- Run `npm test` and ensure all tests run and pass
2017-01-05 10:48:12 +00:00
Evgeny Poberezkin 7613986c29 docs: about version 5.0.1-beta 2016-12-31 01:33:16 +00:00