swagger.json 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "go-common api",
  5. "description": "api",
  6. "version": "1.0",
  7. "contact": {
  8. "email": "lintanghui@bilibili.com"
  9. },
  10. "license": {
  11. "name": "Apache 2.0",
  12. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  13. }
  14. },
  15. "paths": {
  16. "/x/admin/apm/need/add": {
  17. "post": {
  18. "operationId": "/x/admin/apm/need/add",
  19. "parameters": [
  20. {
  21. "in": "query",
  22. "name": "title",
  23. "required": true,
  24. "type": "string"
  25. },
  26. {
  27. "in": "query",
  28. "name": "content",
  29. "required": true,
  30. "type": "string"
  31. },
  32. {
  33. "in": "query",
  34. "name": "reporter",
  35. "type": "string"
  36. }
  37. ],
  38. "responses": {
  39. "200": {
  40. "description": "服务成功响应内容",
  41. "schema": {
  42. "type": "object",
  43. "properties": {
  44. "code": {
  45. "description": "错误码描述",
  46. "type": "integer"
  47. },
  48. "data": {
  49. "$ref": "#/definitions/EmpResp",
  50. "type": "object"
  51. },
  52. "message": {
  53. "description": "错误码文本描述",
  54. "type": "string"
  55. },
  56. "ttl": {
  57. "description": "客户端限速时间",
  58. "type": "integer",
  59. "format": "int64"
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66. },
  67. "/x/admin/apm/need/edit": {
  68. "post": {
  69. "operationId": "/x/admin/apm/need/edit",
  70. "parameters": [
  71. {
  72. "in": "query",
  73. "name": "id",
  74. "required": true,
  75. "type": "integer",
  76. "format": "int64"
  77. },
  78. {
  79. "in": "query",
  80. "name": "title",
  81. "type": "string"
  82. },
  83. {
  84. "in": "query",
  85. "name": "content",
  86. "type": "string"
  87. }
  88. ],
  89. "responses": {
  90. "200": {
  91. "description": "服务成功响应内容",
  92. "schema": {
  93. "type": "object",
  94. "properties": {
  95. "code": {
  96. "description": "错误码描述",
  97. "type": "integer"
  98. },
  99. "data": {
  100. "$ref": "#/definitions/EmpResp",
  101. "type": "object"
  102. },
  103. "message": {
  104. "description": "错误码文本描述",
  105. "type": "string"
  106. },
  107. "ttl": {
  108. "description": "客户端限速时间",
  109. "type": "integer",
  110. "format": "int64"
  111. }
  112. }
  113. }
  114. }
  115. }
  116. }
  117. },
  118. "/x/admin/apm/need/list": {
  119. "get": {
  120. "operationId": "/x/admin/apm/need/list",
  121. "parameters": [
  122. {
  123. "in": "query",
  124. "name": "ps",
  125. "description": " 默认值 20",
  126. "type": "integer",
  127. "format": "int64"
  128. },
  129. {
  130. "in": "query",
  131. "name": "pn",
  132. "description": " 默认值 1",
  133. "type": "integer",
  134. "format": "int64"
  135. },
  136. {
  137. "in": "query",
  138. "name": "status",
  139. "type": "integer",
  140. "format": "int64"
  141. }
  142. ],
  143. "responses": {
  144. "200": {
  145. "description": "服务成功响应内容",
  146. "schema": {
  147. "type": "object",
  148. "properties": {
  149. "code": {
  150. "description": "错误码描述",
  151. "type": "integer"
  152. },
  153. "data": {
  154. "$ref": "#/definitions/NListResp",
  155. "type": "object"
  156. },
  157. "message": {
  158. "description": "错误码文本描述",
  159. "type": "string"
  160. },
  161. "ttl": {
  162. "description": "客户端限速时间",
  163. "type": "integer",
  164. "format": "int64"
  165. }
  166. }
  167. }
  168. }
  169. }
  170. }
  171. },
  172. "/x/admin/apm/need/thumbsup": {
  173. "post": {
  174. "operationId": "/x/admin/apm/need/thumbsup",
  175. "parameters": [
  176. {
  177. "in": "query",
  178. "name": "req_id",
  179. "required": true,
  180. "type": "integer",
  181. "format": "int64"
  182. },
  183. {
  184. "in": "query",
  185. "name": "user",
  186. "type": "string"
  187. },
  188. {
  189. "in": "query",
  190. "name": "like_type",
  191. "required": true,
  192. "type": "integer",
  193. "format": "int32"
  194. }
  195. ],
  196. "responses": {
  197. "200": {
  198. "description": "服务成功响应内容",
  199. "schema": {
  200. "type": "object",
  201. "properties": {
  202. "code": {
  203. "description": "错误码描述",
  204. "type": "integer"
  205. },
  206. "data": {
  207. "$ref": "#/definitions/EmpResp",
  208. "type": "object"
  209. },
  210. "message": {
  211. "description": "错误码文本描述",
  212. "type": "string"
  213. },
  214. "ttl": {
  215. "description": "客户端限速时间",
  216. "type": "integer",
  217. "format": "int64"
  218. }
  219. }
  220. }
  221. }
  222. }
  223. }
  224. },
  225. "/x/admin/apm/need/verify": {
  226. "post": {
  227. "operationId": "/x/admin/apm/need/verify",
  228. "parameters": [
  229. {
  230. "in": "query",
  231. "name": "id",
  232. "required": true,
  233. "type": "integer",
  234. "format": "int64"
  235. },
  236. {
  237. "in": "query",
  238. "name": "status",
  239. "required": true,
  240. "type": "integer",
  241. "format": "int64"
  242. }
  243. ],
  244. "responses": {
  245. "200": {
  246. "description": "服务成功响应内容",
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "code": {
  251. "description": "错误码描述",
  252. "type": "integer"
  253. },
  254. "data": {
  255. "$ref": "#/definitions/EmpResp",
  256. "type": "object"
  257. },
  258. "message": {
  259. "description": "错误码文本描述",
  260. "type": "string"
  261. },
  262. "ttl": {
  263. "description": "客户端限速时间",
  264. "type": "integer",
  265. "format": "int64"
  266. }
  267. }
  268. }
  269. }
  270. }
  271. }
  272. }
  273. },
  274. "definitions": {
  275. "EmpResp": {
  276. "title": "EmpResp",
  277. "description": "EmpResp is empty resp.",
  278. "type": "object"
  279. },
  280. "NInfo": {
  281. "title": "NInfo",
  282. "description": "NInfo struct",
  283. "type": "object",
  284. "properties": {
  285. "CTime": {
  286. "type": "integer",
  287. "format": "int64"
  288. },
  289. "Content": {
  290. "type": "string"
  291. },
  292. "DislikeCounts": {
  293. "type": "integer",
  294. "format": "int64"
  295. },
  296. "ID": {
  297. "type": "integer",
  298. "format": "int64"
  299. },
  300. "LikeCounts": {
  301. "type": "integer",
  302. "format": "int64"
  303. },
  304. "MTime": {
  305. "type": "integer",
  306. "format": "int64"
  307. },
  308. "Reporter": {
  309. "type": "string"
  310. },
  311. "Status": {
  312. "type": "integer",
  313. "format": "int32"
  314. },
  315. "Title": {
  316. "type": "string"
  317. }
  318. }
  319. },
  320. "NListResp": {
  321. "title": "NListResp",
  322. "description": "NListResp is list resp struct",
  323. "type": "object",
  324. "properties": {
  325. "Data": {
  326. "type": "array",
  327. "items": {
  328. "$ref": "#/definitions/NInfo",
  329. "type": "object"
  330. }
  331. },
  332. "Total": {
  333. "type": "integer",
  334. "format": "int64"
  335. }
  336. }
  337. }
  338. }
  339. }