Skip to content

Instantly share code, notes, and snippets.

@jonathanRose
Created June 20, 2017 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanRose/87d70449a3a1df3f1bae1f6d6d4a7971 to your computer and use it in GitHub Desktop.
Save jonathanRose/87d70449a3a1df3f1bae1f6d6d4a7971 to your computer and use it in GitHub Desktop.
{
"title": "books",
"type": "array",
"items": {
"$ref": "#/definitions/book"
},
"definitions": {
"book": {
"properties": {
"title": {
"type": "string"
},
"bookId": {
"type": "string",
"chance": "guid"
},
"dateCreated": {
"type": "string",
"format": "date-time",
"faker": "date.recent"
},
"lastUpdated": {
"type": "string",
"format": "date-time",
"faker": "date.recent"
},
"author": {
"$ref": "#/definitions/author"
}
},
"required": ["title", "bookId", "author", "dateCreated", "lastUpdated"]
},
"author": {
"properties": {
"authorId": {
"type": "string",
"chance": "guid"
},
"firstName": {
"type": "string",
"faker": "name.firstName"
},
"lastName": {
"type": "string",
"faker": "name.lastName"
},
"dateCreated": {
"type": "string",
"format": "date-time",
"faker": "date.recent"
},
"lastUpdated": {
"type": "string",
"format": "date-time",
"faker": "date.recent"
}
},
"required": ["authorId", "firstName", "lastName", "dateCreated", "lastUpdated"]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment