Skip to content

Instantly share code, notes, and snippets.

@blikblum
Created July 5, 2022 03:46
Show Gist options
  • Save blikblum/34189137c2fc32ab1be5005bdd2a045e to your computer and use it in GitHub Desktop.
Save blikblum/34189137c2fc32ab1be5005bdd2a045e to your computer and use it in GitHub Desktop.
json schema faker allOf
{
"type": "object",
"properties": {
"collection": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/definitions/model"
}
],
"properties": {
"cash": {
"faker": {
"finance.amount": [
100,
10000,
2,
"$"
]
}
}
}
}
}
},
"required": [
"collection"
],
"definitions": {
"model": {
"type": "object",
"properties": {
"cash": {
"type": "string"
}
},
"required": [
"cash"
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment