swagger.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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/Loginout": {
  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": "用户登出请求",
  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. "/Account/TokenCheck": {
  98. "get": {
  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": "Token校验",
  114. "responses": {
  115. "200": {
  116. "description": "操作成功",
  117. "schema": {
  118. "allOf": [
  119. {
  120. "$ref": "#/definitions/response.Response"
  121. },
  122. {
  123. "type": "object",
  124. "properties": {
  125. "msg": {
  126. "type": "string"
  127. }
  128. }
  129. }
  130. ]
  131. }
  132. }
  133. }
  134. }
  135. },
  136. "/MQ/SendMsgToMQ": {
  137. "post": {
  138. "security": [
  139. {
  140. "ApiKeyAuth": []
  141. }
  142. ],
  143. "consumes": [
  144. "application/json"
  145. ],
  146. "produces": [
  147. "application/json"
  148. ],
  149. "tags": [
  150. "总线业务"
  151. ],
  152. "summary": "总线业务",
  153. "parameters": [
  154. {
  155. "description": "入参",
  156. "name": "data",
  157. "in": "body",
  158. "required": true,
  159. "schema": {
  160. "$ref": "#/definitions/request.MQBodyReq"
  161. }
  162. }
  163. ],
  164. "responses": {
  165. "200": {
  166. "description": "出参",
  167. "schema": {
  168. "allOf": [
  169. {
  170. "$ref": "#/definitions/response.Response"
  171. },
  172. {
  173. "type": "object",
  174. "properties": {
  175. "data": {
  176. "$ref": "#/definitions/response.MQBodyRsp"
  177. },
  178. "msg": {
  179. "type": "string"
  180. }
  181. }
  182. }
  183. ]
  184. }
  185. }
  186. }
  187. }
  188. },
  189. "/MQ/SendNtfToMQ": {
  190. "post": {
  191. "consumes": [
  192. "application/json"
  193. ],
  194. "produces": [
  195. "application/json"
  196. ],
  197. "tags": [
  198. "总线业务"
  199. ],
  200. "summary": "总线通知",
  201. "parameters": [
  202. {
  203. "description": "入参",
  204. "name": "data",
  205. "in": "body",
  206. "required": true,
  207. "schema": {
  208. "$ref": "#/definitions/request.MQNtfReq"
  209. }
  210. }
  211. ],
  212. "responses": {
  213. "200": {
  214. "description": "出参",
  215. "schema": {
  216. "allOf": [
  217. {
  218. "$ref": "#/definitions/response.Response"
  219. },
  220. {
  221. "type": "object",
  222. "properties": {
  223. "msg": {
  224. "type": "string"
  225. }
  226. }
  227. }
  228. ]
  229. }
  230. }
  231. }
  232. }
  233. },
  234. "/Quote/QuoteSubscribe": {
  235. "post": {
  236. "security": [
  237. {
  238. "ApiKeyAuth": []
  239. }
  240. ],
  241. "consumes": [
  242. "application/json"
  243. ],
  244. "produces": [
  245. "application/json"
  246. ],
  247. "tags": [
  248. "实时行情"
  249. ],
  250. "summary": "订阅商品实时行情请求",
  251. "parameters": [
  252. {
  253. "description": "入参1",
  254. "name": "data",
  255. "in": "body",
  256. "required": true,
  257. "schema": {
  258. "$ref": "#/definitions/request.QuoteSubscribeReq"
  259. }
  260. }
  261. ],
  262. "responses": {
  263. "200": {
  264. "description": "出参",
  265. "schema": {
  266. "allOf": [
  267. {
  268. "$ref": "#/definitions/response.Response"
  269. },
  270. {
  271. "type": "object",
  272. "properties": {
  273. "msg": {
  274. "type": "string"
  275. }
  276. }
  277. }
  278. ]
  279. }
  280. }
  281. }
  282. }
  283. }
  284. },
  285. "definitions": {
  286. "request.LoginReq": {
  287. "type": "object",
  288. "required": [
  289. "clientType",
  290. "password",
  291. "userName"
  292. ],
  293. "properties": {
  294. "clientType": {
  295. "description": "客户端类型,2-PC交易端 3-手机客户端_安卓 4-网页客户端 5-微信客户端 6-手机客户端_苹果",
  296. "type": "integer"
  297. },
  298. "password": {
  299. "description": "密码",
  300. "type": "string"
  301. },
  302. "userName": {
  303. "description": "用户名,可以是LoginID/LoginCode/手机号码",
  304. "type": "string"
  305. }
  306. }
  307. },
  308. "request.MQBodyReq": {
  309. "type": "object",
  310. "required": [
  311. "data",
  312. "funCodeReq",
  313. "isEncrypted"
  314. ],
  315. "properties": {
  316. "data": {
  317. "description": "请求数据",
  318. "type": "string"
  319. },
  320. "funCodeReq": {
  321. "description": "请求功能码",
  322. "type": "integer"
  323. },
  324. "funCodeRsp": {
  325. "description": "回复功能码",
  326. "type": "integer"
  327. },
  328. "isEncrypted": {
  329. "description": "是否加密",
  330. "type": "boolean"
  331. }
  332. }
  333. },
  334. "request.MQNtfReq": {
  335. "type": "object",
  336. "required": [
  337. "data",
  338. "funCode"
  339. ],
  340. "properties": {
  341. "data": {
  342. "description": "数据",
  343. "type": "string"
  344. },
  345. "funCode": {
  346. "description": "功能码",
  347. "type": "integer"
  348. },
  349. "topic": {
  350. "description": "主题",
  351. "type": "string"
  352. }
  353. }
  354. },
  355. "request.QuoteGoods": {
  356. "type": "object",
  357. "properties": {
  358. "exchangeId": {
  359. "description": "交易所代码,一般写死250",
  360. "type": "integer"
  361. },
  362. "goodsCode": {
  363. "description": "商品代码,全大写",
  364. "type": "string"
  365. }
  366. }
  367. },
  368. "request.QuoteSubscribeReq": {
  369. "type": "object",
  370. "properties": {
  371. "quoteGoodses": {
  372. "description": "待订阅商品信息",
  373. "type": "array",
  374. "items": {
  375. "$ref": "#/definitions/request.QuoteGoods"
  376. }
  377. }
  378. }
  379. },
  380. "response.LoginRsp": {
  381. "type": "object",
  382. "properties": {
  383. "expiresAt": {
  384. "description": "过期时间",
  385. "type": "integer"
  386. },
  387. "loginId": {
  388. "description": "登录ID",
  389. "type": "integer"
  390. },
  391. "token": {
  392. "description": "新服务Token",
  393. "type": "string"
  394. },
  395. "userId": {
  396. "description": "用户ID",
  397. "type": "integer"
  398. }
  399. }
  400. },
  401. "response.MQBodyRsp": {
  402. "type": "object",
  403. "properties": {
  404. "data": {
  405. "description": "请求数据",
  406. "type": "string"
  407. },
  408. "funcode": {
  409. "description": "回复功能码",
  410. "type": "integer"
  411. },
  412. "isEncrypted": {
  413. "description": "是否加密",
  414. "type": "boolean"
  415. }
  416. }
  417. },
  418. "response.Response": {
  419. "type": "object",
  420. "properties": {
  421. "code": {
  422. "type": "integer"
  423. },
  424. "data": {},
  425. "msg": {
  426. "type": "string"
  427. }
  428. }
  429. }
  430. },
  431. "securityDefinitions": {
  432. "ApiKeyAuth": {
  433. "type": "apiKey",
  434. "name": "x-token",
  435. "in": "header"
  436. }
  437. }
  438. }