Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mozilla project submissions for Facebook's Open Academy 2014
Project Description:
The Firefox Marketplace is entirely based on REST APIs. By the end of next year, all parts of our site will use the Marketplace API instead of using the Django views and templates that they previously have been. There are very few tools, however, that seamlessly integrate the many aspects of API development, namely testing, documentation, and development. We'd like to build a tool to fill this void and release it as an open source project under the MPL2 that any team or company can use to easily use with their own API.
The project (yet untitled) is to build a tool which, from a schema file (based on no particular format), can create the following: full API documentation in HTML, a simple test server which mimics the output of the API described in the schema using dummy data, basic code to test implementations of the schema (perhaps compatible with Travis CI), and/or a web interface capable of interacting with the API (i.e.: an "API playground"). The final product of the project will be advertised as a complete tool for building, testing, and documenting a REST API. The project will be given a page on The project would preferably be written in JS, Python, or Go.
Task #1 is required, and students will be allowed to choose which of tasks 2-5 (any or all) they wish to work on.
Development of a schema format (or use of an existing format). Must be human-friendly and thoroughly documented. Any basic format is fine (JSON, YAML, XML, etc.).
Development of a tool to generate HTML documentation from the schema format. The HTML generated must provide equivalent (or better) information than the existing API documentation for the Firefox Marketplace. Students must write tests to ensure the output generated is correct.
Development of a tool that generates code to run a REST server that matches the behavior of a schema file. The generated server should simply output dummy data in lieu of normal data. Students must write tests to ensure each feature of the generated servers matches the behavior of the schema. [1]
Development of a tool that generates an "API playground" from the schema file. Such a tool would allow users to interact with the API without needing to manually craft HTTP requests, authenticate, etc. Students will need to write functional tests (using CasperJS, for instance) to test the behavior of the generated playgrounds. [2]
Development of a tool that generates code that integrates with a test runner (nosetests, mocha, go test, etc.) and executes basic commands (create, list, read, update, delete, etc.) against an API which is build against the schema. The generated code should provide output that describes which, if any, parts of the API do not meet the schema's requirements. Students may use this to test task #3. Students must write tests to assert that the tests generated by this tool do indeed test what they are advertised to.
Students will be asked to give peer code reviews (code reviews will also be offered by the mentors). Students will be asked--for each of the above tasks that they choose to build--to write specifications outlining scope and features that are intended to be completed, tests, and documentation. Team members will not be assigned dedicated roles, but all students will be encouraged to participate in all phases of development.
[1] A sample "dummy data" server is already in use by the Marketplace. See for reference.
[2] A sample API playground is in place, though it needs much work. See and for reference.
Matt Basta - Matt is a JavaScript, Python, and PHP programmer. He builds the front-end of the Firefox Marketplace and the tools that interact with it.
Chris Van - Chris is a full-stack developer on the Firefox Marketplace team. He works on everything from tweaking the API to changing graphics on the front-end.
Special Requests:
Students should have a basic background in web technologies (HTTP, REST, API design, etc.) and should be competent with JavaScript and HTML.
NOTE: This team is requesting 7-8 students for their project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment