swagger.yaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. basePath: /
  2. info:
  3. contact:
  4. email: kptzhu@163.com
  5. name: 朱红宾
  6. url: https://www.dairyinfo.com.cn
  7. description: kptyun_service
  8. license: {}
  9. title: 科湃腾Go语言后台API
  10. version: 1.1.2
  11. paths:
  12. /auth:
  13. post:
  14. consumes:
  15. - application/json
  16. parameters:
  17. - description: admin
  18. in: formData
  19. name: username
  20. required: true
  21. type: string
  22. - description: "123456"
  23. in: formData
  24. name: password
  25. required: true
  26. type: string
  27. produces:
  28. - application/json
  29. responses:
  30. "200":
  31. description: '{ "code": 200e, "data": { "token": "xxx" }, "msg": "ok" }'
  32. schema:
  33. type: string
  34. "400":
  35. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  36. schema:
  37. type: string
  38. "404":
  39. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  40. schema:
  41. type: string
  42. summary: 获取登录token 信息
  43. tags:
  44. - auth
  45. /authdata/GetRoleMenus:
  46. get:
  47. consumes:
  48. - application/json
  49. parameters:
  50. - description: Ton
  51. in: query
  52. name: Ton
  53. required: true
  54. type: string
  55. produces:
  56. - application/json
  57. responses:
  58. "200":
  59. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  60. schema:
  61. type: string
  62. summary: 递归获取所有
  63. tags:
  64. - menu
  65. /authdata/menus:
  66. get:
  67. consumes:
  68. - application/json
  69. parameters:
  70. - description: Ton
  71. in: query
  72. name: Ton
  73. required: true
  74. type: string
  75. produces:
  76. - application/json
  77. responses:
  78. "200":
  79. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  80. schema:
  81. type: string
  82. summary: 获取所有菜单
  83. tags:
  84. - menu
  85. post:
  86. consumes:
  87. - application/json
  88. parameters:
  89. - description: name
  90. in: query
  91. name: name
  92. required: true
  93. type: string
  94. - description: path
  95. in: query
  96. name: path
  97. required: true
  98. type: string
  99. produces:
  100. - application/json
  101. responses:
  102. "200":
  103. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  104. schema:
  105. type: string
  106. summary: 增加菜单
  107. tags:
  108. - menu
  109. /authdata/menus/:
  110. delete:
  111. consumes:
  112. - application/json
  113. parameters:
  114. - description: id
  115. in: path
  116. name: id
  117. required: true
  118. type: string
  119. produces:
  120. - application/json
  121. responses:
  122. "200":
  123. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  124. schema:
  125. type: string
  126. summary: 删除菜单
  127. tags:
  128. - menu
  129. get:
  130. consumes:
  131. - application/json
  132. parameters:
  133. - description: id
  134. in: path
  135. name: id
  136. required: true
  137. type: string
  138. produces:
  139. - application/json
  140. responses:
  141. "200":
  142. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  143. schema:
  144. type: string
  145. summary: 获取单个菜单
  146. tags:
  147. - menu
  148. put:
  149. consumes:
  150. - application/json
  151. parameters:
  152. - description: id
  153. in: path
  154. name: id
  155. required: true
  156. type: string
  157. - description: name
  158. in: query
  159. name: name
  160. required: true
  161. type: string
  162. - description: path
  163. in: query
  164. name: path
  165. required: true
  166. type: string
  167. - description: method
  168. in: query
  169. name: method
  170. required: true
  171. type: string
  172. produces:
  173. - application/json
  174. responses:
  175. "200":
  176. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  177. schema:
  178. type: string
  179. summary: 更新菜单
  180. tags:
  181. - menu
  182. /authdata/roles:
  183. get:
  184. consumes:
  185. - application/json
  186. produces:
  187. - application/json
  188. responses:
  189. "200":
  190. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  191. schema:
  192. type: string
  193. summary: 获取所有角色
  194. tags:
  195. - role
  196. post:
  197. consumes:
  198. - application/json
  199. parameters:
  200. - description: name
  201. in: query
  202. name: name
  203. required: true
  204. type: string
  205. - description: menu_id
  206. in: query
  207. name: menu_id
  208. required: true
  209. type: string
  210. produces:
  211. - application/json
  212. responses:
  213. "200":
  214. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  215. schema:
  216. type: string
  217. summary: 增加角色
  218. tags:
  219. - role
  220. /authdata/roles/:
  221. delete:
  222. consumes:
  223. - application/json
  224. parameters:
  225. - description: id
  226. in: path
  227. name: id
  228. required: true
  229. type: string
  230. produces:
  231. - application/json
  232. responses:
  233. "200":
  234. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  235. schema:
  236. type: string
  237. summary: 删除角色
  238. tags:
  239. - role
  240. get:
  241. consumes:
  242. - application/json
  243. parameters:
  244. - description: id
  245. in: path
  246. name: id
  247. required: true
  248. type: string
  249. produces:
  250. - application/json
  251. responses:
  252. "200":
  253. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  254. schema:
  255. type: string
  256. summary: 获取单个角色
  257. tags:
  258. - role
  259. put:
  260. consumes:
  261. - application/json
  262. parameters:
  263. - description: id
  264. in: path
  265. name: id
  266. required: true
  267. type: string
  268. - description: name
  269. in: query
  270. name: name
  271. required: true
  272. type: string
  273. - description: menu_id
  274. in: query
  275. name: menu_id
  276. required: true
  277. type: string
  278. produces:
  279. - application/json
  280. responses:
  281. "200":
  282. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  283. schema:
  284. type: string
  285. summary: 更新角色
  286. tags:
  287. - role
  288. /authdata/userinfo:
  289. get:
  290. consumes:
  291. - application/json
  292. parameters:
  293. - description: iddd
  294. in: path
  295. name: id
  296. required: true
  297. type: integer
  298. produces:
  299. - application/json
  300. responses:
  301. "200":
  302. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  303. schema:
  304. type: string
  305. summary: 获取单个用户信息
  306. tags:
  307. - users
  308. /data/GetDataByName:
  309. post:
  310. consumes:
  311. - application/json
  312. parameters:
  313. - description: sqlname
  314. in: body
  315. name: sqlname
  316. required: true
  317. schema:
  318. $ref: '#/definitions/string'
  319. type: object
  320. - description: offset
  321. in: body
  322. name: offset
  323. required: true
  324. schema:
  325. $ref: '#/definitions/int'
  326. type: object
  327. - description: pagecount
  328. in: body
  329. name: pagecount
  330. required: true
  331. schema:
  332. $ref: '#/definitions/int'
  333. type: object
  334. - description: returntype
  335. in: body
  336. name: returntype
  337. required: true
  338. schema:
  339. $ref: '#/definitions/string'
  340. type: object
  341. produces:
  342. - application/json
  343. responses:
  344. "200":
  345. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  346. schema:
  347. type: string
  348. "400":
  349. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  350. schema:
  351. type: string
  352. "404":
  353. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  354. schema:
  355. type: string
  356. summary: 根据APISQL表中SQL执行得到数据集
  357. tags:
  358. - GetDataByName
  359. /data/GetDataByNameForm:
  360. post:
  361. consumes:
  362. - application/json
  363. parameters:
  364. - description: sqlname
  365. in: body
  366. name: sqlname
  367. required: true
  368. schema:
  369. $ref: '#/definitions/json'
  370. type: object
  371. - description: offset
  372. in: query
  373. name: offset
  374. required: true
  375. type: integer
  376. - description: pagecount
  377. in: query
  378. name: pagecount
  379. required: true
  380. type: integer
  381. - description: returntype
  382. in: query
  383. name: returntype
  384. required: true
  385. type: string
  386. - description: ss
  387. in: formData
  388. name: s
  389. required: true
  390. type: json
  391. produces:
  392. - application/json
  393. responses:
  394. "200":
  395. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  396. schema:
  397. type: string
  398. "400":
  399. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  400. schema:
  401. type: string
  402. "404":
  403. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  404. schema:
  405. type: string
  406. summary: 根据APISQL表中SQL执行得到数据集
  407. tags:
  408. - GetDataByNameForm
  409. /data/GetDataByNames:
  410. post:
  411. consumes:
  412. - application/json
  413. parameters:
  414. - description: offset
  415. in: query
  416. name: offset
  417. required: true
  418. type: integer
  419. - description: pagecount
  420. in: query
  421. name: pagecount
  422. required: true
  423. type: integer
  424. - description: returntype
  425. in: query
  426. name: returntype
  427. required: true
  428. type: string
  429. produces:
  430. - application/json
  431. responses:
  432. "200":
  433. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  434. schema:
  435. type: string
  436. "400":
  437. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  438. schema:
  439. type: string
  440. "404":
  441. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  442. schema:
  443. type: string
  444. summary: 根据APISQL表中SQL执行得到数据集
  445. tags:
  446. - GetDataByNames
  447. /data/ImportExcel:
  448. post:
  449. consumes:
  450. - application/json
  451. parameters:
  452. - description: 文件名
  453. in: query
  454. name: file
  455. required: true
  456. type: string
  457. - description: 执行sql的名字
  458. in: header
  459. name: name
  460. required: true
  461. type: string
  462. produces:
  463. - application/json
  464. responses:
  465. "200":
  466. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  467. schema:
  468. type: string
  469. "400":
  470. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  471. schema:
  472. type: string
  473. "404":
  474. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  475. schema:
  476. type: string
  477. summary: 导入excel文件到数据库,excel第一行作为参数
  478. tags:
  479. - ImportExcel
  480. /data/PostDataByName:
  481. post:
  482. consumes:
  483. - application/json
  484. parameters:
  485. - description: sqlname
  486. in: query
  487. name: sqlname
  488. required: true
  489. type: string
  490. - description: offset
  491. in: query
  492. name: offset
  493. required: true
  494. type: integer
  495. - description: pagecount
  496. in: query
  497. name: pagecount
  498. required: true
  499. type: integer
  500. - description: returntype
  501. in: query
  502. name: returntype
  503. required: true
  504. type: string
  505. produces:
  506. - application/json
  507. responses:
  508. "200":
  509. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  510. schema:
  511. type: string
  512. "400":
  513. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  514. schema:
  515. type: string
  516. "404":
  517. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  518. schema:
  519. type: string
  520. summary: 根据APISQL表中SQL执行得到数据集
  521. tags:
  522. - PostDataByName
  523. /data/PostDataByNameForm:
  524. post:
  525. consumes:
  526. - application/json
  527. parameters:
  528. - description: sqlname
  529. in: query
  530. name: sqlname
  531. required: true
  532. type: string
  533. - description: offset
  534. in: query
  535. name: offset
  536. required: true
  537. type: integer
  538. - description: pagecount
  539. in: query
  540. name: pagecount
  541. required: true
  542. type: integer
  543. - description: returntype
  544. in: query
  545. name: returntype
  546. required: true
  547. type: string
  548. produces:
  549. - application/json
  550. responses:
  551. "200":
  552. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  553. schema:
  554. type: string
  555. "400":
  556. description: '{"code":400, "data":null,"msg":"请求参数错误朱红彬彬"}'
  557. schema:
  558. type: string
  559. "404":
  560. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  561. schema:
  562. type: string
  563. summary: 根据APISQL表中SQL执行得到数据集
  564. tags:
  565. - PostDataByNameForm
  566. /data/PostDatasByName:
  567. post:
  568. consumes:
  569. - application/json
  570. parameters:
  571. - description: sqlname
  572. in: query
  573. name: sqlname
  574. required: true
  575. type: string
  576. - description: offset
  577. in: query
  578. name: offset
  579. required: true
  580. type: integer
  581. - description: pagecount
  582. in: query
  583. name: pagecount
  584. required: true
  585. type: integer
  586. - description: returntype
  587. in: query
  588. name: returntype
  589. required: true
  590. type: string
  591. produces:
  592. - application/json
  593. responses:
  594. "200":
  595. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  596. schema:
  597. type: string
  598. "400":
  599. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  600. schema:
  601. type: string
  602. "404":
  603. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  604. schema:
  605. type: string
  606. summary: 根据APISQL表中SQL执行得到数据集
  607. tags:
  608. - PostDatasByName
  609. /data/getdata:
  610. post:
  611. consumes:
  612. - application/json
  613. parameters:
  614. - description: sql
  615. in: query
  616. name: sql
  617. required: true
  618. type: string
  619. produces:
  620. - application/json
  621. responses:
  622. "200":
  623. description: '{ "code": 200, "data": {}, "msg": "ok" }'
  624. schema:
  625. type: string
  626. "400":
  627. description: '{"code":400, "data":null,"msg":"请求参数错误"}'
  628. schema:
  629. type: string
  630. "404":
  631. description: '{ "code": 404, "data":null,"msg":"请求参数错误"}'
  632. schema:
  633. type: string
  634. summary: 根据SQL执行得到数据集
  635. tags:
  636. - getData
  637. swagger: "2.0"