Download the PHP package g4t/swagger without Composer
On this page you can find all versions of the php package g4t/swagger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Rated 5.00 based on 1 reviews
Informations about the package swagger
Swagger Laravel Autogenerate Package
The Swagger Laravel Autogenerate Package is a convenient tool that automatically generates Swagger documentation for your Laravel APIs based on your route definitions. It eliminates the need for manually documenting your API endpoints, saving you time and effort.
Features
- Automatically generates Swagger documentation for Laravel APIs.
- Extracts route information, including URI, HTTP methods, route names, middleware, and more.
- Supports request validations and parameter definitions.
- Generates JSON output conforming to the Swagger/OpenAPI specification.
- Easy integration and configuration within Laravel projects.
Installation
Install the Swagger Laravel Autogenerate Package via Composer:
Usage
Click here to watch a video on how to use this package
-
After installing the package, publish the configuration file:
-
Configure the package by modifying the
config/swagger.php
file according to your needs. This file allows you to specify various settings for the Swagger documentation generation. -
Access the generated Swagger documentation by visiting the
/swagger/documentation
route in your Laravel application. For example,http://your-app-url/swagger/documentation
. -
The issues history page is now included in config/swagger.php, and the default route is
http://your-app-url/swagger/issues
. -
To add a description in a Swagger route using the ->description() method, you can follow the example you provided and include it in your Laravel application's routes. Here's how you can describe a route using the ->description() method in a Swagger route:
-
To add a summary in a Swagger route using the ->summary() method, you can follow the example you provided and include it in your Laravel application's routes. Here's how you can describe a route using the ->summary() method in a Swagger route:
-
To hide endpoint from Swagger documentation using the ->hiddenDoc() method. Here's how you can hide route using the ->hiddenDoc() method:
-
To add a Section Description you can use this attribute
#[SwaggerSection('everything about your users')]
in your controller. Here's how you can use this attribute in your controller: - To enable documentation auth, open
config/swagger.php
and edit this
Suggestions
If you have any suggestions or feature requests, please feel free to add them on our Canny board.
Contributing
Contributions to the Swagger Laravel Autogenerate Package are always welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
License
The Swagger Laravel Autogenerate Package is open-source software licensed under the MIT license.
Credits
The Swagger Laravel Autogenerate Package is developed and maintained by HusseinAlaa.