承接 paunin/laswagger 相关项目开发

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

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

paunin/laswagger

Composer 安装命令:

composer require paunin/laswagger

包简介

This package allows you to: generate RESTful API document using Swagger PHP

README 文档

README

This package is a wrapper for Swagger-php and makes it easy to integrate with Lumen/Larvarel.

Usage

Installation

Via Composer

Add information about new package in your composer.json

    "require": {
    ...
        "paunin/laswagger": ">=1.0.0"
    ...
    }

After the composer install finishes, register the service provider:

  • Lumen Application:
$app->register(Laswagger\Providers\LumeSwaggerServiceProvider::class);
  • Laravel Application: not supports yet.

Now you can wo with laswagger:

  • Run php artisan swagger:generate file_name [base_host]: to generate swagger api docs.

  • Go to /swagger/api-docs (default routing config) to see swagger api docs in JSON format

Default configuration

<?php
return [
    'routes' => [
        'prefix' => 'swagger',
        'cors'   => false
    ],
    'api' => [
        'directories' => [base_path('app')],
        'excludes' => [],
        'host' => null
    ]
];

Customize configuration

In order to change default config you can copy the configuration template in config/laswagger.php to your application's config directory and modify according to your needs. For more information see the Configuration Files section in the Lumen documentation.

Tests

./vendor/phpunit/phpunit/phpunit

See test result at ./build

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固