定制 miladev/lara-swagger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

miladev/lara-swagger

最新稳定版本:v1.0.5

Composer 安装命令:

composer require miladev/lara-swagger

包简介

Swagger model generator based on Laravel migrations

README 文档

README

Latest Stable Version License Total Downloads CI & Release

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-19