Skip to content
An API Blueprint parser in PHP
Branch: master
Clone or download
Latest commit 4ef2c81 May 27, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
build Fix phar file May 27, 2019
src/PHPDraft Fix menu UI and rewrite CLI usage May 17, 2019
tests Fix building phars May 24, 2019
.gitignore Core: Getting travis to release versioned builds Jul 21, 2017
.travis.yml Fix travis authentication May 27, 2019
LICENSE Initial commit Aug 7, 2016 Fix build failures May 22, 2019
build.xml Fix phar file May 27, 2019
phpdraft Fix phar file May 27, 2019 Let sonarqube ignore HTML coverage May 22, 2019

PHPDraft Packagist Version Build Status Sonar Coverage Sonar Quality Gate Maintenance

This is a parser for API Blueprint files in PHP.1


PHPDraft requires drafter to be installed. Refer to the drafter page for the installation details. If you don't want to install drafter, you can pass -o to the command to make it use


Requires PHP 7.0+ to run. Unittests require runkit or uopz For direct usage you can run:

$ ./phpdraft.phar -f blueprint-file.apib > blueprint-webpage.html

You can also install it first:

$ cp phpdraft.phar /usr/bin/phpdraft
$ chmod +x /usr/bin/phpdraft
$ phpdraft -f blueprint-file.apib > blueprint-webpage.html

Extra features

We got some fun stuff, check the wiki for more.

Writing API documentation

For writing API documentation using API Blueprint syntax. You can read about its specification.

Here's the example:


# Hello API

A simple API demo

# Group People

This section describes about the People

## Person [/people/{id}]

Represent particular Person

+ Parameters

    + id (required, string, `123`) ... The id of the Person.

+ Model (application/json)


### Retrieve Person [GET]

Return the information for the Person

+ Request (application/json)

    + Headers

        Authorization: Basic AbcdeFg=

+ Response 200 (application/json)


Building an executable

Install the binary dependencies with composer (composer install). Run ant phar or ant phar-nightly


This app usage the following libraries:

You can’t perform that action at this time.