123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- return [
- // 文档标题
- 'title' => 'API接口文档',
- // 文档描述
- 'desc' => '',
- // 默认请求类型
- 'default_method'=>'GET',
- // 允许跨域访问
- 'allowCrossDomain'=>false,
- // 设置可选版本
- 'apps' => [
- [
- 'title'=>'前台api接口',
- 'path'=>'app\data\controller',
- 'folder'=>'data',
- 'items'=>[
- [
- 'title'=>'V1.0',
- 'path'=>'app\data\controller\api',
- 'folder'=>'api','controllers'=>[
- \app\data\controller\api\Index::class,
- \app\data\controller\api\Login::class,
- \app\data\controller\api\Area::class,
- \app\data\controller\api\PostageType::class,
- \app\data\controller\api\Weather::class,
- \app\data\controller\api\User::class,
- \app\data\controller\api\Goods::class,
- \app\data\controller\api\Order::class,
- \app\data\controller\api\auth\Center::class,
- \app\data\controller\api\auth\TeachingKnowledge::class,
- \app\data\controller\api\auth\BestKnowledge::class,
- \app\data\controller\api\auth\DemandLabor::class,
- \app\data\controller\api\auth\PoolTalent::class,
- \app\data\controller\api\auth\ShipEngineMaintenance::class,
- \app\data\controller\api\business\Goods::class,
- \app\data\controller\api\business\Login::class,
- \app\data\controller\api\business\Order::class,
- \app\data\controller\api\business\Purchase::class,
- \app\data\controller\api\business\User::class,
- \app\data\controller\api\Xw::class,
- \app\data\controller\api\ResCenter::class,
- \app\data\controller\api\Bidding::class,
- \app\data\controller\api\auth\Purchase::class,
- \app\data\controller\api\auth\UserPurchase::class,
- \app\data\controller\api\ShipYard::class,
- \app\data\controller\api\Data::class,
- \app\data\controller\api\Notice::class,
- ]
- ]
- ],
- ]
- ],
- // 自动生成url规则
- 'auto_url' => [
- // 字母规则
- 'letter_rule' => "lcfirst",
- // 多级路由分隔符
- 'multistage_route_separator' =>"."
- ],
- // 指定公共注释定义的文件地址
- 'definitions' => "app\common\controller\Definitions",
- // 缓存配置
- 'cache' => [
- // 是否开启缓存
- 'enable' => false,
- ],
- // 权限认证配置
- 'auth' => [
- // 是否启用密码验证
- 'enable' => false,
- // 全局访问密码
- 'password' => "123456",
- // 密码加密盐
- 'secret_key' => "apidoc#hg_code",
- // 有效期
- 'expire' => 24*60*60
- ],
- // 统一的请求Header
- 'headers'=>[],
- // 统一的请求参数Parameters
- 'parameters'=>[],
- // 统一的请求响应体
- 'responses'=>[
- ['name'=>'code','desc'=>'代码','type'=>'int'],
- ['name'=>'message','desc'=>'业务信息','type'=>'string'],
- ['name'=>'data','desc'=>'业务数据','main'=>true,'type'=>'object'],
- ],
- // md文档
- 'docs' => [],
- ];
|