@@ -48,24 +48,24 @@ php bin/hyperf.php vendor:publish tangwei/apidocs
4848
4949> config/autoload/api_docs.php
5050
51- ``` php
52- <?php
53-
54- declare(strict_types=1);
51+ <details >
52+ <summary >配置详情</summary >
53+ <p >
5554
55+ ``` php
5656use Hyperf\ApiDocs\DTO\GlobalResponse;
5757use function Hyperf\Support\env;
5858
5959return [
60- /*
61- |--------------------------------------------------------------------------
62- | 启动 swagger 服务
63- |--------------------------------------------------------------------------
64- |
65- | false 将不会启动 swagger 服务
66- |
67- */
68- 'enable' => env('APP_ENV') !== 'prod',
60+ /*
61+ |--------------------------------------------------------------------------
62+ | 启动 swagger 服务
63+ |--------------------------------------------------------------------------
64+ |
65+ | false 将不会启动 swagger 服务
66+ |
67+ */
68+ 'enable' => env('APP_ENV') !== 'prod',
6969
7070 /*
7171 |--------------------------------------------------------------------------
@@ -189,6 +189,9 @@ return [
189189 ],
190190];
191191```
192+ </p >
193+ </details >
194+
192195
193196### 2. 直接启动框架(需要有http服务)
194197
@@ -270,12 +273,6 @@ public function getUserInfo(DemoToken $header){}
270273
271274 #[ApiResponse([PhpType::BOOL], 201)]
272275 #[ApiResponse([PhpType::INT], 202)]
273- #[ApiResponse([PhpType::FLOAT], 203)]
274- #[ApiResponse([PhpType::ARRAY], 204)]
275- #[ApiResponse([PhpType::OBJECT], 205)]
276- #[ApiResponse([PhpType::STRING], 206)]
277- #[ApiResponse([Address::class], 207)]
278- #[ApiResponse([PhpType::INT], 208)]
279276 #[ApiResponse([PhpType::BOOL])]
280277 public function test(){}
281278 ```
0 commit comments