swagger.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. definitions:
  2. model.ApiTranslateRequest:
  3. properties:
  4. authWay:
  5. type: string
  6. paramForm:
  7. type: string
  8. requestMethod:
  9. type: string
  10. requestParam:
  11. type: string
  12. serviceUrl:
  13. type: string
  14. type: object
  15. model.ColnDataInsert:
  16. properties:
  17. colNameArray:
  18. items:
  19. type: string
  20. type: array
  21. id:
  22. type: integer
  23. rows:
  24. items:
  25. $ref: '#/definitions/model.ColnItem'
  26. type: array
  27. tbName:
  28. type: string
  29. type: object
  30. model.ColnInfo:
  31. properties:
  32. colName:
  33. type: string
  34. dataLength:
  35. type: integer
  36. dataType:
  37. type: string
  38. isIncrement:
  39. type: integer
  40. isPk:
  41. description: 是否是主键
  42. type: integer
  43. isRequired:
  44. type: integer
  45. type: object
  46. model.ColnItem:
  47. properties:
  48. list:
  49. items:
  50. type: string
  51. type: array
  52. type: object
  53. model.CommonList:
  54. properties:
  55. list:
  56. items:
  57. additionalProperties: true
  58. type: object
  59. type: array
  60. total:
  61. type: integer
  62. type: object
  63. model.DatabaseCreateRequest:
  64. properties:
  65. columns:
  66. items:
  67. $ref: '#/definitions/model.ColnInfo'
  68. type: array
  69. connection:
  70. type: string
  71. dbName:
  72. type: string
  73. dbType:
  74. type: string
  75. id:
  76. type: integer
  77. tbName:
  78. type: string
  79. type: object
  80. model.DbConnInfo:
  81. properties:
  82. connection:
  83. type: string
  84. dbName:
  85. type: string
  86. id:
  87. type: integer
  88. mode:
  89. description: 连接模式:test:表示测试数据库是否连通,测试完成后自动断开,add表示添加数据库到管理队列。(add之前请先确保数据库已经添加到redis的database
  90. hash里面)
  91. type: string
  92. type:
  93. type: string
  94. required:
  95. - connection
  96. - dbName
  97. - mode
  98. - type
  99. type: object
  100. model.DbQuery:
  101. properties:
  102. cols:
  103. items:
  104. type: string
  105. type: array
  106. id:
  107. type: integer
  108. pageNo:
  109. type: integer
  110. pageSize:
  111. type: integer
  112. query:
  113. items:
  114. $ref: '#/definitions/model.QueryCond'
  115. type: array
  116. sort:
  117. $ref: '#/definitions/model.SortCond'
  118. tbName:
  119. type: string
  120. required:
  121. - id
  122. - pageNo
  123. - pageSize
  124. - tbName
  125. type: object
  126. model.KeyVal:
  127. properties:
  128. keyStr:
  129. type: string
  130. keyVal:
  131. type: string
  132. type: object
  133. model.LoginRequest:
  134. properties:
  135. appId:
  136. type: string
  137. appSecret:
  138. type: string
  139. type: object
  140. model.NullObj:
  141. type: object
  142. model.Page:
  143. properties:
  144. pageNo:
  145. type: integer
  146. pageSize:
  147. type: integer
  148. type: object
  149. model.QueryCond:
  150. properties:
  151. colName:
  152. type: string
  153. colVal:
  154. type: string
  155. cond:
  156. description: 0-等于 1-大于 2-小于
  157. type: integer
  158. type: object
  159. model.QueryId:
  160. properties:
  161. id:
  162. type: integer
  163. type: object
  164. model.QueryTableColn:
  165. properties:
  166. id:
  167. type: integer
  168. tableName:
  169. type: string
  170. type: object
  171. model.RefreshTokenRequest:
  172. properties:
  173. refreshToken:
  174. type: string
  175. type: object
  176. model.RequestBody:
  177. properties:
  178. pageNo:
  179. type: integer
  180. pageSize:
  181. type: integer
  182. search:
  183. $ref: '#/definitions/model.SearchParam'
  184. type: object
  185. model.ResponseToken:
  186. properties:
  187. accessToken:
  188. type: string
  189. expiresAt:
  190. type: integer
  191. refreshToken:
  192. type: string
  193. type: object
  194. model.SearchParam:
  195. properties:
  196. and:
  197. description: '[{"xml.like":"张%"},{"xml.eq":"张%"}]'
  198. items:
  199. $ref: '#/definitions/model.KeyVal'
  200. type: array
  201. or:
  202. description: '[{"xml.like":"张%"}]'
  203. items:
  204. $ref: '#/definitions/model.KeyVal'
  205. type: array
  206. type: object
  207. model.SortCond:
  208. properties:
  209. colName:
  210. type: string
  211. isDesc:
  212. description: 1-降序 0-升序
  213. type: integer
  214. type: object
  215. model.TbDelete:
  216. properties:
  217. id:
  218. type: integer
  219. tbName:
  220. type: string
  221. type: object
  222. model.TbIndex:
  223. properties:
  224. id:
  225. type: integer
  226. indexArray:
  227. items:
  228. type: string
  229. type: array
  230. tbName:
  231. type: string
  232. type: object
  233. info:
  234. contact: {}
  235. paths:
  236. /dxp/database/connect:
  237. post:
  238. consumes:
  239. - application/json
  240. description: 测试数据库连接
  241. parameters:
  242. - description: json
  243. in: body
  244. name: connect
  245. required: true
  246. schema:
  247. $ref: '#/definitions/model.DbConnInfo'
  248. produces:
  249. - application/json
  250. responses:
  251. "200":
  252. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  253. schema:
  254. $ref: '#/definitions/model.NullObj'
  255. summary: 数据库连接测试
  256. tags:
  257. - 巨衍接口-数据库连接测试
  258. /dxp/database/databaseAddIndex:
  259. post:
  260. consumes:
  261. - application/json
  262. description: 动态添加索引
  263. parameters:
  264. - description: json
  265. in: body
  266. name: connect
  267. required: true
  268. schema:
  269. $ref: '#/definitions/model.TbIndex'
  270. produces:
  271. - application/json
  272. responses:
  273. "200":
  274. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  275. schema:
  276. $ref: '#/definitions/model.NullObj'
  277. summary: 动态添加索引
  278. tags:
  279. - 巨衍接口-动态添加索引
  280. /dxp/database/databaseCreateTable:
  281. post:
  282. consumes:
  283. - application/json
  284. description: 动态创建数据表
  285. parameters:
  286. - description: json
  287. in: body
  288. name: connect
  289. required: true
  290. schema:
  291. $ref: '#/definitions/model.DatabaseCreateRequest'
  292. produces:
  293. - application/json
  294. responses:
  295. "200":
  296. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  297. schema:
  298. $ref: '#/definitions/model.NullObj'
  299. summary: 动态创建数据表
  300. tags:
  301. - 巨衍接口-动态创建数据表
  302. /dxp/database/databaseDelete:
  303. post:
  304. consumes:
  305. - application/json
  306. description: 删除数据库
  307. parameters:
  308. - description: json
  309. in: body
  310. name: connect
  311. required: true
  312. schema:
  313. $ref: '#/definitions/model.QueryId'
  314. produces:
  315. - application/json
  316. responses:
  317. "200":
  318. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  319. schema:
  320. $ref: '#/definitions/model.NullObj'
  321. summary: 删除数据库
  322. tags:
  323. - 巨衍接口-删除数据库
  324. /dxp/database/databaseDeleteIndex:
  325. post:
  326. consumes:
  327. - application/json
  328. description: 动态删除索引
  329. parameters:
  330. - description: json
  331. in: body
  332. name: connect
  333. required: true
  334. schema:
  335. $ref: '#/definitions/model.TbIndex'
  336. produces:
  337. - application/json
  338. responses:
  339. "200":
  340. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  341. schema:
  342. $ref: '#/definitions/model.NullObj'
  343. summary: 动态删除索引
  344. tags:
  345. - 巨衍接口-动态删除索引
  346. /dxp/database/databaseDeleteTableData:
  347. post:
  348. consumes:
  349. - application/json
  350. description: 删除表数据
  351. parameters:
  352. - description: json
  353. in: body
  354. name: connect
  355. required: true
  356. schema:
  357. $ref: '#/definitions/model.TbDelete'
  358. produces:
  359. - application/json
  360. responses:
  361. "200":
  362. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  363. schema:
  364. $ref: '#/definitions/model.NullObj'
  365. summary: 删除表数据
  366. tags:
  367. - 巨衍接口-删除表数据
  368. /dxp/database/databaseDropTable:
  369. post:
  370. consumes:
  371. - application/json
  372. description: 删除数据表
  373. parameters:
  374. - description: json
  375. in: body
  376. name: connect
  377. required: true
  378. schema:
  379. $ref: '#/definitions/model.TbDelete'
  380. produces:
  381. - application/json
  382. responses:
  383. "200":
  384. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  385. schema:
  386. $ref: '#/definitions/model.NullObj'
  387. summary: 删除数据表
  388. tags:
  389. - 巨衍接口-删除数据表
  390. /dxp/database/databaseInsertData:
  391. post:
  392. consumes:
  393. - application/json
  394. description: 动态插入表数据
  395. parameters:
  396. - description: json
  397. in: body
  398. name: connect
  399. required: true
  400. schema:
  401. $ref: '#/definitions/model.ColnDataInsert'
  402. produces:
  403. - application/json
  404. responses:
  405. "200":
  406. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  407. schema:
  408. $ref: '#/definitions/model.NullObj'
  409. summary: 动态插入表数据
  410. tags:
  411. - 巨衍接口-动态插入表数据
  412. /dxp/database/databaseQueryStatus:
  413. post:
  414. consumes:
  415. - application/json
  416. description: 查询数据库连接状态
  417. parameters:
  418. - description: json
  419. in: body
  420. name: connect
  421. required: true
  422. schema:
  423. $ref: '#/definitions/model.Page'
  424. produces:
  425. - application/json
  426. responses:
  427. "200":
  428. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  429. schema:
  430. $ref: '#/definitions/model.CommonList'
  431. summary: 查询数据库连接状态
  432. tags:
  433. - 巨衍接口-查询数据库连接状态
  434. /dxp/database/databaseQueryTable:
  435. post:
  436. consumes:
  437. - application/json
  438. description: 查询表数据
  439. parameters:
  440. - description: json
  441. in: body
  442. name: connect
  443. required: true
  444. schema:
  445. $ref: '#/definitions/model.DbQuery'
  446. produces:
  447. - application/json
  448. responses:
  449. "200":
  450. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  451. schema:
  452. $ref: '#/definitions/model.CommonList'
  453. summary: 查询表数据
  454. tags:
  455. - 巨衍接口-查询表数据
  456. /dxp/database/databaseQueryTableColnList:
  457. post:
  458. consumes:
  459. - application/json
  460. description: 查询指定数据库指定表字段
  461. parameters:
  462. - description: json
  463. in: body
  464. name: connect
  465. required: true
  466. schema:
  467. $ref: '#/definitions/model.QueryTableColn'
  468. produces:
  469. - application/json
  470. responses:
  471. "200":
  472. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  473. schema:
  474. $ref: '#/definitions/model.CommonList'
  475. summary: 查询指定数据库指定表字段
  476. tags:
  477. - 巨衍接口-查询指定数据库指定表字段
  478. /dxp/database/databaseQueryTableList:
  479. post:
  480. consumes:
  481. - application/json
  482. description: 查询指定数据库表结构
  483. parameters:
  484. - description: json
  485. in: body
  486. name: connect
  487. required: true
  488. schema:
  489. $ref: '#/definitions/model.QueryId'
  490. produces:
  491. - application/json
  492. responses:
  493. "200":
  494. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  495. schema:
  496. $ref: '#/definitions/model.CommonList'
  497. summary: 查询指定数据库表结构
  498. tags:
  499. - 巨衍接口-查询指定数据库表结构
  500. /dxp/database/databaseUpdateNotify:
  501. post:
  502. consumes:
  503. - application/json
  504. description: 数据库更新通知
  505. parameters:
  506. - description: json
  507. in: body
  508. name: connect
  509. required: true
  510. schema:
  511. $ref: '#/definitions/model.NullObj'
  512. produces:
  513. - application/json
  514. responses:
  515. "200":
  516. description: '{"code": 0, "msg": "xxx", data:{total:0,rows:[]}}'
  517. schema:
  518. $ref: '#/definitions/model.NullObj'
  519. summary: 数据库更新通知
  520. tags:
  521. - 巨衍接口-数据库更新通知
  522. /dxp/outapi/any/:key:
  523. post:
  524. consumes:
  525. - application/json
  526. description: 数据库资源数据查询
  527. parameters:
  528. - description: json
  529. in: body
  530. name: connect
  531. required: true
  532. schema:
  533. $ref: '#/definitions/model.RequestBody'
  534. produces:
  535. - application/json
  536. responses:
  537. "200":
  538. description: '{"code": 0, "msg": "xxx", data:{}}'
  539. schema:
  540. $ref: '#/definitions/model.CommonList'
  541. summary: 数据库资源数据查询
  542. tags:
  543. - 第三方接口服务-数据库资源数据查询
  544. /dxp/outapi/authorize:
  545. post:
  546. consumes:
  547. - application/json
  548. description: 应用鉴权
  549. parameters:
  550. - description: json
  551. in: body
  552. name: connect
  553. required: true
  554. schema:
  555. $ref: '#/definitions/model.LoginRequest'
  556. produces:
  557. - application/json
  558. responses:
  559. "200":
  560. description: '{"code": 0, "msg": "xxx", data:{}}'
  561. schema:
  562. $ref: '#/definitions/model.ResponseToken'
  563. summary: 应用鉴权
  564. tags:
  565. - 第三方接口服务-应用鉴权
  566. /dxp/outapi/base/apiCall:
  567. post:
  568. consumes:
  569. - application/json
  570. description: 服务测试接口
  571. parameters:
  572. - description: json
  573. in: body
  574. name: connect
  575. required: true
  576. schema:
  577. $ref: '#/definitions/model.ApiTranslateRequest'
  578. produces:
  579. - application/json
  580. responses:
  581. "200":
  582. description: '{"code": 0, "msg": "xxx", data:{}}'
  583. schema:
  584. additionalProperties: true
  585. type: object
  586. summary: 服务测试接口
  587. tags:
  588. - 第三方接口服务-服务测试接口
  589. /dxp/outapi/base/proxyToData/any/:key:
  590. post:
  591. consumes:
  592. - application/json
  593. description: 数据库资源数据查询
  594. parameters:
  595. - description: json
  596. in: body
  597. name: connect
  598. required: true
  599. schema:
  600. $ref: '#/definitions/model.RequestBody'
  601. produces:
  602. - application/json
  603. responses:
  604. "200":
  605. description: '{"code": 0, "msg": "xxx", data:{}}'
  606. schema:
  607. $ref: '#/definitions/model.CommonList'
  608. summary: 数据库资源数据查询
  609. tags:
  610. - 巨衍接口-数据库资源数据查询
  611. /dxp/outapi/base/proxyToService/any/:key:
  612. post:
  613. consumes:
  614. - application/json
  615. description: 接口服务资源数据查询
  616. parameters:
  617. - description: json
  618. in: body
  619. name: connect
  620. required: true
  621. schema:
  622. $ref: '#/definitions/model.RequestBody'
  623. produces:
  624. - application/json
  625. responses:
  626. "200":
  627. description: '{"code": 0, "msg": "xxx", data:{}}'
  628. schema:
  629. $ref: '#/definitions/model.CommonList'
  630. summary: 接口服务资源数据查询
  631. tags:
  632. - 巨衍接口-接口服务资源数据查询
  633. /dxp/outapi/refreshToken:
  634. post:
  635. consumes:
  636. - application/json
  637. description: 动态刷新token
  638. parameters:
  639. - description: json
  640. in: body
  641. name: connect
  642. required: true
  643. schema:
  644. $ref: '#/definitions/model.RefreshTokenRequest'
  645. produces:
  646. - application/json
  647. responses:
  648. "200":
  649. description: '{"code": 0, "msg": "xxx", data:{}}'
  650. schema:
  651. $ref: '#/definitions/model.ResponseToken'
  652. summary: 动态刷新token
  653. tags:
  654. - 第三方接口服务-动态刷新token
  655. swagger: "2.0"