Skip to content

Instantly share code, notes, and snippets.

@piecioshka piecioshka/schema.json
Last active Jun 22, 2019

Embed
What would you like to do?
[schema: photos]
{
"id": "photos",
"type": "object",
"required": [
"photos"
],
"properties": {
"photos": {
"type": "array",
"minItems": 20,
"items": {
"type": "object",
"required": [
"id",
"created_time",
"author",
"description",
"image_url"
],
"properties": {
"id": {
"chance": {
"guid": {}
}
},
"created_time": {
"type": "string",
"faker": {
"fake": "{{date.past}}"
}
},
"author": {
"type": "object",
"required": [
"id",
"name",
"avatar_url"
],
"properties": {
"id": {
"chance": {
"guid": {}
}
},
"name": {
"type": "string",
"faker": {
"fake": "{{name.firstName}} {{name.lastName}}"
}
},
"avatar_url": {
"type": "string",
"faker": {
"fake": "{{image.avatar}}"
}
}
}
},
"description": {
"chance": {
"paragraph": {
"sentences": 1
}
}
},
"image_url": {
"type": "string",
"faker": {
"fake": "https://picsum.photos/id/{{random.number(1084)}}/300/150/"
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.