| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- {
- "openapi": "3.1.0",
- "info": {
- "title": "<<ym:serviceTitle>>",
- "description": "<<ym:serviceTitle>>的API文档",
- "version": "1.0.0"
- },
- "tags": [
- <<ym-loop:apiGroup removeEnd=",">>
- {
- "name": "<<groupName>>"
- },<</ym-loop:apiGroup>>
- ],
- "paths": {
- <<ym-loop:apiInfo removeEnd=",">>
- "/v<<version>>/<<ym:serviceName>>/<<groupName>>/<<methodName>>": {
- "<<ym-if:<<apiKind>><3>>get<</ym-if>><<ym-if:<<apiKind>>=3>>post<</ym-if>><<ym-if:<<apiKind>>=4>>put<</ym-if>><<ym-if:<<apiKind>>=5>>delete<</ym-if>>": {
- "summary": "<<apiName>>",
- "x-apifox-folder": "<<groupName>>",
- "x-apifox-status": "released",
- "deprecated": false,
- "description": "<div><div class=\"tips\"><strong>注意事项</strong><br><p><<apiDetail>></p><br></div><div class=\"apicontent apicontent2\"><strong>返回报文示例:</strong><br><pre>{<br> status: \"1\",<br>msg: \"\",<br> data: [{<br> }]<br>}<br></pre></div><div class=\"apicontent apicontent2\"><strong>axios调用示例</strong><br><pre>const params = {\n};\nRequest({\n url: this.UrlList.<<ym:serviceName>>.<<groupName>><<methodName>>.url,\n method: this.UrlList.<<ym:serviceName>>.<<groupName>><<methodName>>.method,\n params,\n})\n.then((res) => {\n if (res.status == 1) {\n // 返回参数正确逻辑\n } else {\n PublicFn.tips(res.msg);\n }\n})\n.catch((e) => {\n console.log(e);\n});\n<br></pre></div></div></div>",
- "tags": [
- "<<groupName>>"
- ],
- "parameters": [
- <<ym-loop:apiParam removeEnd=",">>
- {
- "name": "<<fieldName>>",
- "in": "query",
- "description": "<<fieldTitle>>",
- "required": false,
- "example": "",
- "schema": {
- "type": "<<fieldType>>"
- }
- },<</ym-loop:apiParam>>
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- <<ym-loop:apiParam removeEnd=",">>
- <<ym-if:<<reqParam>>==true>>"<<fieldName>>": {
- "type": "<<fieldType>>",
- "title": "<<fieldTitle>>"
- },<</ym-if>><</ym-loop:apiParam>>
- },
- "x-apifox-orders": [
- <<ym-loop:apiParam removeEnd=",">>
- <<ym-if:<<reqParam>>==true>>"<<fieldName>>",<</ym-if>><</ym-loop:apiParam>>
- ],
- "required": [
- <<ym-loop:apiParam removeEnd=",">>
- <<ym-if:<<checkAttribute>>.Contains("required") and <<reqParam>>==true>>"<<fieldName>>",<</ym-if>><</ym-loop:apiParam>>
- ],
- "x-apifox-ignore-properties": []
- },
- "example": ""
- }
- }
- },
- "responses": {
- "200": {
- "description": "请求成功返回的数据",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "title": "返回报文",
- "required": [
- "status",
- "msg",
- "data"
- ],
- "properties": {
- "status": {
- "type": "integer",
- "description": "状态(1成功,否则失败)"
- },
- "msg": {
- "type": "string",
- "description": "描述(status为1不显示描述信息,status不为1显示错误信息)"
- },
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- <<ym-loop:apiParam removeEnd=",">>
- <<ym-if:<<resParam>>==true>>"<<fieldName>>": {
- "type": "<<fieldType>>",
- "description": "<<fieldTitle>>"
- },<</ym-if>><</ym-loop:apiParam>>
- },
- "x-apifox-orders": [
- <<ym-loop:apiParam removeEnd=",">>
- <<ym-if:<<resParam>>==true>>"<<fieldName>>",<</ym-if>><</ym-loop:apiParam>>
- ],
- "x-apifox-ignore-properties": []
- }
- }
- },
- "x-apifox-orders": [
- "status",
- "msg",
- "data"
- ],
- "x-apifox-ignore-properties": []
- }
- }
- }
- }
- }
- }
- },<</ym-loop:apiInfo>>
- }
- }
|