• This repository has been archived on 05/Dec/2023
  • Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created about 12 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Documentation tool for Avro schemas

Avrodoc

Avrodoc is a documentation tool for Avro schemas. It reads schemas in Avro's JSON schema format -- *.avsc files -- and renders them nicely in a web browser.

Take a look at the example, which is generated from this schema.

Why? Because your data type definitions are your most important API... and you would never make an API without good documentation, would you?

How to use

You need node.js installed.

Avrodoc can be used in two modes of operation:

  • As a command-line tool, taking one or more Avro schema files, and generating a self-contained HTML file that you can put on a web server, send by email, check into your repository, etc.
  • As a Node.js web app, serving documentation for any Avro schema files you put in in the server's schemata directory.

To run as a command-line tool:

$ npm install avrodoc -g
$ avrodoc [my-schema.avsc [another-schema.avsc...]] [-o=my-documentation.html] [> my-documentation.html] [-- my-schema.avsc [another-schema.avsc]]
# open my-documentation.html in a web browser

To run as a web app:

$ git clone git://github.com/ept/avrodoc.git
$ cd avrodoc
# put your schema files in the schemata/ directory
$ npm update
$ node app
# open http://localhost:8124/ in a web browser

If you want to change the schema file directory, set the SCHEMA_DIR environment variable. If you want to use a port other than 8124, set the PORT environment variable. The app is ready to deploy to Heroku: add your schema files to the schemata directory, commit, then run heroku create && git push heroku master.

Features

  • Excellent for getting an overview of a complex schema with many nested records
  • Support for Markdown in doc strings, so you can add links, emphasis etc.
  • Detects duplicate definitions of types across schema files, and does the right thing
  • Fully compatible with Avro IDL 1.7.3

Testing

To run the browser tests locally on your machine:

  1. Download the ChromeDriver server for your OS, and put it in your $PATH.
  2. Download the standalone Selenium server.
  3. Run Selenium server: java -jar selenium-server-standalone-$VERSION.jar
  4. Run the Avrodoc web app: node app
  5. Run the tests: grunt selenium

To run the browser tests remotely in the cloud:

  1. Sign up for a free account at Sauce Labs.
  2. Download Sauce Connect.
  3. Run Sauce Connect, providing the username and API key of your account: java -jar Sauce-Connect.jar -P 4444 $USERNAME $API_KEY.
  4. Run the Avrodoc web app: node app
  5. Run the tests: grunt selenium

Meta

Copyright 2012 Martin Kleppmann. Licensed under the Apache License, Version 2.0. See LICENSE for details. Thanks to contributors:

Pull requests welcome.

More Repositories

1

ddia-references

Literature references for “Designing Data-Intensive Applications”
5,786
star
2

hermitage

What are the differences between the transaction isolation levels in databases? This is a suite of test cases which differentiate isolation levels.
2,400
star
3

crdt-website

Source of the crdt.tech website
CSS
407
star
4

invoicing

Ruby invoicing framework gem
Ruby
202
star
5

uploadr.py

Command-line Python script to upload photos to Flickr
Python
108
star
6

newsfeed

Demo: implementing a Twitter-like news feed using Apache Samza
Java
83
star
7

dist-sys

Distributed systems lecture notes
TeX
56
star
8

warc-hadoop

WARC (Web Archive) Input and Output Formats for Hadoop
Java
35
star
9

neo4j-scala-template

Template for a new Scala project using the Neo4j graph database and Jersey JSON REST API, including build config and example tests
Scala
32
star
10

neo4j-resources

Scala implementation of RESTful JSON HTTP resources on top of the Neo4j graph database and Jersey
Scala
25
star
11

fuego-diff

Java library for computing structural differences between XML document trees
Java
23
star
12

byzantine-eventual

Byzantine Eventual Consistency
TeX
21
star
13

ddia2-feedback

Reader feedback on the early release of Designing Data-Intensive Applications, second edition
20
star
14

jxirr

Excel compatible XIRR (Internal Rate of Return) implementation in Java
Java
20
star
15

cap-critique

Source of paper “A critique of the CAP theorem”
TeX
16
star
16

plotkit

Git import of Alastair Tse's chart and graph plotting library for Javascript
JavaScript
15
star
17

saas-template

Ruby
14
star
18

spake2-signal

JavaScript
14
star
19

blog

Source of my personal blog, using Markdown, Jekyll and Heroku
HTML
13
star
20

pushpin-papoc

PushPin: Towards Production-Quality Peer-to-Peer Collaboration
TeX
12
star
21

maniation

Constrained rigid body simulation for 3D character animation
Java
10
star
22

slate-automerge

JavaScript
9
star
23

debs-keynote

Keynote at the 15th ACM International Conference on Distributed and Event-Based Systems (DEBS)
TeX
8
star
24

compsci

Computer Science exercises and teaching materials
OCaml
7
star
25

oaccounts

Open standard for companies' financial data - storing and transmitting
Scala
7
star
26

bespin-on-rails

Bespin on Rails is a simple Ruby on Rails plugin that allows you to embed the Mozilla Bespin code editor component in your Rails views using simple helper tags.
JavaScript
7
star
27

selenium-rc

Python
6
star
28

selenium-client

Go Test It fork of Ruby client library for Selenium RC
Ruby
6
star
29

selenium-core

JavaScript
5
star
30

cracktastic

Very silly Rails app for demonstrating the Ruby invoicing gem. It's about selling christmas cracker jokes.
Ruby
5
star
31

windmill

Git import of the Windmill project
JavaScript
5
star
32

hbase-es

HBase-to-Elasticsearch proof of concept
Java
4
star
33

cotweet-export

Download/dump the data in your CoTweet standard account before it gets shut down
Ruby
4
star
34

chinese

Resources for Chinese learners
3
star
35

libv8-debian

For building v8 (Google's JavaScript engine) as a Debian package
C++
3
star
36

ept.github.com

Website at ept.github.com
2
star
37

flowquery

Ruby
2
star
38

drawing-game

Ruby
2
star
39

invoicing_generator

Scaffold generation tool for the invoicing Ruby gem
Ruby
1
star
40

curve25519

Deriving an implementation of Curve25519 from first principles
TeX
1
star
41

asciidraw

Objective-C
1
star
42

flow

Ruby
1
star
43

discrete-maths

Isabelle formalisation of discrete maths problems
Isabelle
1
star