PHPackages                             damack/ramltosilex - 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. damack/ramltosilex

ActiveLibrary[API Development](/categories/api)

damack/ramltosilex
==================

Silex Provider that generates REST API from a RAML description file

v1.2.6(9y ago)061MITJavaScript

Since Feb 4Pushed 9y ago1 watchersCompare

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

READMEChangelog (9)Dependencies (8)Versions (11)Used By (0)

RamlToSilex
===========

[](#ramltosilex)

RamlToSilex is a Silex provider to setting up a REST API on top of a relational database, based on a YAML (RAML) configuration file.

What is RAML ?
--------------

[](#what-is-raml-)

[RESTful API Modeling Language (RAML)](http://raml.org/) is a simple and sufficient way of describing practically-RESTful APIs. It encourages reuse, enables discovery and pattern-sharing, and aims for merit-based emergence of best practices.

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

[](#installation)

To install RamlToSilex library, run the command below and you will get the latest version:

```
composer require damack/ramltosilex
```

Enable `ServiceController`, `Doctrine` and `RamlToSilex` service providers in your application:

```
$app = new Application();

$app->register(new \Silex\Provider\ServiceControllerServiceProvider());
$app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
    'dbs.options' => array(
        'test' => array(
            'driver' => 'pdo_sqlite',
            'path' => __DIR__ . '/db.sqlite'
        )
    ),
));
$app->register(new Damack\RamlToSilex\RamlToSilexServiceProvider(), array(
    'ramlToSilex.raml_file' => __DIR__ . '/raml/api.raml',
    'ramlToSilex.config_file' => __DIR__ . '/config.json',
    'ramlToSilex.google-app-id' => 'id',
    'ramlToSilex.google-app-secret' => 'secret',
    'ramlToSilex.google-redirect-uri' => 'http://localhost/',
    'ramlToSilex.redirectUri' => 'http://localhost/login.html',
    'ramlToSilex.customController' => function() use ($app) {
        return new CustomController($app);
    }
));

- You need to give the path to the `RAML` file describing your API. You can find an example into the `tests/raml` directory
- You need to give the path to the config file describing your access to the routs and custom controller
- You need to give the app-id, app-secret and redirect-uri so google auth can work

## Function
- Create table from schema definition
- Goolge OAuth authentication
- API authentication with token
- Role based access to routes
- Hidden fields for get
- Custom controller
- API console

### Missing function
- Input validation

## Tests

Run the tests suite with the following commands:

```bash
composer install
composer test
```

License
-------

[](#license)

is licensed under the [MIT License](LICENSE)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

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

Recently: every ~105 days

Total

9

Last Release

3295d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/685509?v=4)[damack](/maintainers/damack)[@damack](https://github.com/damack)

---

Top Contributors

[![damack](https://avatars.githubusercontent.com/u/685509?v=4)](https://github.com/damack "damack (31 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/damack-ramltosilex/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.5k5.8M717](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3691.3k16](/packages/netgen-layouts-core)

PHPackages © 2026

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