swagger.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "新接入服务",
  5. "title": "Swagger Example API",
  6. "contact": {},
  7. "version": "0.0.1"
  8. },
  9. "paths": {
  10. "/Account/Login": {
  11. "post": {
  12. "consumes": [
  13. "application/json"
  14. ],
  15. "produces": [
  16. "application/json"
  17. ],
  18. "tags": [
  19. "账户服务"
  20. ],
  21. "summary": "账户登录",
  22. "parameters": [
  23. {
  24. "description": "登录入参",
  25. "name": "data",
  26. "in": "body",
  27. "required": true,
  28. "schema": {
  29. "$ref": "#/definitions/request.LoginReq"
  30. }
  31. }
  32. ],
  33. "responses": {
  34. "200": {
  35. "description": "返回包括用户信息,token,过期时间",
  36. "schema": {
  37. "allOf": [
  38. {
  39. "$ref": "#/definitions/response.Response"
  40. },
  41. {
  42. "type": "object",
  43. "properties": {
  44. "data": {
  45. "$ref": "#/definitions/response.LoginRsp"
  46. },
  47. "msg": {
  48. "type": "string"
  49. }
  50. }
  51. }
  52. ]
  53. }
  54. }
  55. }
  56. }
  57. },
  58. "/Account/TokenCheck": {
  59. "get": {
  60. "security": [
  61. {
  62. "ApiKeyAuth": []
  63. }
  64. ],
  65. "consumes": [
  66. "application/json"
  67. ],
  68. "produces": [
  69. "application/json"
  70. ],
  71. "tags": [
  72. "账户服务"
  73. ],
  74. "summary": "Token校验",
  75. "responses": {
  76. "200": {
  77. "description": "操作成功",
  78. "schema": {
  79. "allOf": [
  80. {
  81. "$ref": "#/definitions/response.Response"
  82. },
  83. {
  84. "type": "object",
  85. "properties": {
  86. "msg": {
  87. "type": "string"
  88. }
  89. }
  90. }
  91. ]
  92. }
  93. }
  94. }
  95. }
  96. },
  97. "/MQ/SendMsgToMQ": {
  98. "post": {
  99. "security": [
  100. {
  101. "ApiKeyAuth": []
  102. }
  103. ],
  104. "consumes": [
  105. "application/json"
  106. ],
  107. "produces": [
  108. "application/json"
  109. ],
  110. "tags": [
  111. "总线业务"
  112. ],
  113. "summary": "总线业务",
  114. "parameters": [
  115. {
  116. "description": "入参",
  117. "name": "data",
  118. "in": "body",
  119. "required": true,
  120. "schema": {
  121. "$ref": "#/definitions/request.MQBodyReq"
  122. }
  123. }
  124. ],
  125. "responses": {
  126. "200": {
  127. "description": "出参",
  128. "schema": {
  129. "allOf": [
  130. {
  131. "$ref": "#/definitions/response.Response"
  132. },
  133. {
  134. "type": "object",
  135. "properties": {
  136. "data": {
  137. "$ref": "#/definitions/response.MQBodyRsp"
  138. },
  139. "msg": {
  140. "type": "string"
  141. }
  142. }
  143. }
  144. ]
  145. }
  146. }
  147. }
  148. }
  149. },
  150. "/MQ/SendNtfToMQ": {
  151. "post": {
  152. "consumes": [
  153. "application/json"
  154. ],
  155. "produces": [
  156. "application/json"
  157. ],
  158. "tags": [
  159. "总线业务"
  160. ],
  161. "summary": "总线通知",
  162. "parameters": [
  163. {
  164. "description": "入参",
  165. "name": "data",
  166. "in": "body",
  167. "required": true,
  168. "schema": {
  169. "$ref": "#/definitions/request.MQNtfReq"
  170. }
  171. }
  172. ],
  173. "responses": {
  174. "200": {
  175. "description": "出参",
  176. "schema": {
  177. "allOf": [
  178. {
  179. "$ref": "#/definitions/response.Response"
  180. },
  181. {
  182. "type": "object",
  183. "properties": {
  184. "msg": {
  185. "type": "string"
  186. }
  187. }
  188. }
  189. ]
  190. }
  191. }
  192. }
  193. }
  194. },
  195. "/Quote/QuoteSubscribe": {
  196. "post": {
  197. "security": [
  198. {
  199. "ApiKeyAuth": []
  200. }
  201. ],
  202. "consumes": [
  203. "application/json"
  204. ],
  205. "produces": [
  206. "application/json"
  207. ],
  208. "tags": [
  209. "实时行情"
  210. ],
  211. "summary": "实时行情",
  212. "parameters": [
  213. {
  214. "description": "入参1",
  215. "name": "data",
  216. "in": "body",
  217. "required": true,
  218. "schema": {
  219. "$ref": "#/definitions/request.QuoteSubscribeReq"
  220. }
  221. }
  222. ],
  223. "responses": {
  224. "200": {
  225. "description": "出参",
  226. "schema": {
  227. "allOf": [
  228. {
  229. "$ref": "#/definitions/response.Response"
  230. },
  231. {
  232. "type": "object",
  233. "properties": {
  234. "msg": {
  235. "type": "string"
  236. }
  237. }
  238. }
  239. ]
  240. }
  241. }
  242. }
  243. }
  244. }
  245. },
  246. "definitions": {
  247. "request.LoginReq": {
  248. "type": "object",
  249. "required": [
  250. "clientType",
  251. "password",
  252. "userName"
  253. ],
  254. "properties": {
  255. "clientType": {
  256. "description": "客户端类型,2-PC交易端 3-手机客户端_安卓 4-网页客户端 5-微信客户端 6-手机客户端_苹果",
  257. "type": "integer"
  258. },
  259. "password": {
  260. "description": "密码",
  261. "type": "string"
  262. },
  263. "userName": {
  264. "description": "用户名,可以是LoginID/LoginCode/手机号码",
  265. "type": "string"
  266. }
  267. }
  268. },
  269. "request.MQBodyReq": {
  270. "type": "object",
  271. "required": [
  272. "data",
  273. "funCodeReq",
  274. "isEncrypted"
  275. ],
  276. "properties": {
  277. "data": {
  278. "description": "请求数据",
  279. "type": "string"
  280. },
  281. "funCodeReq": {
  282. "description": "请求功能码",
  283. "type": "integer"
  284. },
  285. "funCodeRsp": {
  286. "description": "回复功能码",
  287. "type": "integer"
  288. },
  289. "isEncrypted": {
  290. "description": "是否加密",
  291. "type": "boolean"
  292. }
  293. }
  294. },
  295. "request.MQNtfReq": {
  296. "type": "object",
  297. "required": [
  298. "data",
  299. "funCode"
  300. ],
  301. "properties": {
  302. "data": {
  303. "description": "数据",
  304. "type": "string"
  305. },
  306. "funCode": {
  307. "description": "功能码",
  308. "type": "integer"
  309. },
  310. "topic": {
  311. "description": "主题",
  312. "type": "string"
  313. }
  314. }
  315. },
  316. "request.QuoteGoods": {
  317. "type": "object",
  318. "properties": {
  319. "exchangeId": {
  320. "description": "交易所代码,一般写死250",
  321. "type": "integer"
  322. },
  323. "goodsCode": {
  324. "description": "商品代码,全大写",
  325. "type": "string"
  326. }
  327. }
  328. },
  329. "request.QuoteSubscribeReq": {
  330. "type": "object",
  331. "properties": {
  332. "quoteGoodses": {
  333. "description": "待订阅商品信息",
  334. "type": "array",
  335. "items": {
  336. "$ref": "#/definitions/request.QuoteGoods"
  337. }
  338. }
  339. }
  340. },
  341. "response.LoginRsp": {
  342. "type": "object",
  343. "properties": {
  344. "expiresAt": {
  345. "description": "过期时间",
  346. "type": "integer"
  347. },
  348. "loginId": {
  349. "description": "登录ID",
  350. "type": "integer"
  351. },
  352. "token": {
  353. "description": "新服务Token",
  354. "type": "string"
  355. },
  356. "userId": {
  357. "description": "用户ID",
  358. "type": "integer"
  359. }
  360. }
  361. },
  362. "response.MQBodyRsp": {
  363. "type": "object",
  364. "properties": {
  365. "data": {
  366. "description": "请求数据",
  367. "type": "string"
  368. },
  369. "funcode": {
  370. "description": "回复功能码",
  371. "type": "integer"
  372. },
  373. "isEncrypted": {
  374. "description": "是否加密",
  375. "type": "boolean"
  376. }
  377. }
  378. },
  379. "response.Response": {
  380. "type": "object",
  381. "properties": {
  382. "code": {
  383. "type": "integer"
  384. },
  385. "data": {},
  386. "msg": {
  387. "type": "string"
  388. }
  389. }
  390. }
  391. },
  392. "securityDefinitions": {
  393. "ApiKeyAuth": {
  394. "type": "apiKey",
  395. "name": "x-token",
  396. "in": "header"
  397. }
  398. }
  399. }