PHPackages                             smillerdev/phpdraft - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. smillerdev/phpdraft

ArchivedLibrary[API Development](/categories/api)

smillerdev/phpdraft
===================

This is a parser for API Blueprint files in PHP.

2.6.1(1mo ago)3812.5k↑292.9%5[6 issues](https://github.com/SMillerDev/phpdraft/issues)GPL-3.0-or-laterHTMLPHP ^8.3CI failing

Since Nov 18Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/SMillerDev/phpdraft)[ Packagist](https://packagist.org/packages/smillerdev/phpdraft)[ GitHub Sponsors](https://github.com/smillerdev)[ RSS](/packages/smillerdev-phpdraft/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (33)Versions (75)Used By (0)

PHPDraft [![Packagist Version](https://camo.githubusercontent.com/ae8f8ac1b78c859c2e06342cecc9bdd68c22068b424d7627b015c43a07cd464f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d696c6c65726465762f70687064726166742e737667)](https://github.com/SMillerDev/phpdraft/releases/latest) [![Sonar Quality Gate](https://camo.githubusercontent.com/779ec8d564853c0eccfe7e711ad4fcbc816c18c7997f9d1f1229cc5ac1b95791/68747470733a2f2f696d672e736869656c64732e696f2f736f6e61722f68747470732f736f6e6172636c6f75642e696f2f534d696c6c65724465765f70687064726166742f616c6572745f7374617475732e737667)](https://sonarcloud.io/dashboard?id=SMillerDev_phpdraft) [![codecov](https://camo.githubusercontent.com/ded5e532b6a4f8c2cd04a855dcc58c75e67fc2b3f4ecc75f86f3246c2532875a/68747470733a2f2f636f6465636f762e696f2f67682f534d696c6c65724465762f70687064726166742f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d324950536c634377584d)](https://codecov.io/gh/SMillerDev/phpdraft) [![FOSSA Status](https://camo.githubusercontent.com/a4f4dbcdd35e0e7b876496f63e52370484eda794ca2e073d2d49e2fa146eef4c/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246534d696c6c657244657625324670687064726166742e7376673f747970653d736869656c64)](https://app.fossa.com/projects/git%2Bgithub.com%2FSMillerDev%2Fphpdraft?ref=badge_shield)
=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#phpdraft----)

This is a parser for API Blueprint files in PHP.[1](#dependencies)

Dependencies
------------

[](#dependencies)

PHPDraft requires [drafter](https://github.com/apiaryio/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

Usage
-----

[](#usage)

Requires PHP 8.1+ 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
--------------

[](#extra-features)

We got some fun stuff, check the [wiki](https://github.com/SMillerDev/phpdraft/wiki) for more.

Writing API documentation
-------------------------

[](#writing-api-documentation)

For writing API documentation using [API Blueprint](http://apiblueprint.org/) syntax. You can read about its [specification](https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md).

Here's the example:

```
FORMAT: 1A
HOST: https://api.example.com/v1

# 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)

    ```
    {"name":"Gesang","birthdate":"01-09-1917"}
    ```

### Retrieve Person [GET]

Return the information for the Person

+ Request (application/json)

    + Headers

        ```
        Authorization: Basic AbcdeFg=
        ```

+ Response 200 (application/json)

    [Person][]

```

Building an executable
----------------------

[](#building-an-executable)

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

Libraries
---------

[](#libraries)

This app usage the following libraries:

-

License
-------

[](#license)

[![FOSSA Status](https://camo.githubusercontent.com/739fd885fe811508493aa2a4b500b01f0e04eec468318eaa199495a46ca92ed9/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246534d696c6c657244657625324670687064726166742e7376673f747970653d6c61726765)](https://app.fossa.com/projects/git%2Bgithub.com%2FSMillerDev%2Fphpdraft?ref=badge_large)

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance90

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 55.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~60 days

Recently: every ~259 days

Total

59

Last Release

30d ago

Major Versions

1.15.10 → 2.0.02020-04-06

PHP version history (10 changes)1.5PHP &gt;=5.4.0

1.10PHP 5.6.\* || 7.\*

1.14PHP ~7.1

1.15.5PHP ~7.2

2.0.0PHP ^7.2

2.4.0-rc1PHP ^7.3

2.4.0-rc3PHP ^7.3||^8.0

2.4.0-rc5PHP ^7.4||^8.0

2.5.0PHP ^8.1

2.6.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9fd7682374775f65a86e6d86aaa3073f4d0567c74206dec68efbec0a5c2715d?d=identicon)[SMillerDev](/maintainers/SMillerDev)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (401 commits)")[![SMillerDev](https://avatars.githubusercontent.com/u/1484494?v=4)](https://github.com/SMillerDev "SMillerDev (218 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (100 commits)")[![brianstoop](https://avatars.githubusercontent.com/u/43063856?v=4)](https://github.com/brianstoop "brianstoop (1 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")

---

Tags

api-blueprintapiarydrafterphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/smillerdev-phpdraft/health.svg)

```
[![Health](https://phpackages.com/badges/smillerdev-phpdraft/health.svg)](https://phpackages.com/packages/smillerdev-phpdraft)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[appwrite/sdk-generator

SDK generator for Appwrite APIs across multiple programming languages and platforms

322207.2k3](/packages/appwrite-sdk-generator)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k16.4k79](/packages/elgg-elgg)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
