Skip to content

Commit 898b2c1

Browse files
morganneyducin
authored andcommitted
v0.3.2
1 parent acd65ed commit 898b2c1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/jsonschema-faker-options.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The `external` option needs to be an array of objects, each of them needs to
3939
have following 4 fields defined:
4040

4141
* *`name`*: `string`. This is just a name of the external source. It will be used in the JSON schema (as a `json-schema-faker` *custom format*)
42-
* *`generator`*: `string` [`random`|`cycle`]. Currently, two generators are provided, but you may write your own
42+
* *`generator`*: `string`|`function`. Currently, the `string` option provides two generators (`random`|`cycle`), but you may use a `function` to provide your own custom [generator](https://github.com/json-schema-faker/grunt-jsonschema-faker/blob/master/generators.js).
4343
* *`src`*: `string`. Path to the external data source file.
4444
* *`map`*: `function`. This function will be used by [`_.map`](https://lodash.com/docs#map) to modify each element from the source file. You may return only the *id* of each source element, but you may as well need to return a complex structure to re-use.
4545

@@ -66,5 +66,5 @@ keeping consistent relations between files.
6666
* it loads the content from `src` file
6767
* map all elements using given `map` function
6868
* creates a *closure* that will have access to the mapped collection. The closure returns single values (which are products of `map`) and the strategy depends on `generator` used.
69-
* the closure is registered as an ordinary [`json-schema-faker` custom format](https://github.com/json-schema-faker/json-schema-faker#custom-formats) using the `name`
69+
* the closure is registered as an ordinary [`json-schema-faker` custom format](https://github.com/json-schema-faker/json-schema-faker#custom-formats) using the `name`
7070
* the JSON schema will handle custom `name` format.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "grunt-jsonschema-faker",
33
"description": "Grunt task generating fake data according to JSON schema",
4-
"version": "0.3.1",
4+
"version": "0.3.2",
55
"author": "Tomasz Ducin <[email protected]>",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)