{"repo":"vanderlee/PHPSwaggerGen","free":true,"listed":false,"github":"https://github.com/vanderlee/PHPSwaggerGen","clone":"git clone https://github.com/vanderlee/PHPSwaggerGen.git","description":"PHP library to generate Swagger/OpenAPI REST API documentation files from comments in PHP source code.","language":"JavaScript","stars":43,"topics":["php","swagger","swagger2","swagger-spec","openapi","openapi-spec","php7","php5","php53-compatible","hhvm"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"SwaggerGen Version 2.3.23 Copyright &copy; 2014-2026 Martijn van der Lee Toyls.com. MIT Open Source license applies. Introduction SwaggerGen is a PHP library for generating Swagger REST API documentation from PHP source code. It reads comments starting with @rest\\ , containing commands describing the API as you go. Working with SwaggerGen is intended to be a natural extension to normal PHP-documentor style documentation. You can describe a REST API call similar to how you would describe method. Using just a few simple commands like @rest\\endpoint /users and @rest\\method GET Get a list of all users gets you a definition of an API. By adding a @rest\\response 200 array(object(name:string, age:int[0, , gender:enum(male,female))) statement, you've just defined exactly what it'll return. You could have also just defined a User and do the same with a @rest\\response 200 array(User) statement or even just @rest\\response ok [User] . SwaggerGen makes it quick and intuitive to write high quality documentation. Use Swagger-UI to read and test your API, as in this example generated real-time with SwaggerGen: Example (only available when running on a PHP server). SwaggerGen is compatible with the latest Swagger 2.0 specification, which forms the basis of the Open API Initiative. Installation Requires PHP 8.0 or greater. To install using Composer: composer require vanderlee/swaggergen Make sure you use version 2.x.x or up. SwaggerGen aims to be PSR-4 compatible, so you should be able to use ","default_branch":null,"files":null,"tree":[],"storefront":"/r/vanderlee","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vanderlee/PHPSwaggerGen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}