Skip to content

Instantly share code, notes, and snippets.

@TakashiSasaki
Last active December 23, 2015 02:39
Show Gist options
  • Save TakashiSasaki/6568391 to your computer and use it in GitHub Desktop.
Save TakashiSasaki/6568391 to your computer and use it in GitHub Desktop.
A JSON schema to describe tags, labels and folders for generic document organizing
{
"name": "draft",
"uniqueId": "https://mail.google.com/mail/u/0/#drafts",
"distinction": "global"
}
{
"name": "important",
"uniqueId": "https://mail.google.com/mail/u/0/#imp",
"distinction": "global"
}
{
"name": "trash",
"uniqueId": "https://mail.google.com/mail/u/0/#spam",
"distinction": "global"
}
{
"name": "starred",
"uniqueId": "https://mail.google.com/mail/u/0/#starred",
"distinction": "global"
}

A JSON schema to describe tags, labels and folders for generic document organizing. It should be validated by http://jsonschemalint.com/ .

{
"$schema": "http://json-schema.org/draft-03/schema",
"id": "https://gist.github.com/TakashiSasaki/6568391/raw/tags-labels-folders.schema.json",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"uniqueId": {
"type": [
"string",
"null"
]
},
"distinction": {
"enum": [
"local",
"global",
"none"
]
},
"separator": {
"type": [
"string",
"null"
]
},
"parentName": {
"type": [
"string",
"null"
]
},
"parentUniqueId": {
"type": [
"string",
"null"
]
}
}
}
{
"name": "trash",
"uniqueId": "https://mail.google.com/mail/u/0/#trash",
"distinction": "global"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment