miladev/lara-swagger
最新稳定版本:v1.0.5
Composer 安装命令:
composer require miladev/lara-swagger
包简介
Swagger model generator based on Laravel migrations
README 文档
README
A Swagger model generator based on migrations
if you bored to create swagger models from your laravel application this package can help you.
Installation
You can install the package via composer:
composer require miladev/lara-swagger
Usage
php artisan lswagger:generate
This command will create swagger_models.js file which contains all models of your laravel application
Testing
This package uses PHPUnit and Orchestra Testbench.
- Prerequisites: PHP 8.2+ and Composer
- Install dev dependencies:
composer install
If you do not have a global Composer installed, you can use a local PHAR inside the project:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php composer-setup.php --install-dir=. --filename=composer.phar php -r "unlink('composer-setup.php');" php composer.phar install
- Run the tests:
composer test # or vendor/bin/phpunit # or a specific test file vendor/bin/phpunit tests/Feature/CreateSwaggerCommandTest.php
If you run tests from an IDE, ensure the working directory is the project root so the generated swagger_models.json can be found.
Roadmap
- Support enum types
- Support all kind of migrations (Rename,Delete,...)
If you want to contribute, open a pull request by following Laravel contribution guide.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-19