swagger-参数-样例

接口样例,入参为单一数据,返回json数据格式,对象中含有数组。

1
2
3
4
5
6
7
8
9
10
/**
* @SWG\Tag(
* name="案例",
* description="标签信息",
* @SWG\ExternalDocumentation(
* description="查看更多",
* url=""
* )
* )
*/
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
74
75
76
77
78
79
80
81
82
83
84
85
86
/**
* @SWG\Post(
* path="/portfolio/cate",
* summary="整体接口名称",
* description="接口介绍",
* operationId="PtfloDisplay",
* tags={"案例"},
* consumes={"application/json"},
* produces={"application/json"},
* @SWG\Parameter(
* description="分类ID,输入all显示全部分类,输入分类id,显示是该分类信息",
* in="formData",
* name="ptflo_cid",
* required=true,
* type="string",
* format="string",
* default="all"
* ),
* @SWG\Response(
* response="200",
* description="读取成功",
* @SWG\Schema(
* type="object",
* title="返回分类信息",
* @SWG\Property(
* property="result",
* type="string",
* description="返回状态"
* ),
* @SWG\Property(
* property="message",
* type="string",
* description="返回状态说明"
* ),
* @SWG\Property(
* property="errno",
* type="string",
* description="返回状态符,不同信息返回符号不同"
* ),
* @SWG\Property(
* property="data",
* type="array",
* description="返回状态符,不同信息返回符号不同",
* items={
* "type" : "object",
* "title": "分类信息",
* "properties":{
* "cat_id":@SWG\Property(type="integer",description="分类id",example="1"),
* "unique_id":@SWG\Property(type="string",description="分类唯一标识",example="o1ad-logo"),
* "cat_name":@SWG\Property(type="string",description="分类名称",example="LOGO/VI"),
* "keywords":@SWG\Property(type="string",description="分类名称关键字",example="LOGO/VI"),
* "description":@SWG\Property(type="string",description="分类简介",example="LOGO/VI"),
* "sort":@SWG\Property(type="integer",description="排序",example="10"),
* "ad_img":@SWG\Property(type="string",description="分类图片",example="null"),
* "ptflo":@SWG\Property(
* type="array",
* description="案例内容",
* items={
* "type" : "object",
* "title": "分类中案例列表",
* "properties":{
* "id":@SWG\Property(type="integer",description="案例id",example="1"),
* "portfolio_title":@SWG\Property(type="integer",description="案例标题",example="雪山霞客鸡"),
* "portfolio_intro":@SWG\Property(type="integer",description="简介",example="头戴雪山帽 身披大侠衣"),
* "portfolio_thumb":@SWG\Property(type="integer",description="缩略图",example="http://xxxxx/ddd.jpg"),
* "portfolio_content":@SWG\Property(type="integer",description="案例介绍",example=""),
* "portfolio_img":@SWG\Property(type="integer",description="案例长图",example="http://xxxxx/ddd.jpg"),
* "portfolio_brand":@SWG\Property(type="integer",description="品牌名称",example=""),
* "portfolio_services":@SWG\Property(type="integer",description="服务名称",example=""),
* "portfolio_industry":@SWG\Property(type="integer",description="行业",example=""),
* "add_time":@SWG\Property(type="integer",description="添加时间",example="")
* }
* }
* ),
* }
* }
* ),
*
* )
* ),
* @SWG\Response(
* response=404,
* description="页面报错不存在."
* )
* )
*/