MIKESTOWE.COM

you are here

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.

PHP
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

  1. APC is only available if installed
  2. 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

https://github.com/mikestowe/php-raml2html

Share this Page:
Facebook Twitter Linkedin Reddit Tumblr Email

4 Responses to “RAML 2 HTML”

Leave a Reply

Your email address will not be published. Required fields are marked *