Metadata
Schema
-
A metadata block:
-
must be an object
-
may have a title property
-
may have a description property
-
may have a created property
-
may have an updated property
-
may have an authors property
-
may have a license property
-
-
The title property:
- must be a string
-
The description property:
- must be a string
-
The created property:
- must be a string
-
The updated property:
- must be a string
-
The authors property:
-
must be an array
-
must contain at least one item
-
Each author:
-
must be an object
-
must be unique
-
must have a name property
-
may have an email property
-
-
The name property:
- must be a string
-
The email property:
-
must be a string
-
must hold an email address
-
-
-
The license property:
- must be a string
Examples
Author
{
"authors": [
{
"name": "John Doe"
}
]
}
Authors and license
{
"authors": [
{
"name": "John Doe",
"email": "john@mail.com"
},
{
"name": "Jane Doe",
"email": "jane@mail.com"
}
],
"license": "CC"
}
Title and description
{
"authors": [
{
"name": "John Doe"
}
],
"title": "Lorem",
"description": "Lorem ipsum dolor sit amet"
}
Updated and created dates
{
"created": "2016-09-01T10:00:00",
"updated": "2016-09-03T11:50:00"
}
Extra data
{
"authors": [
{
"name": "John Doe",
"email": "john@mail.com",
"avatar": {
"type": "image/png",
"url": "http://domain.com/john.png"
}
}
],
"license": "CC",
"created": "2015-06-03",
"modified": "2015-06-08",
"views": 1546
}