RAML 2 HTML
RAML 2 HTML for PHP is a lightweight, easy to configure, and easy to customize script to build extensive, multi-page API documentation from a RAML (RESTful API Modeling Language) file. RAML 2 HTML also takes advantage of APC (if enabled in config) to reduce rendering time (especially of remote RAML files).
RAML 2 HTML for PHP Demo
RAML 2 HTML for PHP v1.2 (alpha)
To get started all one has to do is update config.php with the location of their RAML file, and all design aspects of the script are stored in the templates folder allowing full customization of the look and feel of your API Docs.
This script does not include the RAML Console or the API Notebook (in order to keep it lightweight), however both of these tools can be downloaded from the RAML website providing even documentation and interactive tools for your developers.
Setting Up the Config
RAML 2 HTML was designed to be both lightweight and quick to use/ customize. The config contains 4 variables allowing you to set where your RAML file is, control what HTTP Action Verbs you allow, set caching, and work with different templates.
1 2 3 4 5 6 7 8 9 10 11 |
// Source of Your RAML file (local or http)
$RAMLsource = 'http://api-portal.anypoint.mulesoft.com/twitter/api/twitter-rest-api/twitter-rest-api.raml'; // Types of Action Verbs Allowed
$RAMLactionVerbs = array('get', 'post', 'put', 'patch', 'delete', 'connect', 'trace'); // APC Cache Time Limit - set to "0" to disable
$cacheTimeLimit = '36000'; // Path to the theme file for the docs
$docsTheme = 'templates/grey/index.phtml'; |
Installing RAML 2 HTML
RAML 2 HTML can be run on any server utilizing PHP 5.3+
Coding Restrictions
- APC is only available if installed
- Remote RAML files only accessible if enabled in php.ini
Bugs
- No known errors
Backwards Compatibility
- Version 1.0 is NOT BC with 0.2
Awards (Yay)
– listed in the order received
Usage
RAML 2 HTML was released under the GPL version 2 license.
Download
RAML – Efficient, Easy API Documentation Swag… It’s the Little Things