<?php

return [
    'title' => 'QuickQuiz API',
    'desc' => 'QuickQuiz 题库系统接口文档',
    'apps' => [
        [
            'title' => 'QuickQuiz',
            'path' => 'app/Http/Controllers',
            'key' => 'api',
        ],
    ],
    'definitions' => 'app/Http/Controllers/Definitions',
    'auto_url' => [
        'letter_rule' => 'lcfirst',
        'prefix' => '',
        'filter_keys' => ['App', 'Http', 'Controllers'],
    ],
    'auto_register_routes' => false,
    'cache' => [
        'enable' => false,
    ],
    'auth' => [
        'enable' => false,
        'password' => '123456',
        'secret_key' => 'quickquiz-apidoc',
        'expire' => 86400,
    ],
    'params' => [
        'header' => [
            ['name' => 'Authorization', 'type' => 'string', 'require' => false, 'desc' => 'Bearer JWT token'],
        ],
        'query' => [],
        'body' => [],
    ],
    'responses' => [
        'success' => [
            ['name' => 'code', 'desc' => '业务代码', 'type' => 'int', 'require' => true],
            ['name' => 'message', 'desc' => '业务信息', 'type' => 'string', 'require' => true],
            ['name' => 'data', 'desc' => '业务数据', 'main' => true, 'type' => 'object', 'require' => true],
        ],
        'error' => [
            ['name' => 'code', 'desc' => '业务代码', 'type' => 'int', 'require' => true],
            ['name' => 'message', 'desc' => '业务信息', 'type' => 'string', 'require' => true],
        ],
    ],
    'responses_status' => [
        ['name' => '200', 'desc' => '请求成功'],
        ['name' => '401', 'desc' => '登录令牌无效'],
        ['name' => '403', 'desc' => '权限不足'],
        ['name' => '422', 'desc' => '参数错误'],
    ],
    'route_prefix' => '/apidoc',
    'default_author' => 'QuickQuiz',
    'default_method' => 'GET',
    'allowCrossDomain' => true,
    'ignored_annitation' => [],
    'ignored_methods' => [],
    'database' => [],
    'docs' => [],
    'generator' => [],
    'code_template' => [],
    'share' => [
        'enable' => false,
        'actions' => [],
    ],
];
