PHPackages                             ronasit/local-data-collector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ronasit/local-data-collector

Abandoned → [ronasit/laravel-swagger](/?search=ronasit%2Flaravel-swagger)ArchivedLibrary[API Development](/categories/api)

ronasit/local-data-collector
============================

Provides service for data collecting for ronasit/laravel-swagger plugin

1.6.1(5y ago)119.8k2MITPHPPHP &gt;=5.6

Since Apr 10Pushed 5y ago3 watchersCompare

[ Source](https://github.com/RonasIT/laravel-local-data-collector)[ Packagist](https://packagist.org/packages/ronasit/local-data-collector)[ RSS](/packages/ronasit-local-data-collector/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (3)Versions (13)Used By (0)

Laravel AutoDoc plugin
======================

[](#laravel-autodoc-plugin)

This plugin is designed to gather information and generate documentation about your Rest-Api while passing the tests. The principle of operation is based on the fact that the special Middleware installed on the Route for which you want to collect information that after the successful completion of all tests generated Swagger-file. In addition this plug-in is able to draw Swagger-template to display the generated documentation for a config.

Instalation
-----------

[](#instalation)

### Composer

[](#composer)

1. Add to required `"ronasit/laravel-swagger": "master-dev"`
2. Run `composer update`

### Laravel

[](#laravel)

1. Add **AutoDocServiceProvider::class** to providers in *config/app.php*
2. Run `php artisan vendor:publish`

### Plugin

[](#plugin)

1. Add middleware **AutoDocMiddleware::class** to *Http/Kernel.php*.
2. Add **AutoDocRequestTrait** to your parent Request in *Http/Requests/Request.php*
3. Set **AutoDocTestCase** as parent of your TestCase in *tests/TestCase.php*
4. In *config/auto-doc.php* you can specify enabling of plugin, info of your project, some defaults descriptions and route for rendering of documentation.
5. In *.env* file you should add following lines `SWAGGER_FILEPATH_PRODUCTION=/example-folder/documentation.json   SWAGGER_FILEPATH_TEMP=/tmp/documentation.json`

Usages
------

[](#usages)

For correcting work of plugin you have to dispose all the validation rules in the rules() method of class YourRequest, which must be connected to the controller via DependencyInjection. In annotation of custom request you can specify summary and description of this request. Plugin will take validation rules from your request and use it as description of input parameter.

### Example

[](#example)

```
