Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
160 lines (159 sloc) 6.081 kb
{
"type": "record",
"name": "User",
"namespace": "com.example.avro",
"doc": "This is a user record in a fictitious to-do-list management app. It supports arbitrary grouping and nesting of items, and allows you to add items by email or by tweeting.\n\nNote this app doesn't actually exist. The schema is just a demo for [Avrodoc](https://github.com/ept/avrodoc)!",
"fields": [
{
"name": "id",
"doc": "System-assigned numeric user ID. Cannot be changed by the user.",
"type": "int"
},
{
"name": "username",
"doc": "The username chosen by the user. Can be changed by the user.",
"type": "string"
},
{
"name": "passwordHash",
"doc": "The user's password, hashed using [scrypt](http://www.tarsnap.com/scrypt.html).",
"type": "string"
},
{
"name": "signupDate",
"doc": "Timestamp (milliseconds since epoch) when the user signed up",
"type": "long"
},
{
"name": "emailAddresses",
"doc": "All email addresses on the user's account",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "EmailAddress",
"doc": "Stores details about an email address that a user has associated with their account.",
"fields": [
{
"name": "address",
"doc": "The email address, e.g. `foo@example.com`",
"type": "string"
},
{
"name": "verified",
"doc": "true if the user has clicked the link in a confirmation email to this address.",
"type": "boolean",
"default": false
},
{
"name": "dateAdded",
"doc": "Timestamp (milliseconds since epoch) when the email address was added to the account.",
"type": "long"
},
{
"name": "dateBounced",
"doc": "Timestamp (milliseconds since epoch) when an email sent to this address last bounced. Reset to null when the address no longer bounces.",
"type": ["null", "long"]
}
]
}
}
},
{
"name": "twitterAccounts",
"doc": "All Twitter accounts that the user has OAuthed",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "TwitterAccount",
"doc": "Stores access credentials for one Twitter account, as granted to us by the user by OAuth.",
"fields": [
{
"name": "status",
"doc": "Indicator of whether this authorization is currently active, or has been revoked",
"type": {
"type": "enum",
"name": "OAuthStatus",
"doc": "* `PENDING`: the user has started authorizing, but not yet finished\n* `ACTIVE`: the token should work\n* `DENIED`: the user declined the authorization\n* `EXPIRED`: the token used to work, but now it doesn't\n* `REVOKED`: the user has explicitly revoked the token",
"symbols": ["PENDING", "ACTIVE", "DENIED", "EXPIRED", "REVOKED"]
}
},
{
"name": "userId",
"doc": "Twitter's numeric ID for this user",
"type": "long"
},
{
"name": "screenName",
"doc": "The twitter username for this account (can be changed by the user)",
"type": "string"
},
{
"name": "oauthToken",
"doc": "The OAuth token for this Twitter account",
"type": "string"
},
{
"name": "oauthTokenSecret",
"doc": "The OAuth secret, used for signing requests on behalf of this Twitter account. `null` whilst the OAuth flow is not yet complete.",
"type": ["null", "string"]
},
{
"name": "dateAuthorized",
"doc": "Timestamp (milliseconds since epoch) when the user last authorized this Twitter account",
"type": "long"
}
]
}
}
},
{
"name": "toDoItems",
"doc": "The top-level items in the user's to-do list",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "ToDoItem",
"doc": "A record is one node in a To-Do item tree (every record can contain nested sub-records).",
"fields": [
{
"name": "status",
"doc": "User-selected state for this item (e.g. whether or not it is marked as done)",
"type": {
"type": "enum",
"name": "ToDoStatus",
"doc": "* `HIDDEN`: not currently visible, e.g. because it becomes actionable in future\n* `ACTIONABLE`: appears in the current to-do list\n* `DONE`: marked as done, but still appears in the list\n* `ARCHIVED`: marked as done and no longer visible\n* `DELETED`: not done and removed from list (preserved for undo purposes)",
"symbols": ["HIDDEN", "ACTIONABLE", "DONE", "ARCHIVED", "DELETED"]
}
},
{
"name": "title",
"doc": "One-line summary of the item",
"type": "string"
},
{
"name": "description",
"doc": "Detailed description (may contain HTML markup)",
"type": ["null", "string"]
},
{
"name": "snoozeDate",
"doc": "Timestamp (milliseconds since epoch) at which the item should go from `HIDDEN` to `ACTIONABLE` status",
"type": ["null", "long"]
},
{
"name": "subItems",
"doc": "List of children of this to-do tree node",
"type": {
"type": "array",
"items": "ToDoItem"
}
}
]
}
}
}
]
}
Jump to Line
Something went wrong with that request. Please try again.