Avrodoc

Protocols

  • ExampleProtocol com.example.service
    • logTime One-Way
    • ping

Types

Search for your schema
  • com.example_referent

    • ToBeReferred
  • com.example_referrer

    • TheReferrer
  • com.example.avro

    • EmailAddress
    • OAuthStatus Enum
    • ToDoItem
    • ToDoStatus Enum
    • TwitterAccount
    • User
  • com.example.crossref

    • Referrer
    • ZLogLevel Enum
  • com.example.service

    • CustomException Error
    • DependencyDetail
    • DependencyType Enum
    • PingResponse
    • ResponseDetail

Avrodoc

Root Type Filename Description
boolean schemata/bare_primitive.avsc
ZLogLevel schemata/cross_ref_z_types.avsc

Enum defined in a file that sorts after the file referencing it

User schemata/example.avsc

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.

Note this app doesn't actually exist. The schema is just a demo for Avrodoc!

ExampleProtocol schemata/example_with_messages.avsc

This is a protocol description for a fictitious network service.

ToBeReferred schemata/reference_referent.avsc

A simple object provided as a building block

Referrer schemata/cross_ref_a_referrer.avsc

Schema that references a type defined in a file that sorts after this one

TheReferrer schemata/reference_referrer.avsc

A complex object referencing object from another schemata

com.example.crossref

ZLogLevel

Enum defined in a file that sorts after the file referencing it

Enum symbols:

DEBUG, INFO, WARN, ERROR

com.example.avro

User

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.

Note this app doesn't actually exist. The schema is just a demo for Avrodoc!

Fields

TypeFieldDefault ValueDescriptionAnnotations
string id

System-assigned numeric user ID. Cannot be changed by the user.

  • logicalType: uuid
string username

The username chosen by the user. Can be changed by the user.

string passwordHash

The user's password, hashed using scrypt.

long signupDate

Timestamp (milliseconds since epoch) when the user signed up

  • logicalType: timestamp-millis
array<EmailAddress> emailAddresses

All email addresses on the user's account

array<TwitterAccount> twitterAccounts

All Twitter accounts that the user has OAuthed

array<ToDoItem> toDoItems

The top-level items in the user's to-do list

com.example.avro

EmailAddress

Stores details about an email address that a user has associated with their account.

Fields

TypeFieldDefault ValueDescriptionAnnotations
string address

The email address, e.g. foo@example.com

boolean verified false

true if the user has clicked the link in a confirmation email to this address.

long dateAdded

Timestamp (milliseconds since epoch) when the email address was added to the account.

  • logicalType: timestamp-millis
null | int dateBounced

Date (days since epoch) when an email sent to this address last bounced. Reset to null when the address no longer bounces.

com.example.avro

TwitterAccount

Stores access credentials for one Twitter account, as granted to us by the user by OAuth.

Fields

TypeFieldDefault ValueDescriptionAnnotations
OAuthStatus status

Indicator of whether this authorization is currently active, or has been revoked

long userId

Twitter's numeric ID for this user

string screenName

The twitter username for this account (can be changed by the user)

string oauthToken

The OAuth token for this Twitter account

null | string oauthTokenSecret

The OAuth secret, used for signing requests on behalf of this Twitter account. null whilst the OAuth flow is not yet complete.

long dateAuthorized

Timestamp (milliseconds since epoch) when the user last authorized this Twitter account

  • logicalType: timestamp-millis

com.example.avro

OAuthStatus

  • PENDING: the user has started authorizing, but not yet finished
  • ACTIVE: the token should work
  • DENIED: the user declined the authorization
  • EXPIRED: the token used to work, but now it doesn't
  • REVOKED: the user has explicitly revoked the token

Enum symbols:

PENDING, ACTIVE, DENIED, EXPIRED, REVOKED

com.example.avro

ToDoItem

A record is one node in a To-Do item tree (every record can contain nested sub-records).

Fields

TypeFieldDefault ValueDescriptionAnnotations
ToDoStatus status

User-selected state for this item (e.g. whether or not it is marked as done)

string title

One-line summary of the item

null | string description

Detailed description (may contain HTML markup)

null | long snoozeDate

Timestamp (milliseconds since epoch) at which the item should go from HIDDEN to ACTIONABLE status

array<ToDoItem> subItems

List of children of this to-do tree node

com.example.avro

ToDoStatus

  • HIDDEN: not currently visible, e.g. because it becomes actionable in future
  • ACTIONABLE: appears in the current to-do list
  • DONE: marked as done, but still appears in the list
  • ARCHIVED: marked as done and no longer visible
  • DELETED: not done and removed from list (preserved for undo purposes)

Enum symbols:

HIDDEN, ACTIONABLE, DONE, ARCHIVED, DELETED

com.example.service

DependencyType

Enum symbols:

REQUIRED, OPTIONAL

com.example.service

DependencyDetail

Details about status of a dependency.

Fields

TypeFieldDefault ValueDescriptionAnnotations
null | string name null

A short name of the service who's status is being reported

string descendingField descending "Default value"

A descending sort order field

  • order: descending
string ignoredField ignore

An ignored order sort field

  • order: ignore
null | string status null

A string representing the operational status for this service

DependencyType dependencyType

Indicates what type of dependency this refers to

null | string timestamp null

A timestamp showing the time at which this particular dependency was compiled.

Annotations

Annotation Value
enumerationType DependencyType

com.example.service

ResponseDetail

Details about the outcome of the request.

Fields

TypeFieldDefault ValueDescriptionAnnotations
int | null subCode 0

A secondary response code with greater precision.

string | null message ""

A short message describing the response status code (see the strings listing with the response codes).

com.example.service

CustomException

A exception that should be for unexpected errors and/or exceptions.

Fields

TypeFieldDefault ValueDescriptionAnnotations
int errorCode

An error code defined by common.ResponseCode constant

null | string msg null

A short message string such as Error, Success, Exception, etc.

null | string detail null

A detailed message string

com.example.service

PingResponse

Response from ping request.

Fields

TypeFieldDefault ValueDescriptionAnnotations
null | string serviceStatus null

The string OK if the service is currently up and running fully. Otherwise the string contains a diagnostic message describing the current error state.

int | null responseCode 0

The status code indicating success, failure and other response statuses.

null | ResponseDetail responseDetail null

Details about the outcome of the request. Set to null if the request had outputDetail == false.

null | array<DependencyDetail> dependencies null

List of details about all dependencies for this service.

com.example.service

ping

Indicates whether this service is available to respond to requests.

Method Parameters

TypeFieldDefault ValueDescriptionAnnotations
boolean outputDetail "false"

true if the response should contain additional details in the responseDetail field.

Return Type

TypeDescription
PingResponse

Response from ping request.

Errors

TypeDescription
CustomException

A exception that should be for unexpected errors and/or exceptions.

Annotations

Annotation Value
messageAttribute
{
   "addedBy": "inome, inc",
   "date": "01 May 2013"
}

com.example.service

logTime

Inserts a timestamp into the log file indicating that this service is still alive.

Annotations

Annotation Value
one-way true

com.example.service

ExampleProtocol

This is a protocol description for a fictitious network service.

Messages

NameDescription
logTime One-Way

Inserts a timestamp into the log file indicating that this service is still alive.

ping

Indicates whether this service is available to respond to requests.

com.example_referent

ToBeReferred

A simple object provided as a building block

Fields

TypeFieldDefault ValueDescriptionAnnotations
boolean value

The value of the object to be referenced

string history

A history field detailing random information about the object

com.example.crossref

Referrer

Schema that references a type defined in a file that sorts after this one

Fields

TypeFieldDefault ValueDescriptionAnnotations
string name

Name field

ZLogLevel level

References a type from cross_ref_z_types.avsc (sorts after this file)

com.example_referrer

TheReferrer

A complex object referencing object from another schemata

Fields

TypeFieldDefault ValueDescriptionAnnotations
string name

the name of the referrer object

ToBeReferred externalObject

An object from another schemata

com.example.crossref

ZLogLevel

Defined in:

  • schemata/cross_ref_z_types.avsc

Enum defined in a file that sorts after the file referencing it

Enum symbols:

DEBUG, INFO, WARN, ERROR

com.example.avro

User

Defined in:

  • schemata/example.avsc

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.

Note this app doesn't actually exist. The schema is just a demo for Avrodoc!

Fields

TypeFieldDefault ValueDescriptionAnnotations
string id

System-assigned numeric user ID. Cannot be changed by the user.

  • logicalType: uuid
string username

The username chosen by the user. Can be changed by the user.

string passwordHash

The user's password, hashed using scrypt.

long signupDate

Timestamp (milliseconds since epoch) when the user signed up

  • logicalType: timestamp-millis
array<EmailAddress> emailAddresses

All email addresses on the user's account

array<TwitterAccount> twitterAccounts

All Twitter accounts that the user has OAuthed

array<ToDoItem> toDoItems

The top-level items in the user's to-do list

com.example.avro

EmailAddress

Defined in:

  • schemata/example.avsc

Stores details about an email address that a user has associated with their account.

Fields

TypeFieldDefault ValueDescriptionAnnotations
string address

The email address, e.g. foo@example.com

boolean verified false

true if the user has clicked the link in a confirmation email to this address.

long dateAdded

Timestamp (milliseconds since epoch) when the email address was added to the account.

  • logicalType: timestamp-millis
null | int dateBounced

Date (days since epoch) when an email sent to this address last bounced. Reset to null when the address no longer bounces.

com.example.avro

TwitterAccount

Defined in:

  • schemata/example.avsc

Stores access credentials for one Twitter account, as granted to us by the user by OAuth.

Fields

TypeFieldDefault ValueDescriptionAnnotations
OAuthStatus status

Indicator of whether this authorization is currently active, or has been revoked

long userId

Twitter's numeric ID for this user

string screenName

The twitter username for this account (can be changed by the user)

string oauthToken

The OAuth token for this Twitter account

null | string oauthTokenSecret

The OAuth secret, used for signing requests on behalf of this Twitter account. null whilst the OAuth flow is not yet complete.

long dateAuthorized

Timestamp (milliseconds since epoch) when the user last authorized this Twitter account

  • logicalType: timestamp-millis

com.example.avro

OAuthStatus

Defined in:

  • schemata/example.avsc
  • PENDING: the user has started authorizing, but not yet finished
  • ACTIVE: the token should work
  • DENIED: the user declined the authorization
  • EXPIRED: the token used to work, but now it doesn't
  • REVOKED: the user has explicitly revoked the token

Enum symbols:

PENDING, ACTIVE, DENIED, EXPIRED, REVOKED

com.example.avro

ToDoItem

Defined in:

  • schemata/example.avsc

A record is one node in a To-Do item tree (every record can contain nested sub-records).

Fields

TypeFieldDefault ValueDescriptionAnnotations
ToDoStatus status

User-selected state for this item (e.g. whether or not it is marked as done)

string title

One-line summary of the item

null | string description

Detailed description (may contain HTML markup)

null | long snoozeDate

Timestamp (milliseconds since epoch) at which the item should go from HIDDEN to ACTIONABLE status

array<ToDoItem> subItems

List of children of this to-do tree node

com.example.avro

ToDoStatus

Defined in:

  • schemata/example.avsc
  • HIDDEN: not currently visible, e.g. because it becomes actionable in future
  • ACTIONABLE: appears in the current to-do list
  • DONE: marked as done, but still appears in the list
  • ARCHIVED: marked as done and no longer visible
  • DELETED: not done and removed from list (preserved for undo purposes)

Enum symbols:

HIDDEN, ACTIONABLE, DONE, ARCHIVED, DELETED

com.example.service

DependencyType

Defined in:

  • schemata/example_with_messages.avsc

Enum symbols:

REQUIRED, OPTIONAL

com.example.service

DependencyDetail

Defined in:

  • schemata/example_with_messages.avsc

Details about status of a dependency.

Fields

TypeFieldDefault ValueDescriptionAnnotations
null | string name null

A short name of the service who's status is being reported

string descendingField descending "Default value"

A descending sort order field

  • order: descending
string ignoredField ignore

An ignored order sort field

  • order: ignore
null | string status null

A string representing the operational status for this service

DependencyType dependencyType

Indicates what type of dependency this refers to

null | string timestamp null

A timestamp showing the time at which this particular dependency was compiled.

Annotations

Annotation Value
enumerationType DependencyType

com.example.service

ResponseDetail

Defined in:

  • schemata/example_with_messages.avsc

Details about the outcome of the request.

Fields

TypeFieldDefault ValueDescriptionAnnotations
int | null subCode 0

A secondary response code with greater precision.

string | null message ""

A short message describing the response status code (see the strings listing with the response codes).

com.example.service

CustomException

Defined in:

  • schemata/example_with_messages.avsc

A exception that should be for unexpected errors and/or exceptions.

Fields

TypeFieldDefault ValueDescriptionAnnotations
int errorCode

An error code defined by common.ResponseCode constant

null | string msg null

A short message string such as Error, Success, Exception, etc.

null | string detail null

A detailed message string

com.example.service

PingResponse

Defined in:

  • schemata/example_with_messages.avsc

Response from ping request.

Fields

TypeFieldDefault ValueDescriptionAnnotations
null | string serviceStatus null

The string OK if the service is currently up and running fully. Otherwise the string contains a diagnostic message describing the current error state.

int | null responseCode 0

The status code indicating success, failure and other response statuses.

null | ResponseDetail responseDetail null

Details about the outcome of the request. Set to null if the request had outputDetail == false.

null | array<DependencyDetail> dependencies null

List of details about all dependencies for this service.

com.example.service

ping

Defined in:

  • schemata/example_with_messages.avsc

Indicates whether this service is available to respond to requests.

Method Parameters

TypeFieldDefault ValueDescriptionAnnotations
boolean outputDetail "false"

true if the response should contain additional details in the responseDetail field.

Return Type

TypeDescription
PingResponse

Response from ping request.

Errors

TypeDescription
CustomException

A exception that should be for unexpected errors and/or exceptions.

Annotations

Annotation Value
messageAttribute
{
   "addedBy": "inome, inc",
   "date": "01 May 2013"
}

com.example.service

logTime

Defined in:

  • schemata/example_with_messages.avsc

Inserts a timestamp into the log file indicating that this service is still alive.

Annotations

Annotation Value
one-way true

com.example.service

ExampleProtocol

Defined in:

  • schemata/example_with_messages.avsc

This is a protocol description for a fictitious network service.

Messages

NameDescription
logTime One-Way

Inserts a timestamp into the log file indicating that this service is still alive.

ping

Indicates whether this service is available to respond to requests.

com.example_referent

ToBeReferred

Defined in:

  • schemata/reference_referent.avsc

A simple object provided as a building block

Fields

TypeFieldDefault ValueDescriptionAnnotations
boolean value

The value of the object to be referenced

string history

A history field detailing random information about the object

com.example.crossref

Referrer

Defined in:

  • schemata/cross_ref_a_referrer.avsc

Schema that references a type defined in a file that sorts after this one

Fields

TypeFieldDefault ValueDescriptionAnnotations
string name

Name field

ZLogLevel level

References a type from cross_ref_z_types.avsc (sorts after this file)

com.example_referrer

TheReferrer

Defined in:

  • schemata/reference_referrer.avsc

A complex object referencing object from another schemata

Fields

TypeFieldDefault ValueDescriptionAnnotations
string name

the name of the referrer object

ToBeReferred externalObject

An object from another schemata