PHPackages                             bernardosecades/split-blue - 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. bernardosecades/split-blue

ActiveProject

bernardosecades/split-blue
==========================

Split Blueprint files (request/response sections) to generate documentation and mock servers files

v0.1.0(9y ago)224.8k1MITHTMLPHP ^5.5|^7.0

Since Mar 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bernardosecades/split-blue)[ Packagist](https://packagist.org/packages/bernardosecades/split-blue)[ RSS](/packages/bernardosecades-split-blue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

SplitBlue
=========

[](#splitblue)

[![Build Status](https://camo.githubusercontent.com/1650b2f3c5663e2727668aaa95afe89e4029ef0d3191b8be0b29a781428a5240/68747470733a2f2f7472617669732d63692e6f72672f6265726e6172646f736563616465732f73706c69742d626c75652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bernardosecades/split-blue)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f55eecff2ba68c7562e823651da630d833e36f4f78843ebd302217788ff853d5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6265726e6172646f736563616465732f73706c69742d626c75652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bernardosecades/split-blue/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/9d6acbb8720763c77fd618a12f6c85197de181c49f473e54f3e609318ddba697/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61323063323231652d386531322d346336642d386436382d3635386161653061656438332f6d696e692e706e67)](https://insight.sensiolabs.com/projects/a20c221e-8e12-4c6d-8d68-658aae0aed83)

API Blueprint renderer.

You can split your API blueprint document with request/response (text-plain, json, xml ...) files and include in your main document to easily maintenance.

If you need load mock server with these API blueprint documents you can process them to render all content in unique file (including content request/response files) and load this file in mock server like [drakov](https://github.com/Aconex/drakov) or similar.

The html documentation will be generated from that unique file.

Installation
------------

[](#installation)

This tool use [markdown-pp](https://github.com/jreese/markdown-pp) and [aglio](https://github.com/danielgtaylor/aglio) to include request/response files in API blueprint documents and generate html documentation.

You can execute shell script to install `MarkdownPP` and `Aglio`:

```
./install.sh
```

Or install step by step next commands:

### Install `markdown-pp`

[](#install-markdown-pp)

```
pip install MarkdownPP
```

### Install `aglio`

[](#install-aglio)

```
npm install -g aglio
```

### Install some dependencies with composer

[](#install-some-dependencies-with-composer)

```
composer install
```

Usage
-----

[](#usage)

Example apib file:

```
+ Request OK (application/json;charset=UTF-8)

    + Body

            {
                "checkIn": "YYY-mm-dd",
                "checkOut": "YYY-mm-dd",
                "occupancy": "A",
                "hotelCode": "A",
                "locationCode": "A"
            }

+ Response 200 (application/xml;charset=UTF-8)

    + Body

!INCLUDE "Response/a.xml"
```

Where file `Response\a.xml` will have:

```

   4

         Raja
         REC-1

```

If you execute command ``./bin/split-blue c` from this tool you will generate two files:

- Build/out.apib (with content of a.xml file)
- Build/out.html (documentation html of your API with content a.xml file)

The content of file `Build/out.apib` will be:

```
+ Request OK (application/json;charset=UTF-8)

    + Body

            {
                "checkIn": "YYY-mm-dd",
                "checkOut": "YYY-mm-dd",
                "occupancy": "A",
                "hotelCode": "A",
                "locationCode": "A"
            }

+ Response 200 (application/xml;charset=UTF-8)

    + Body

   4

         Raja
         REC-1

```

It will be ready to load in your mock server.

### Generate HTML Documentation and files to load in Mock Server

[](#generate-html-documentation-and-files-to-load-in-mock-server)

```
./bin/split-blue c
```

Example 1:

```
./bin/split-blue c md
```

It will try to search all files named like `index.apib` to process include sentences of that file and generate output files (`out.apib` and `out.html`) in folder `Build`, if this not exist it will create it in the same level that `index.apib` file

Example content `index.apib`:

```
!INCLUDE "../cancel-api.apib"
!INCLUDE "../valuate-api.apib"
```

So this command will generate files:

- md/example/MyAPI/V1/Compile/Build/out.apib
- md/example/MyAPI/V1/Compile/Build/out.html
- md/example/MyAPI/V2/Compile/Build/out.apib
- md/example/MyAPI/V2/Compile/Build/out.html

Example 2:

```
./bin/split-blue c md/example/MyAPI/V2
```

- md/example/MyAPI/V2/Compile/Build/out.apib
- md/example/MyAPI/V2/Compile/Build/out.html

It will generate files:

Tests
-----

[](#tests)

You can execute integration tests with next command:

```
vendor/bin/phpunit
```

Screenshots
-----------

[](#screenshots)

`./bin/split-blue c md/example/MyAPI/V2`

[![Command with argument](resources/command-with-argument.png)](resources/command-with-argument.png)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

3352d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1932461?v=4)[Bernardo Secades](/maintainers/bernardosecades)[@bernardosecades](https://github.com/bernardosecades)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bernardosecades-split-blue/health.svg)

```
[![Health](https://phpackages.com/badges/bernardosecades-split-blue/health.svg)](https://phpackages.com/packages/bernardosecades-split-blue)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M650](/packages/sylius-sylius)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

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

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)

PHPackages © 2026

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