PHPackages                             bc/php-rest - 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. bc/php-rest

ActiveLibrary[API Development](/categories/api)

bc/php-rest
===========

0.1.4(9y ago)065[3 issues](https://github.com/theinpu/php-rest/issues)MITPHP

Since Nov 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/theinpu/php-rest)[ Packagist](https://packagist.org/packages/bc/php-rest)[ RSS](/packages/bc-php-rest/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (8)Versions (18)Used By (0)

[![Build Status](https://camo.githubusercontent.com/6a72e97e59281a667b48c082858cfe5b9e22694b79aa3c29bddec5840c136200/68747470733a2f2f7472617669732d63692e6f72672f726573742d73756974652f67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rest-suite/generator)

php-rest (work in progress)
===========================

[](#php-rest-work-in-progress)

RESTapi server generator based on [openapi specs](https://openapis.org/)and [slim framework](http://www.slimframework.com/)

Install
=======

[](#install)

Command line: `composer require rest-suite/generator`
-or-
In `composer.json`

```
{
  "require-dev": {
    "rest-suite/generator" : "~0"
  }
}
```

Usage
=====

[](#usage)

Generate code
-------------

[](#generate-code)

`./vendor/bin/apigen generate --namespace 'Example\Api' --output ./examples ./tests/_data/swagger.yml`

```
Usage:
  generate [options] [--] []
  gen
  g

Arguments:
  spec                        path to swagger specs [default: "swagger.yml"]

Options:
  -o, --output[=OUTPUT]       output path for generated code [default: "./"]
  -ns, --namespace=NAMESPACE  base namespace for generated code
  -m, --models                only generate files for models
  -c, --controllers           only generate files for controllers
  -t, --tests                 only generate files for tests
  -s, --settings              only generate dist settings files
      --override              override existing files
      --sync                  uses with "--override" option, sync client code between re-generations

```

Synchronization
---------------

[](#synchronization)

TODO: Two-way sync (schema &lt;=&gt; code) with user-code preservation

Examples
========

[](#examples)

Examples of generated code:

- Simple api - [specs](https://github.com/rest-suite/generator/blob/master/tests/_data/swagger.yml), [code](https://github.com/rest-suite/generator/tree/master/examples/Simple/)
- Pet Shop - [specs](https://github.com/rest-suite/generator/blob/master/tests/_data/petshop.yml), [code](https://github.com/rest-suite/generator/tree/master/examples/Petshop/)

Documentation
=============

[](#documentation)

TODO

Contribution
============

[](#contribution)

Feel free to PR, fork and whatever

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~8 days

Total

14

Last Release

3322d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c966143e244c5727ff8531a586cf9ffef9e18005a0a25e2798c4576ee2dd64?d=identicon)[theinpu](/maintainers/theinpu)

---

Top Contributors

[![theinpu](https://avatars.githubusercontent.com/u/1495647?v=4)](https://github.com/theinpu "theinpu (51 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/bc-php-rest/health.svg)

```
[![Health](https://phpackages.com/badges/bc-php-rest/health.svg)](https://phpackages.com/packages/bc-php-rest)
```

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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