swagger-参数-样例 发表于 2021-07-08 | 分类于 技术接口样例,入参为单一数据,返回json数据格式,对象中含有数组。12345678910/** * @SWG\Tag( * name="案例", * description="标签信息", * @SWG\ExternalDocumentation( * description="查看更多", * url="" * ) * ) */1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586/** * @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="页面报错不存在." * ) * ) */