Package Data | |
---|---|
Maintainer Username: | monkeycraps |
Maintainer Contact: | jason.lewis1991@gmail.com (Jason Lewis) |
Package Create Date: | 2017-07-20 |
Package Last Update: | 2017-07-20 |
Language: | PHP |
License: | BSD-3-Clause |
Last Refreshed: | 2024-12-17 03:00:22 |
Package Statistics | |
---|---|
Total Downloads: | 8 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 6 |
Total Watchers: | 0 |
Total Forks: | 2 |
Total Open Issues: | 0 |
结果
composer 添加依赖
依赖内网仓库 http://packagist.in66.cc:8080/
"repositories": [
{
"type": "composer",
"url": "http://packagist.in66.cc"
}
]
composer require in/blueprint:dev-master
laravel app 添加 provider
// api 工具
In\Blueprint\Laravel\BlueprintServiceProvider::class,
文件描写
运行生成命令
php artisan blueprint:generate
php artisan blueprint:generate app/Http/Controllers/WechatCorp/WechatCorpController.php
展示控件安装
npm install -g git+ssh://git@githost.in66.cc:yidu/aglio.git
运行展示
aglio -i storage/api/blueprint.apib -s -h 0.0.0.0
This package generates a valid API Blueprint 1A document from a collection of classes.
Some index method phpdoc example:
<?php
/**
* Products
*
* @Resource("Products", uri="/products")
*/
class ProductsController extends ApiController
{
/**
* Products list
*
* Get current products list
*
* @Get("/")
* @Versions({"v1"})
* @Transaction({
* @Request(identifier="/?state=synced"),
* @Response(200, body={"data":{{"id":"rkoVJ7qa4Z6lzXdVnldgx9LmpBP0DQ3e","name":"Product name","status":"active"}},"meta":{"pagination":{"total":1,"count":1,"per_page":1,"current_page":1,"total_pages":1,"links":{}}}})
* })
* @Parameters({
* @Parameter("api_token", type="string", required=true, description="API Token", default=null),
* @Parameter("page", type="integer", required=false, description="Pagination page", default=1),
* @Parameter("state", type="string", required=false, description="Product status filter", default="synced", members={
* @Member(value="synced", description="Products synced"),
* @Member(value="pending", description="Products pending")
* })
* })
*/
public function index(Request $request)
{}
}
This package is licensed under the BSD 3-Clause license.