Skip to content
Snippets Groups Projects
Commit ee89a8f3 authored by Alvaro Cabrera's avatar Alvaro Cabrera
Browse files

Support for chance-generator

parent e9baa953
Branches
Tags
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
"z-schema": "^3.1.3" "z-schema": "^3.1.3"
}, },
"dependencies": { "dependencies": {
"chance": "^0.6.4",
"deref": "^0.2.5", "deref": "^0.2.5",
"faker": "^2.1.0", "faker": "^2.1.0",
"randexp": "^0.4.0" "randexp": "^0.4.0"
......
...@@ -78,6 +78,29 @@ ...@@ -78,6 +78,29 @@
"required": ["name", "email"] "required": ["name", "email"]
}, },
"valid": true "valid": true
},
{
"description": "should handle format (chance)",
"schema": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"chance": "guid"
},
"emailAddr": {
"type": "string",
"chance": {
"email": {
"domain": "fake.com"
}
},
"pattern": ".+@fake.com"
}
},
"required": ["userId", "emailAddr"]
},
"valid": true
} }
] ]
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment