swagger.json 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "kptyun_service",
  5. "title": "科湃腾Go语言后台API",
  6. "contact": {
  7. "name": "朱红宾",
  8. "url": "https://www.dairyinfo.com.cn",
  9. "email": "kptzhu@163.com"
  10. },
  11. "license": {},
  12. "version": "1.1.2"
  13. },
  14. "basePath": "/",
  15. "paths": {
  16. "/auth": {
  17. "post": {
  18. "consumes": [
  19. "application/json"
  20. ],
  21. "produces": [
  22. "application/json"
  23. ],
  24. "tags": [
  25. "auth"
  26. ],
  27. "summary": "获取登录token 信息",
  28. "parameters": [
  29. {
  30. "type": "string",
  31. "description": "admin",
  32. "name": "username",
  33. "in": "formData",
  34. "required": true
  35. },
  36. {
  37. "type": "string",
  38. "description": "123456",
  39. "name": "password",
  40. "in": "formData",
  41. "required": true
  42. }
  43. ],
  44. "responses": {
  45. "200": {
  46. "description": "{ \"code\": 200e, \"data\": { \"token\": \"xxx\" }, \"msg\": \"ok\" }",
  47. "schema": {
  48. "type": "string"
  49. }
  50. },
  51. "400": {
  52. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  53. "schema": {
  54. "type": "string"
  55. }
  56. },
  57. "404": {
  58. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  59. "schema": {
  60. "type": "string"
  61. }
  62. }
  63. }
  64. }
  65. },
  66. "/authdata/GetRoleMenus": {
  67. "get": {
  68. "consumes": [
  69. "application/json"
  70. ],
  71. "produces": [
  72. "application/json"
  73. ],
  74. "tags": [
  75. "menu"
  76. ],
  77. "summary": "递归获取所有",
  78. "parameters": [
  79. {
  80. "type": "string",
  81. "description": "Ton",
  82. "name": "Ton",
  83. "in": "query",
  84. "required": true
  85. }
  86. ],
  87. "responses": {
  88. "200": {
  89. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  90. "schema": {
  91. "type": "string"
  92. }
  93. }
  94. }
  95. }
  96. },
  97. "/authdata/menus": {
  98. "get": {
  99. "consumes": [
  100. "application/json"
  101. ],
  102. "produces": [
  103. "application/json"
  104. ],
  105. "tags": [
  106. "menu"
  107. ],
  108. "summary": "获取所有菜单",
  109. "parameters": [
  110. {
  111. "type": "string",
  112. "description": "Ton",
  113. "name": "Ton",
  114. "in": "query",
  115. "required": true
  116. }
  117. ],
  118. "responses": {
  119. "200": {
  120. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  121. "schema": {
  122. "type": "string"
  123. }
  124. }
  125. }
  126. },
  127. "post": {
  128. "consumes": [
  129. "application/json"
  130. ],
  131. "produces": [
  132. "application/json"
  133. ],
  134. "tags": [
  135. "menu"
  136. ],
  137. "summary": "增加菜单",
  138. "parameters": [
  139. {
  140. "type": "string",
  141. "description": "name",
  142. "name": "name",
  143. "in": "query",
  144. "required": true
  145. },
  146. {
  147. "type": "string",
  148. "description": "path",
  149. "name": "path",
  150. "in": "query",
  151. "required": true
  152. }
  153. ],
  154. "responses": {
  155. "200": {
  156. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  157. "schema": {
  158. "type": "string"
  159. }
  160. }
  161. }
  162. }
  163. },
  164. "/authdata/menus/": {
  165. "get": {
  166. "consumes": [
  167. "application/json"
  168. ],
  169. "produces": [
  170. "application/json"
  171. ],
  172. "tags": [
  173. "menu"
  174. ],
  175. "summary": "获取单个菜单",
  176. "parameters": [
  177. {
  178. "type": "string",
  179. "description": "id",
  180. "name": "id",
  181. "in": "path",
  182. "required": true
  183. }
  184. ],
  185. "responses": {
  186. "200": {
  187. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  188. "schema": {
  189. "type": "string"
  190. }
  191. }
  192. }
  193. },
  194. "put": {
  195. "consumes": [
  196. "application/json"
  197. ],
  198. "produces": [
  199. "application/json"
  200. ],
  201. "tags": [
  202. "menu"
  203. ],
  204. "summary": "更新菜单",
  205. "parameters": [
  206. {
  207. "type": "string",
  208. "description": "id",
  209. "name": "id",
  210. "in": "path",
  211. "required": true
  212. },
  213. {
  214. "type": "string",
  215. "description": "name",
  216. "name": "name",
  217. "in": "query",
  218. "required": true
  219. },
  220. {
  221. "type": "string",
  222. "description": "path",
  223. "name": "path",
  224. "in": "query",
  225. "required": true
  226. },
  227. {
  228. "type": "string",
  229. "description": "method",
  230. "name": "method",
  231. "in": "query",
  232. "required": true
  233. }
  234. ],
  235. "responses": {
  236. "200": {
  237. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  238. "schema": {
  239. "type": "string"
  240. }
  241. }
  242. }
  243. },
  244. "delete": {
  245. "consumes": [
  246. "application/json"
  247. ],
  248. "produces": [
  249. "application/json"
  250. ],
  251. "tags": [
  252. "menu"
  253. ],
  254. "summary": "删除菜单",
  255. "parameters": [
  256. {
  257. "type": "string",
  258. "description": "id",
  259. "name": "id",
  260. "in": "path",
  261. "required": true
  262. }
  263. ],
  264. "responses": {
  265. "200": {
  266. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  267. "schema": {
  268. "type": "string"
  269. }
  270. }
  271. }
  272. }
  273. },
  274. "/authdata/roles": {
  275. "get": {
  276. "consumes": [
  277. "application/json"
  278. ],
  279. "produces": [
  280. "application/json"
  281. ],
  282. "tags": [
  283. "role"
  284. ],
  285. "summary": "获取所有角色",
  286. "responses": {
  287. "200": {
  288. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  289. "schema": {
  290. "type": "string"
  291. }
  292. }
  293. }
  294. },
  295. "post": {
  296. "consumes": [
  297. "application/json"
  298. ],
  299. "produces": [
  300. "application/json"
  301. ],
  302. "tags": [
  303. "role"
  304. ],
  305. "summary": "增加角色",
  306. "parameters": [
  307. {
  308. "type": "string",
  309. "description": "name",
  310. "name": "name",
  311. "in": "query",
  312. "required": true
  313. },
  314. {
  315. "type": "string",
  316. "description": "menu_id",
  317. "name": "menu_id",
  318. "in": "query",
  319. "required": true
  320. }
  321. ],
  322. "responses": {
  323. "200": {
  324. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  325. "schema": {
  326. "type": "string"
  327. }
  328. }
  329. }
  330. }
  331. },
  332. "/authdata/roles/": {
  333. "get": {
  334. "consumes": [
  335. "application/json"
  336. ],
  337. "produces": [
  338. "application/json"
  339. ],
  340. "tags": [
  341. "role"
  342. ],
  343. "summary": "获取单个角色",
  344. "parameters": [
  345. {
  346. "type": "string",
  347. "description": "id",
  348. "name": "id",
  349. "in": "path",
  350. "required": true
  351. }
  352. ],
  353. "responses": {
  354. "200": {
  355. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  356. "schema": {
  357. "type": "string"
  358. }
  359. }
  360. }
  361. },
  362. "put": {
  363. "consumes": [
  364. "application/json"
  365. ],
  366. "produces": [
  367. "application/json"
  368. ],
  369. "tags": [
  370. "role"
  371. ],
  372. "summary": "更新角色",
  373. "parameters": [
  374. {
  375. "type": "string",
  376. "description": "id",
  377. "name": "id",
  378. "in": "path",
  379. "required": true
  380. },
  381. {
  382. "type": "string",
  383. "description": "name",
  384. "name": "name",
  385. "in": "query",
  386. "required": true
  387. },
  388. {
  389. "type": "string",
  390. "description": "menu_id",
  391. "name": "menu_id",
  392. "in": "query",
  393. "required": true
  394. }
  395. ],
  396. "responses": {
  397. "200": {
  398. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  399. "schema": {
  400. "type": "string"
  401. }
  402. }
  403. }
  404. },
  405. "delete": {
  406. "consumes": [
  407. "application/json"
  408. ],
  409. "produces": [
  410. "application/json"
  411. ],
  412. "tags": [
  413. "role"
  414. ],
  415. "summary": "删除角色",
  416. "parameters": [
  417. {
  418. "type": "string",
  419. "description": "id",
  420. "name": "id",
  421. "in": "path",
  422. "required": true
  423. }
  424. ],
  425. "responses": {
  426. "200": {
  427. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  428. "schema": {
  429. "type": "string"
  430. }
  431. }
  432. }
  433. }
  434. },
  435. "/authdata/userinfo": {
  436. "get": {
  437. "consumes": [
  438. "application/json"
  439. ],
  440. "produces": [
  441. "application/json"
  442. ],
  443. "tags": [
  444. "users"
  445. ],
  446. "summary": "获取单个用户信息",
  447. "parameters": [
  448. {
  449. "type": "integer",
  450. "description": "iddd",
  451. "name": "id",
  452. "in": "path",
  453. "required": true
  454. }
  455. ],
  456. "responses": {
  457. "200": {
  458. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  459. "schema": {
  460. "type": "string"
  461. }
  462. }
  463. }
  464. }
  465. },
  466. "/authdata/users": {
  467. "get": {
  468. "consumes": [
  469. "application/json"
  470. ],
  471. "produces": [
  472. "application/json"
  473. ],
  474. "tags": [
  475. "users"
  476. ],
  477. "summary": "获取所有用户",
  478. "parameters": [
  479. {
  480. "type": "string",
  481. "description": "username",
  482. "name": "username",
  483. "in": "path"
  484. }
  485. ],
  486. "responses": {
  487. "200": {
  488. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  489. "schema": {
  490. "type": "string"
  491. }
  492. }
  493. }
  494. },
  495. "post": {
  496. "consumes": [
  497. "application/json"
  498. ],
  499. "produces": [
  500. "application/json"
  501. ],
  502. "tags": [
  503. "users"
  504. ],
  505. "summary": "增加用户1",
  506. "parameters": [
  507. {
  508. "type": "string",
  509. "description": "username",
  510. "name": "username",
  511. "in": "query",
  512. "required": true
  513. },
  514. {
  515. "type": "string",
  516. "description": "password",
  517. "name": "password",
  518. "in": "query",
  519. "required": true
  520. },
  521. {
  522. "type": "integer",
  523. "description": "role_id",
  524. "name": "role_id",
  525. "in": "path"
  526. }
  527. ],
  528. "responses": {
  529. "200": {
  530. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  531. "schema": {
  532. "type": "string"
  533. }
  534. }
  535. }
  536. }
  537. },
  538. "/authdata/users/": {
  539. "get": {
  540. "consumes": [
  541. "application/json"
  542. ],
  543. "produces": [
  544. "application/json"
  545. ],
  546. "tags": [
  547. "users"
  548. ],
  549. "summary": "获取单个用户信息",
  550. "parameters": [
  551. {
  552. "type": "integer",
  553. "description": "id",
  554. "name": "id",
  555. "in": "path",
  556. "required": true
  557. }
  558. ],
  559. "responses": {
  560. "200": {
  561. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  562. "schema": {
  563. "type": "string"
  564. }
  565. }
  566. }
  567. },
  568. "put": {
  569. "consumes": [
  570. "application/json"
  571. ],
  572. "produces": [
  573. "application/json"
  574. ],
  575. "tags": [
  576. "users"
  577. ],
  578. "summary": "更新用户",
  579. "parameters": [
  580. {
  581. "type": "string",
  582. "description": "username",
  583. "name": "username",
  584. "in": "query",
  585. "required": true
  586. },
  587. {
  588. "type": "string",
  589. "description": "password",
  590. "name": "password",
  591. "in": "query",
  592. "required": true
  593. },
  594. {
  595. "type": "integer",
  596. "description": "role_id",
  597. "name": "role_id",
  598. "in": "query"
  599. }
  600. ],
  601. "responses": {
  602. "200": {
  603. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  604. "schema": {
  605. "type": "string"
  606. }
  607. }
  608. }
  609. },
  610. "delete": {
  611. "consumes": [
  612. "application/json"
  613. ],
  614. "produces": [
  615. "application/json"
  616. ],
  617. "tags": [
  618. "users"
  619. ],
  620. "summary": "删除用户",
  621. "parameters": [
  622. {
  623. "type": "integer",
  624. "description": "id",
  625. "name": "id",
  626. "in": "path",
  627. "required": true
  628. }
  629. ],
  630. "responses": {
  631. "200": {
  632. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  633. "schema": {
  634. "type": "string"
  635. }
  636. }
  637. }
  638. }
  639. },
  640. "/data/GetDataByNameForm": {
  641. "post": {
  642. "consumes": [
  643. "application/json"
  644. ],
  645. "produces": [
  646. "application/json"
  647. ],
  648. "tags": [
  649. "GetDataByNameForm"
  650. ],
  651. "summary": "根据APISQL表中SQL执行得到数据集",
  652. "parameters": [
  653. {
  654. "description": "sqlname",
  655. "name": "sqlname",
  656. "in": "body",
  657. "required": true,
  658. "schema": {
  659. "type": "object",
  660. "$ref": "#/definitions/json"
  661. }
  662. },
  663. {
  664. "type": "integer",
  665. "description": "offset",
  666. "name": "offset",
  667. "in": "query",
  668. "required": true
  669. },
  670. {
  671. "type": "integer",
  672. "description": "pagecount",
  673. "name": "pagecount",
  674. "in": "query",
  675. "required": true
  676. },
  677. {
  678. "type": "string",
  679. "description": "returntype",
  680. "name": "returntype",
  681. "in": "query",
  682. "required": true
  683. },
  684. {
  685. "type": "json",
  686. "description": "ss",
  687. "name": "s",
  688. "in": "formData",
  689. "required": true
  690. }
  691. ],
  692. "responses": {
  693. "200": {
  694. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  695. "schema": {
  696. "type": "string"
  697. }
  698. },
  699. "400": {
  700. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  701. "schema": {
  702. "type": "string"
  703. }
  704. },
  705. "404": {
  706. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  707. "schema": {
  708. "type": "string"
  709. }
  710. }
  711. }
  712. }
  713. },
  714. "/data/GetDataByNames": {
  715. "post": {
  716. "consumes": [
  717. "application/json"
  718. ],
  719. "produces": [
  720. "application/json"
  721. ],
  722. "tags": [
  723. "GetDataByNames"
  724. ],
  725. "summary": "根据APISQL表中SQL执行得到数据集",
  726. "parameters": [
  727. {
  728. "type": "integer",
  729. "description": "offset",
  730. "name": "offset",
  731. "in": "query",
  732. "required": true
  733. },
  734. {
  735. "type": "integer",
  736. "description": "pagecount",
  737. "name": "pagecount",
  738. "in": "query",
  739. "required": true
  740. },
  741. {
  742. "type": "string",
  743. "description": "returntype",
  744. "name": "returntype",
  745. "in": "query",
  746. "required": true
  747. }
  748. ],
  749. "responses": {
  750. "200": {
  751. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  752. "schema": {
  753. "type": "string"
  754. }
  755. },
  756. "400": {
  757. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  758. "schema": {
  759. "type": "string"
  760. }
  761. },
  762. "404": {
  763. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  764. "schema": {
  765. "type": "string"
  766. }
  767. }
  768. }
  769. }
  770. },
  771. "/data/ImportExcel": {
  772. "post": {
  773. "consumes": [
  774. "application/json"
  775. ],
  776. "produces": [
  777. "application/json"
  778. ],
  779. "tags": [
  780. "ImportExcel"
  781. ],
  782. "summary": "导入excel文件到数据库,excel第一行作为参数",
  783. "parameters": [
  784. {
  785. "type": "string",
  786. "description": "文件名",
  787. "name": "file",
  788. "in": "query",
  789. "required": true
  790. },
  791. {
  792. "type": "string",
  793. "description": "执行sql的名字",
  794. "name": "name",
  795. "in": "header",
  796. "required": true
  797. }
  798. ],
  799. "responses": {
  800. "200": {
  801. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  802. "schema": {
  803. "type": "string"
  804. }
  805. },
  806. "400": {
  807. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  808. "schema": {
  809. "type": "string"
  810. }
  811. },
  812. "404": {
  813. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  814. "schema": {
  815. "type": "string"
  816. }
  817. }
  818. }
  819. }
  820. },
  821. "/data/PostDataByName": {
  822. "post": {
  823. "consumes": [
  824. "application/json"
  825. ],
  826. "produces": [
  827. "application/json"
  828. ],
  829. "tags": [
  830. "PostDataByName"
  831. ],
  832. "summary": "根据APISQL表中SQL执行得到数据集",
  833. "parameters": [
  834. {
  835. "type": "string",
  836. "description": "sqlname",
  837. "name": "sqlname",
  838. "in": "query",
  839. "required": true
  840. },
  841. {
  842. "type": "integer",
  843. "description": "offset",
  844. "name": "offset",
  845. "in": "query",
  846. "required": true
  847. },
  848. {
  849. "type": "integer",
  850. "description": "pagecount",
  851. "name": "pagecount",
  852. "in": "query",
  853. "required": true
  854. },
  855. {
  856. "type": "string",
  857. "description": "returntype",
  858. "name": "returntype",
  859. "in": "query",
  860. "required": true
  861. }
  862. ],
  863. "responses": {
  864. "200": {
  865. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  866. "schema": {
  867. "type": "string"
  868. }
  869. },
  870. "400": {
  871. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  872. "schema": {
  873. "type": "string"
  874. }
  875. },
  876. "404": {
  877. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  878. "schema": {
  879. "type": "string"
  880. }
  881. }
  882. }
  883. }
  884. },
  885. "/data/PostDataByNameForm": {
  886. "post": {
  887. "consumes": [
  888. "application/json"
  889. ],
  890. "produces": [
  891. "application/json"
  892. ],
  893. "tags": [
  894. "PostDataByNameForm"
  895. ],
  896. "summary": "根据APISQL表中SQL执行得到数据集",
  897. "parameters": [
  898. {
  899. "type": "string",
  900. "description": "sqlname",
  901. "name": "sqlname",
  902. "in": "query",
  903. "required": true
  904. },
  905. {
  906. "type": "integer",
  907. "description": "offset",
  908. "name": "offset",
  909. "in": "query",
  910. "required": true
  911. },
  912. {
  913. "type": "integer",
  914. "description": "pagecount",
  915. "name": "pagecount",
  916. "in": "query",
  917. "required": true
  918. },
  919. {
  920. "type": "string",
  921. "description": "returntype",
  922. "name": "returntype",
  923. "in": "query",
  924. "required": true
  925. }
  926. ],
  927. "responses": {
  928. "200": {
  929. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  930. "schema": {
  931. "type": "string"
  932. }
  933. },
  934. "400": {
  935. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误朱红彬彬\"}",
  936. "schema": {
  937. "type": "string"
  938. }
  939. },
  940. "404": {
  941. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  942. "schema": {
  943. "type": "string"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "/data/PostDatasByName": {
  950. "post": {
  951. "consumes": [
  952. "application/json"
  953. ],
  954. "produces": [
  955. "application/json"
  956. ],
  957. "tags": [
  958. "PostDatasByName"
  959. ],
  960. "summary": "根据APISQL表中SQL执行得到数据集",
  961. "parameters": [
  962. {
  963. "type": "string",
  964. "description": "sqlname",
  965. "name": "sqlname",
  966. "in": "query",
  967. "required": true
  968. },
  969. {
  970. "type": "integer",
  971. "description": "offset",
  972. "name": "offset",
  973. "in": "query",
  974. "required": true
  975. },
  976. {
  977. "type": "integer",
  978. "description": "pagecount",
  979. "name": "pagecount",
  980. "in": "query",
  981. "required": true
  982. },
  983. {
  984. "type": "string",
  985. "description": "returntype",
  986. "name": "returntype",
  987. "in": "query",
  988. "required": true
  989. }
  990. ],
  991. "responses": {
  992. "200": {
  993. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  994. "schema": {
  995. "type": "string"
  996. }
  997. },
  998. "400": {
  999. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  1000. "schema": {
  1001. "type": "string"
  1002. }
  1003. },
  1004. "404": {
  1005. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  1006. "schema": {
  1007. "type": "string"
  1008. }
  1009. }
  1010. }
  1011. }
  1012. },
  1013. "/data/getdata": {
  1014. "post": {
  1015. "consumes": [
  1016. "application/json"
  1017. ],
  1018. "produces": [
  1019. "application/json"
  1020. ],
  1021. "tags": [
  1022. "getData"
  1023. ],
  1024. "summary": "根据SQL执行得到数据集",
  1025. "parameters": [
  1026. {
  1027. "type": "string",
  1028. "description": "sql",
  1029. "name": "sql",
  1030. "in": "query",
  1031. "required": true
  1032. }
  1033. ],
  1034. "responses": {
  1035. "200": {
  1036. "description": "{ \"code\": 200, \"data\": {}, \"msg\": \"ok\" }",
  1037. "schema": {
  1038. "type": "string"
  1039. }
  1040. },
  1041. "400": {
  1042. "description": "{\"code\":400, \"data\":null,\"msg\":\"请求参数错误\"}",
  1043. "schema": {
  1044. "type": "string"
  1045. }
  1046. },
  1047. "404": {
  1048. "description": "{ \"code\": 404, \"data\":null,\"msg\":\"请求参数错误\"}",
  1049. "schema": {
  1050. "type": "string"
  1051. }
  1052. }
  1053. }
  1054. }
  1055. }
  1056. }
  1057. }