Skip to content

Instantly share code, notes, and snippets.

@ducin
Created January 26, 2020 17:12
Show Gist options
  • Save ducin/3c631383d093ed2d4ca394c84dcec8ae to your computer and use it in GitHub Desktop.
Save ducin/3c631383d093ed2d4ca394c84dcec8ae to your computer and use it in GitHub Desktop.
various json schemas
{
"type": "object",
"properties": {
"orderId": {
"type": "string",
"faker": "random.uuid"
},
"customer": {
"type": "string",
"faker": "name.findName"
},
"items": {
"type": "array",
"minItems": 2,
"maxItems": 5,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"faker": "commerce.product"
},
"price": {
"type": "number",
"minimum": 0.1,
"maximum": 10
},
"quantity": {
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"required": [
"name",
"price",
"quantity"
]
}
}
},
"required": [
"orderId",
"customer",
"items"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment