1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
<?php
namespace App\Http\Controllers\Home;
use OpenApi\Annotations as OA;
class CurdController extends BaseController
{
/**
* @OA\Get(summary="get",path="/get/{id}",tags={"curd"},description="简介",
* @OA\Parameter(name="Authorization",in="header",required=true,description="Bearer"),
* @OA\Parameter(name="id",in="path",required=true,description="id"),
* @OA\Response(response="200", description="获取成功",
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(ref="#/components/schemas/Info"),
* )
* )
* )
*/
public function get()
{
}
/**
* @OA\Post(summary="post",path="/post",tags={"curd"},description="简介"
* @OA\Parameter(name="Authorization",in="header",required=true,description="Bearer"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="application/json",
* @OA\Schema(
* @OA\Property(property="integer",type="integer",description="简介"),
* @OA\Property(property="string",type="string",description="简介"),
* @OA\Property(property="number",type="number",description="简介"),
* )
* )
* ),
* @OA\Response(response="200", description="下单成功")
* )
*/
public function post()
{
}
/**
* @OA\Post(summary="上传文件",path="/upload/file/{type}",tags={"Auth"},description="上传文件",
* @OA\Parameter(name="Authorization",in="header",required=true,description="Bearer"),
* @OA\Parameter(name="type",in="path",required=true,description="类型"),
* @OA\RequestBody(
* @OA\MediaType(mediaType="multipart/form-data",
* @OA\Schema(
* @OA\Property(property="file",type="file",description="文件")
* )
* )
* ),
* @OA\Response(response="200",description="获取成功",
* @OA\MediaType(mediaType="application/json",
* @OA\Schema(
* @OA\Property(property="url",type="string",description="路径"),
* @OA\Property(property="originalName",type="string",description="原始名称"),
* @OA\Property(property="dirName",type="string",description="文件名称"),
* @OA\Property(property="extension",type="string",description="文件类型"),
* @OA\Property(property="host",type="string",description="当前域名"),
* )
* )
* )
* )
*/
public function uploadFile()
{
}
}
|