Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 18 days 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 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-30T17:53:03.000Z (3 months ago)
- Last Synced: 2024-10-14T21:50:04.049Z (about 1 month ago)
- Topics: annotation, hacktoberfest, laravel, lumen, openapi, openapi-router, router, silex, slim
- Language: PHP
- Homepage:
- Size: 126 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openapi-router
[![Build Status](https://github.com/DerManoMann/openapi-router/workflows/build/badge.svg)](https://github.com/DerManoMann/openapi-router/actions)
[![Coverage Status](https://coveralls.io/repos/github/DerManoMann/openapi-router/badge.svg)](https://coveralls.io/github/DerManoMann/openapi-router)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)## Introduction
Allows to (re-)use [Swagger-PHP](https://github.com/zircote/swagger-php) annotations 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 7.2 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 annotations](https://github.com/zircote/swagger-php/tree/master/src/Annotations) only.
**index.php**
```php
registerRoutes();$app->run();
```**Controller**
```php
write('Get me');
}
}
```## Documentation
* [Configuration](docs/Configuration.md)
* [Annotation extensions](docs/AnnotationExtensions.md)## License
The openapi-router project is released under the [MIT license](LICENSE).