承接 quattror/swagger 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

quattror/swagger

最新稳定版本:1.1.6

Composer 安装命令:

composer require quattror/swagger

包简介

A swagger helper

README 文档

README

Yet another tool for documenting laravel-based APIs with OpenApi/Swagger. This package is highly inspired by great DarkaOnLine/L5-Swagger and also wraps zircote/swagger-php and swagger-api/swagger-ui, but since we had some particular requirements plus some issues when serving the static assets for swagger-ui, we decided do take a different approach. This package only supports OpenAPI annotations, Swagger 3.0, Laravel >=5.6.

To install this package in your laravel app, just use composer:

$ composer require quattror/swagger

After the package is loaded, it will provide you with 3 console commands: init, generate-docs and copy-assets

Init: this command will setup the settings file (config/swagger.php) and create a folder for swagger-related files inside your app/Http. You should run this command only once per install.

$ php artisan swagger:init

Copy-Assets: this command with copy the swagger-ui related files to the public folder. You should run this command only once per install.

$ php artisan swagger:copy-assets

Generate-Docs: this command will scan your php files and generate the json specification file to be used by the swagger ui. The json file will be located inside the public folder. You should run this command every time you want to update the json file, for instance after annotating a controller.

$ php artisan swagger:generate-docs

Quick setup

  1. Go to an existing laravel app or create one
  2. Install the quattror/swagger package
  3. Run the init command
  4. Run the copy-assets command
  5. Run the generate-docs command
  6. Serve the app and browse the route /docs

统计信息

  • 总下载量: 814
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固