swagger.json 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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. },
  112. "definitions": {
  113. "request.LoginReq": {
  114. "type": "object",
  115. "required": [
  116. "clientType",
  117. "password",
  118. "userName"
  119. ],
  120. "properties": {
  121. "clientType": {
  122. "description": "客户端类型,2-PC交易端 3-手机客户端_安卓 4-网页客户端 5-微信客户端 6-手机客户端_苹果",
  123. "type": "integer"
  124. },
  125. "password": {
  126. "description": "密码",
  127. "type": "string"
  128. },
  129. "userName": {
  130. "description": "用户名,可以是LoginID/LoginCode/手机号码",
  131. "type": "string"
  132. }
  133. }
  134. },
  135. "request.MQBodyReq": {
  136. "type": "object",
  137. "required": [
  138. "data",
  139. "funCodeReq",
  140. "isEncrypted"
  141. ],
  142. "properties": {
  143. "data": {
  144. "description": "请求数据",
  145. "type": "string"
  146. },
  147. "funCodeReq": {
  148. "description": "请求功能码",
  149. "type": "integer"
  150. },
  151. "funCodeRsp": {
  152. "description": "回复功能码",
  153. "type": "integer"
  154. },
  155. "isEncrypted": {
  156. "description": "是否加密",
  157. "type": "boolean"
  158. }
  159. }
  160. },
  161. "response.LoginRsp": {
  162. "type": "object",
  163. "properties": {
  164. "expiresAt": {
  165. "description": "过期时间",
  166. "type": "integer"
  167. },
  168. "loginId": {
  169. "description": "登录ID",
  170. "type": "integer"
  171. },
  172. "token": {
  173. "description": "新服务Token",
  174. "type": "string"
  175. },
  176. "userId": {
  177. "description": "用户ID",
  178. "type": "integer"
  179. }
  180. }
  181. },
  182. "response.MQBodyRsp": {
  183. "type": "object",
  184. "properties": {
  185. "data": {
  186. "description": "请求数据",
  187. "type": "string"
  188. },
  189. "funcode": {
  190. "description": "回复功能码",
  191. "type": "integer"
  192. },
  193. "isEncrypted": {
  194. "description": "是否加密",
  195. "type": "boolean"
  196. }
  197. }
  198. },
  199. "response.Response": {
  200. "type": "object",
  201. "properties": {
  202. "code": {
  203. "type": "integer"
  204. },
  205. "data": {},
  206. "msg": {
  207. "type": "string"
  208. }
  209. }
  210. }
  211. },
  212. "securityDefinitions": {
  213. "ApiKeyAuth": {
  214. "type": "apiKey",
  215. "name": "x-token",
  216. "in": "header"
  217. }
  218. }
  219. }