PHPackages                             iadvize/php-swaggerize-fastroute-library - 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. iadvize/php-swaggerize-fastroute-library

ActiveLibrary[API Development](/categories/api)

iadvize/php-swaggerize-fastroute-library
========================================

A library to automatically create FastRoute routes based on swagger JSON documentation

0.2.0(10y ago)2011.0k1[2 issues](https://github.com/iadvize/php-swaggerize-fastroute-library/issues)PHPPHP &gt;=5.5.21

Since Oct 21Pushed 1y ago43 watchersCompare

[ Source](https://github.com/iadvize/php-swaggerize-fastroute-library)[ Packagist](https://packagist.org/packages/iadvize/php-swaggerize-fastroute-library)[ RSS](/packages/iadvize-php-swaggerize-fastroute-library/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

php-swaggerize-fastroute-library [![CircleCI](https://camo.githubusercontent.com/1fd31ec024206b1b0265dfb4d41e4881af592a750b7f2841adfaafdfadcea751/68747470733a2f2f636972636c6563692e636f6d2f67682f69616476697a652f7068702d73776167676572697a652d66617374726f7574652d6c6962726172792e7376673f7374796c653d737667)](https://circleci.com/gh/iadvize/php-swaggerize-fastroute-library) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/4d3f62079ffbdc4d911213d5fc5cb5b7bbd15801a6d71e87b550018b6ae6a1ad/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69616476697a652f7068702d73776167676572697a652d66617374726f7574652d6c6962726172792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/iadvize/php-swaggerize-fastroute-library/?branch=master)
==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#php-swaggerize-fastroute-library--)

> **⚠️ WARNING**: This repository is deprecated and no longer maintained since 2015. See removal guide [here](#removal-guide).

A library to automatically create FastRoute routes based on swagger JSON documentation

Removal guide
-------------

[](#removal-guide)

This library is deprecated and no longer maintained since 2015. Here is a guide to remove it from your project:

- check that your app uses this library `iadvize/php-swaggerize-fastroute-library` (search for `Iadvize\SwaggerizeFastRoute` package import in php code). If it does not, you can safely remove it from your `composer.json` and skip the next steps.
- if your CI/CD or dockerfile uses the `swaggerize swagger:scan` command, you should:
    - run it manually once (use your full existing command, eg: `./vendor/bin/swaggerize swagger:scan storage/docs/definition.json "path/to/controllers" --routeFile somewhere/routeFile.php`)
    - remove the `swaggerize swagger:scan` command from your CI/CD or dockerfile
- convert the generated route file to a standard FastRoute setup (see [FastRoute documentation](https://github.com/nikic/FastRoute?tab=readme-ov-file#usage)), usually the same file as the one using the `Iadvize\SwaggerizeFastRoute` package.
- remove the `Iadvize\SwaggerizeFastRoute` package import from your php code and all usage.
- remove the `iadvize/php-swaggerize-fastroute-library` from your `composer.json` (eg: `composer remove iadvize/php-swaggerize-fastroute-library`)
- delete the routeFile.php file (not needed anymore)

Examples
--------

[](#examples)

### Generate route File (FastRoute compatible)

[](#generate-route-file-fastroute-compatible)

```
vendor/bin/swaggerize swagger:scan path/to/swagger/json controllers\namespace [--routeFile=route/file/path]

```

Install
-------

[](#install)

To install with composer:

```
composer require iadvize/php-swaggerize-fastroute-library

```

Documentation
-------------

[](#documentation)

### Generate route File (FastRoute compatible)

[](#generate-route-file-fastroute-compatible-1)

```
vendor/bin/swaggerize swagger:scan path/to/swagger/json controllers\namespace [--routeFile=route/file/path]

```

### Dispatch generated file or simply use cache

[](#dispatch-generated-file-or-simply-use-cache)

You can then use FastRoute cached dispatcher to use generated file or directly use a cache dispatcher (file will be generated at first call).

```
