swagger.json 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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/internal/v1/coin/add": {
  17. "get": {
  18. "operationId": "/x/internal/v1/coin/add",
  19. "parameters": [
  20. {
  21. "in": "query",
  22. "name": "mid",
  23. "type": "integer",
  24. "format": "int64"
  25. },
  26. {
  27. "in": "query",
  28. "name": "max_coin",
  29. "type": "integer",
  30. "format": "int64"
  31. },
  32. {
  33. "in": "query",
  34. "name": "aid",
  35. "type": "integer",
  36. "format": "int64"
  37. },
  38. {
  39. "in": "query",
  40. "name": "business",
  41. "type": "string"
  42. },
  43. {
  44. "in": "query",
  45. "name": "number",
  46. "type": "integer",
  47. "format": "int64"
  48. },
  49. {
  50. "in": "query",
  51. "name": "ip",
  52. "required": true,
  53. "type": "string"
  54. },
  55. {
  56. "in": "query",
  57. "name": "upmid",
  58. "type": "integer",
  59. "format": "int64"
  60. },
  61. {
  62. "in": "query",
  63. "name": "typeid",
  64. "type": "integer",
  65. "format": "int32"
  66. },
  67. {
  68. "in": "query",
  69. "name": "pub_time",
  70. "type": "integer",
  71. "format": "int64"
  72. }
  73. ],
  74. "responses": {
  75. "200": {
  76. "description": "服务成功响应内容",
  77. "schema": {
  78. "type": "object",
  79. "properties": {
  80. "code": {
  81. "description": "错误码描述",
  82. "type": "integer"
  83. },
  84. "data": {
  85. "$ref": "#/definitions/AddCoinReply",
  86. "type": "object"
  87. },
  88. "message": {
  89. "description": "错误码文本描述",
  90. "type": "string"
  91. },
  92. "ttl": {
  93. "description": "客户端限速时间",
  94. "type": "integer",
  95. "format": "int64"
  96. }
  97. }
  98. }
  99. }
  100. }
  101. }
  102. },
  103. "/x/internal/v1/coin/user/count": {
  104. "get": {
  105. "operationId": "/x/internal/v1/coin/user/count",
  106. "parameters": [
  107. {
  108. "in": "query",
  109. "name": "mid",
  110. "type": "integer",
  111. "format": "int64"
  112. }
  113. ],
  114. "responses": {
  115. "200": {
  116. "description": "服务成功响应内容",
  117. "schema": {
  118. "type": "object",
  119. "properties": {
  120. "code": {
  121. "description": "错误码描述",
  122. "type": "integer"
  123. },
  124. "data": {
  125. "$ref": "#/definitions/UserCoinsReply",
  126. "type": "object"
  127. },
  128. "message": {
  129. "description": "错误码文本描述",
  130. "type": "string"
  131. },
  132. "ttl": {
  133. "description": "客户端限速时间",
  134. "type": "integer",
  135. "format": "int64"
  136. }
  137. }
  138. }
  139. }
  140. }
  141. }
  142. },
  143. "/x/internal/v1/coin/user/log": {
  144. "get": {
  145. "operationId": "/x/internal/v1/coin/user/log",
  146. "parameters": [
  147. {
  148. "in": "query",
  149. "name": "mid",
  150. "type": "integer",
  151. "format": "int64"
  152. },
  153. {
  154. "in": "query",
  155. "name": "recent",
  156. "type": "boolean"
  157. },
  158. {
  159. "in": "query",
  160. "name": "translate",
  161. "type": "boolean"
  162. }
  163. ],
  164. "responses": {
  165. "200": {
  166. "description": "服务成功响应内容",
  167. "schema": {
  168. "type": "object",
  169. "properties": {
  170. "code": {
  171. "description": "错误码描述",
  172. "type": "integer"
  173. },
  174. "data": {
  175. "$ref": "#/definitions/CoinsLogReply",
  176. "type": "object"
  177. },
  178. "message": {
  179. "description": "错误码文本描述",
  180. "type": "string"
  181. },
  182. "ttl": {
  183. "description": "客户端限速时间",
  184. "type": "integer",
  185. "format": "int64"
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. },
  193. "/x/internal/v1/coin/user/modify": {
  194. "post": {
  195. "operationId": "/x/internal/v1/coin/user/modify",
  196. "parameters": [
  197. {
  198. "in": "query",
  199. "name": "ts",
  200. "type": "integer",
  201. "format": "int64"
  202. },
  203. {
  204. "in": "query",
  205. "name": "mid",
  206. "type": "integer",
  207. "format": "int64"
  208. },
  209. {
  210. "in": "query",
  211. "name": "count",
  212. "type": "number",
  213. "format": "double"
  214. },
  215. {
  216. "in": "query",
  217. "name": "reason",
  218. "type": "string"
  219. },
  220. {
  221. "in": "query",
  222. "name": "ip",
  223. "required": true,
  224. "type": "string"
  225. },
  226. {
  227. "in": "query",
  228. "name": "operator",
  229. "type": "string"
  230. },
  231. {
  232. "in": "query",
  233. "name": "check_zero",
  234. "type": "integer",
  235. "format": "int32"
  236. }
  237. ],
  238. "responses": {
  239. "200": {
  240. "description": "服务成功响应内容",
  241. "schema": {
  242. "type": "object",
  243. "properties": {
  244. "code": {
  245. "description": "错误码描述",
  246. "type": "integer"
  247. },
  248. "data": {
  249. "$ref": "#/definitions/ModifyCoinsReply",
  250. "type": "object"
  251. },
  252. "message": {
  253. "description": "错误码文本描述",
  254. "type": "string"
  255. },
  256. "ttl": {
  257. "description": "客户端限速时间",
  258. "type": "integer",
  259. "format": "int64"
  260. }
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. },
  268. "definitions": {
  269. "AddCoinReply": {
  270. "title": "AddCoinReply",
  271. "type": "object"
  272. },
  273. "CoinsLogReply": {
  274. "title": "CoinsLogReply",
  275. "type": "object",
  276. "properties": {
  277. "list": {
  278. "type": "array",
  279. "items": {
  280. "$ref": "#/definitions/ModelLog",
  281. "type": "object"
  282. }
  283. }
  284. }
  285. },
  286. "ModelLog": {
  287. "title": "ModelLog",
  288. "required": [
  289. "ip"
  290. ],
  291. "type": "object",
  292. "properties": {
  293. "desc": {
  294. "type": "string"
  295. },
  296. "from": {
  297. "type": "number",
  298. "format": "double"
  299. },
  300. "ip": {
  301. "type": "string"
  302. },
  303. "time_stamp": {
  304. "type": "integer",
  305. "format": "int64"
  306. },
  307. "to": {
  308. "type": "number",
  309. "format": "double"
  310. }
  311. }
  312. },
  313. "ModifyCoinsReply": {
  314. "title": "ModifyCoinsReply",
  315. "type": "object",
  316. "properties": {
  317. "result": {
  318. "type": "number",
  319. "format": "double"
  320. }
  321. }
  322. },
  323. "UserCoinsReply": {
  324. "title": "UserCoinsReply",
  325. "type": "object",
  326. "properties": {
  327. "count": {
  328. "type": "number",
  329. "format": "double"
  330. }
  331. }
  332. }
  333. }
  334. }