swagger.json 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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. "/MQ/SendMsgToMQ": {
  59. "post": {
  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. "parameters": [
  76. {
  77. "description": "入参",
  78. "name": "data",
  79. "in": "body",
  80. "required": true,
  81. "schema": {
  82. "$ref": "#/definitions/request.MQBodyReq"
  83. }
  84. }
  85. ],
  86. "responses": {
  87. "200": {
  88. "description": "出参",
  89. "schema": {
  90. "allOf": [
  91. {
  92. "$ref": "#/definitions/response.Response"
  93. },
  94. {
  95. "type": "object",
  96. "properties": {
  97. "data": {
  98. "$ref": "#/definitions/response.MQBodyRsp"
  99. },
  100. "msg": {
  101. "type": "string"
  102. }
  103. }
  104. }
  105. ]
  106. }
  107. }
  108. }
  109. }
  110. },
  111. "/MQ/SendNtfToMQ": {
  112. "post": {
  113. "consumes": [
  114. "application/json"
  115. ],
  116. "produces": [
  117. "application/json"
  118. ],
  119. "tags": [
  120. "总线业务"
  121. ],
  122. "summary": "总线通知",
  123. "parameters": [
  124. {
  125. "description": "入参",
  126. "name": "data",
  127. "in": "body",
  128. "required": true,
  129. "schema": {
  130. "$ref": "#/definitions/request.MQNtfReq"
  131. }
  132. }
  133. ],
  134. "responses": {
  135. "200": {
  136. "description": "出参",
  137. "schema": {
  138. "allOf": [
  139. {
  140. "$ref": "#/definitions/response.Response"
  141. },
  142. {
  143. "type": "object",
  144. "properties": {
  145. "msg": {
  146. "type": "string"
  147. }
  148. }
  149. }
  150. ]
  151. }
  152. }
  153. }
  154. }
  155. }
  156. },
  157. "definitions": {
  158. "request.LoginReq": {
  159. "type": "object",
  160. "required": [
  161. "clientType",
  162. "password",
  163. "userName"
  164. ],
  165. "properties": {
  166. "clientType": {
  167. "description": "客户端类型,2-PC交易端 3-手机客户端_安卓 4-网页客户端 5-微信客户端 6-手机客户端_苹果",
  168. "type": "integer"
  169. },
  170. "password": {
  171. "description": "密码",
  172. "type": "string"
  173. },
  174. "userName": {
  175. "description": "用户名,可以是LoginID/LoginCode/手机号码",
  176. "type": "string"
  177. }
  178. }
  179. },
  180. "request.MQBodyReq": {
  181. "type": "object",
  182. "required": [
  183. "data",
  184. "funCodeReq",
  185. "isEncrypted"
  186. ],
  187. "properties": {
  188. "data": {
  189. "description": "请求数据",
  190. "type": "string"
  191. },
  192. "funCodeReq": {
  193. "description": "请求功能码",
  194. "type": "integer"
  195. },
  196. "funCodeRsp": {
  197. "description": "回复功能码",
  198. "type": "integer"
  199. },
  200. "isEncrypted": {
  201. "description": "是否加密",
  202. "type": "boolean"
  203. }
  204. }
  205. },
  206. "request.MQNtfReq": {
  207. "type": "object",
  208. "required": [
  209. "data",
  210. "funCode"
  211. ],
  212. "properties": {
  213. "data": {
  214. "description": "数据",
  215. "type": "string"
  216. },
  217. "funCode": {
  218. "description": "功能码",
  219. "type": "integer"
  220. },
  221. "topic": {
  222. "description": "主题",
  223. "type": "string"
  224. }
  225. }
  226. },
  227. "response.LoginRsp": {
  228. "type": "object",
  229. "properties": {
  230. "expiresAt": {
  231. "description": "过期时间",
  232. "type": "integer"
  233. },
  234. "loginId": {
  235. "description": "登录ID",
  236. "type": "integer"
  237. },
  238. "token": {
  239. "description": "新服务Token",
  240. "type": "string"
  241. },
  242. "userId": {
  243. "description": "用户ID",
  244. "type": "integer"
  245. }
  246. }
  247. },
  248. "response.MQBodyRsp": {
  249. "type": "object",
  250. "properties": {
  251. "data": {
  252. "description": "请求数据",
  253. "type": "string"
  254. },
  255. "funcode": {
  256. "description": "回复功能码",
  257. "type": "integer"
  258. },
  259. "isEncrypted": {
  260. "description": "是否加密",
  261. "type": "boolean"
  262. }
  263. }
  264. },
  265. "response.Response": {
  266. "type": "object",
  267. "properties": {
  268. "code": {
  269. "type": "integer"
  270. },
  271. "data": {},
  272. "msg": {
  273. "type": "string"
  274. }
  275. }
  276. }
  277. },
  278. "securityDefinitions": {
  279. "ApiKeyAuth": {
  280. "type": "apiKey",
  281. "name": "x-token",
  282. "in": "header"
  283. }
  284. }
  285. }