diff --git a/README.md b/README.md index ea51bf7f16907c107b041121ce8fe9747b5d0f03..cd5e796a33b76c276ff6e2eb76d9f47835b8903a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,12 @@ ## What's next? -The latest `RC16` comes with some deprecations and breaking-changes towards `v0.5.x` API: +On `RC17` support for more keywords landed, but is still outdated from recent JSON-Schema drafts. + +- Many bugs were _gone_ and no new features were introduced this time, documentation is still incomplete. +- Support for `not` keywords are still missing or partially working, please [read the docs](docs/USAGE.md) to see all supported keywords. + +Since `RC16` comes with some deprecations and breaking-changes towards `v0.5.x` API: - **deprecated** — You will not longer be able to call `jsf()` and get a fully-dereferenced result. It will just generate given refs and inline ones, nothing else. - `jsf.generate()` is the sync-version, with partial dereferencing through given refs, etc. diff --git a/dist/index.umd.js b/dist/index.umd.js index 4c678eaedbdc8865a94837d75b390d62eabb752b..ba7f2f2cbf6af2ef2e5f315c1057be2e3a2fce53 100644 Binary files a/dist/index.umd.js and b/dist/index.umd.js differ diff --git a/docs/USAGE.md b/docs/USAGE.md index ed1ecc0342673b128e2fce3bd305b4f98c763e03..8e332015ec3503cc841255e02f4547a39de79d69 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -133,12 +133,13 @@ Below is the list of supported keywords: - `required` — All required properties are guaranteed, if not can be omitted. - `pattern` — Generate samples based on RegExp values. - `format` — Core formats **v4-draft only**: - [`date-time`](http://json-schema.org/draft-04/json-schema-validation.html#anchor108), +- [`date-time`](http://json-schema.org/draft-04/json-schema-validation.html#anchor108), [`email`](http://json-schema.org/draft-04/json-schema-validation.html#anchor111), [`hostname`](http://json-schema.org/draft-04/json-schema-validation.html#anchor114), [`ipv4`](http://json-schema.org/draft-04/json-schema-validation.html#anchor117), [`ipv6`](http://json-schema.org/draft-04/json-schema-validation.html#anchor120) and [`uri`](http://json-schema.org/draft-04/json-schema-validation.html#anchor123) + — also `uri-reference`, `uri-template`, `json-pointer` and `uuid` are supported. -- [demo ยป](http://json-schema-faker.js.org/#gist/f58db80cbf52c12c623166090240d964) - `enum` — Returns any of these enumerated values. - `minLength`, `maxLength` — Applies length constraints to string values. @@ -154,7 +155,7 @@ Below is the list of supported keywords: - `minProperties`, `maxProperties` — Adds length constraints for object properties. - `patternProperties` — RegExp-based object properties. - `additionalProperties` — Partially supported (?) -- `dependencies` — Not supported yet (?) +- `dependencies` — Partially supported (?) - `not` — Not supported yet (?) > Notice `not` support is complex to achieve and is probably will not work as you expected, most opened issues are related to that: so any feedback there is very appreaciated! @@ -340,6 +341,9 @@ You may define following options for `jsf` that alter its behavior: jsf.option({ failOnInvalidTypes: false }); + +// also valid +jsf.option('alwaysFakeOptionals', true); ``` > Please read the [available options here](./#available-options). diff --git a/package-lock.json b/package-lock.json index 4ff3ccd92ed2923b27aea6d850a4d309b7852fc0..e95a822a023f004f4cbaeb82fb03aef88b05b500 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 15fb8b928be7308311ae3bf5b73f6a77c875dafe..9846c4a94f9db942871fc3596691bc7d987ed3bc 100644 --- a/package.json +++ b/package.json @@ -59,20 +59,22 @@ "clone": "^2.1.2", "codecov": "^3.0.0", "concat": "^1.0.3", + "cryptiles": "^4.1.3", "esm": "^3.0.82", + "extend": "^3.0.2", "faker": "^4.1.0", - "fs-extra": "^7.0.0", + "fs-extra": "^8.0.1", "glob": "^7.1.2", "is-my-json-valid": "^2.19.0", - "mocha": "^6.0.0", - "nyc": "^13.3.0", + "mocha": "^6.1.4", + "nyc": "^14.1.1", "rollup": "^1.2.2", - "rollup-plugin-commonjs": "^9.1.0", - "rollup-plugin-node-resolve": "^4.0.0", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-node-resolve": "^5.0.0", "seedrandom": "^3.0.1", - "semver": "^5.3.0", + "semver": "^6.1.1", "tv4": "^1.3.0", - "z-schema": "^3.18.4" + "z-schema": "^4.1.0" }, "dependencies": { "json-schema-ref-parser": "^6.0.2",