{"id":16948260,"url":"https://github.com/dermanomann/openapi-router","last_synced_at":"2025-10-05T19:34:10.239Z","repository":{"id":34884829,"uuid":"168627843","full_name":"DerManoMann/openapi-router","owner":"DerManoMann","description":"Routing adapter bridge for ApenAPI annotations.","archived":false,"fork":false,"pushed_at":"2025-03-04T23:59:52.000Z","size":142,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T11:38:53.861Z","etag":null,"topics":["annotation","hacktoberfest","laravel","lumen","openapi","openapi-router","router","silex","slim"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DerManoMann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-01T02:07:39.000Z","updated_at":"2025-02-28T22:56:52.000Z","dependencies_parsed_at":"2024-10-28T13:19:57.719Z","dependency_job_id":"ee2ce39b-7b64-4428-8868-20e1b3e24ac2","html_url":"https://github.com/DerManoMann/openapi-router","commit_stats":{"total_commits":82,"total_committers":3,"mean_commits":"27.333333333333332","dds":"0.12195121951219512","last_synced_commit":"213be6ac94ac8c94d02c38e282fe5fadd55e02c2"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerManoMann%2Fopenapi-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerManoMann%2Fopenapi-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerManoMann%2Fopenapi-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerManoMann%2Fopenapi-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DerManoMann","download_url":"https://codeload.github.com/DerManoMann/openapi-router/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244962784,"owners_count":20539224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotation","hacktoberfest","laravel","lumen","openapi","openapi-router","router","silex","slim"],"created_at":"2024-10-13T21:50:08.089Z","updated_at":"2025-10-05T19:34:05.198Z","avatar_url":"https://github.com/DerManoMann.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openapi-router\n\n[![Build Status](https://github.com/DerManoMann/openapi-router/workflows/build/badge.svg)](https://github.com/DerManoMann/openapi-router/actions)\n[![Coverage Status](https://coveralls.io/repos/github/DerManoMann/openapi-router/badge.svg)](https://coveralls.io/github/DerManoMann/openapi-router)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Introduction\nAllows to (re-)use [Swagger-PHP](https://github.com/zircote/swagger-php) attributes (docblock annotations are deprecated),\nto configure routes in the following frameworks:\n\n* [Laravel](https://github.com/laravel/laravel)\n* [Lumen](https://github.com/laravel/lumen)\n* [Slim](https://github.com/slimphp/Slim)\n\n\n## Requirements\n* [PHP 8.1 or higher](http://www.php.net/) - depending on framework version.\n\n## Installation\n\nYou can use **composer** or simply **download the release**.\n\n**Composer**\n\nThe preferred method is via [composer](https://getcomposer.org). Follow the\n[installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have\ncomposer installed.\n\nOnce composer is installed, execute the following command in your project root to install this library:\n\n```sh\ncomposer require radebatz/openapi-router\n```\nAfter that all required classes should be availabe in your project to add routing support.\n\n## Basic usage\n\nExample using the `Slim` framework adapter and standard [OpenApi attributes](https://zircote.github.io/swagger-php/guide/attributes) only.\n\n**Controller**\n```php\n\u003c?php\n\nnamespace MyApp\\Controllers\\V1;\n\nuse OpenApi\\Attributes as OA;\nuse Radebatz\\OpenApi\\Extras\\Attributes as OAX;\n\n/* Things shared by all endpoints in this controller.*/\n#[OAX\\Controller(prefix: '/api/v1')]\n#[OA\\Response(response: 200, description: 'OK')]\n#[OAX\\Middleware(names: ['auth', 'admin'])]\nclass GetController\n{\n    #[OA\\Get(path: '/getme', operationId: 'getme')]\n    #[OA\\Response(response: 400, description: 'Not good enough')]\n    public function getme($request, $response) {\n        return $response-\u003ewrite('Get me');\n    }\n}\n```\n\n**index.php**\n```php\n\u003c?php\n\nuse Radebatz\\OpenApi\\Routing\\Adapters\\SlimRoutingAdapter;\nuse Radebatz\\OpenApi\\Routing\\OpenApiRouter;\nuse Slim\\App;\n\nrequire '../vendor/autoload.php';\n\n$app = new App();\n(new OpenApiRouter([__DIR__ . '/../src/controllers'], new SlimRoutingAdapter($app)))\n    -\u003eregisterRoutes();\n\n$app-\u003erun();\n```\n\n## Documentation\n* [Configuration](docs/Configuration.md)\n\n## License\n\nThe openapi-router project is released under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdermanomann%2Fopenapi-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdermanomann%2Fopenapi-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdermanomann%2Fopenapi-router/lists"}