https://github.com/dermanomann/openapi-router
Routing adapter bridge for ApenAPI annotations.
https://github.com/dermanomann/openapi-router
annotation hacktoberfest laravel lumen openapi openapi-router router silex slim
Last synced: 4 months ago
JSON representation
Routing adapter bridge for ApenAPI annotations.
- Host: GitHub
- URL: https://github.com/dermanomann/openapi-router
- Owner: DerManoMann
- License: mit
- Created: 2019-02-01T02:07:39.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T23:59:52.000Z (11 months ago)
- Last Synced: 2025-03-18T11:38:53.861Z (11 months ago)
- Topics: annotation, hacktoberfest, laravel, lumen, openapi, openapi-router, router, silex, slim
- Language: PHP
- Homepage:
- Size: 139 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openapi-router
[](https://github.com/DerManoMann/openapi-router/actions)
[](https://coveralls.io/github/DerManoMann/openapi-router)
[](https://opensource.org/licenses/MIT)
## Introduction
Allows to (re-)use [Swagger-PHP](https://github.com/zircote/swagger-php) attributes (docblock annotations are deprecated),
to configure routes in the following frameworks:
* [Laravel](https://github.com/laravel/laravel)
* [Lumen](https://github.com/laravel/lumen)
* [Slim](https://github.com/slimphp/Slim)
## Requirements
* [PHP 8.1 or higher](http://www.php.net/) - depending on framework version.
## Installation
You can use **composer** or simply **download the release**.
**Composer**
The preferred method is via [composer](https://getcomposer.org). Follow the
[installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have
composer installed.
Once composer is installed, execute the following command in your project root to install this library:
```sh
composer require radebatz/openapi-router
```
After that all required classes should be availabe in your project to add routing support.
## Basic usage
Example using the `Slim` framework adapter and standard [OpenApi attributes](https://zircote.github.io/swagger-php/guide/attributes) only.
**Controller**
```php
write('Get me');
}
}
```
**index.php**
```php
registerRoutes();
$app->run();
```
## Documentation
* [Configuration](docs/Configuration.md)
## License
The openapi-router project is released under the [MIT license](LICENSE).