swagger.json 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "swagger 接口文档",
  5. "contact": {},
  6. "license": {
  7. "name": "MIT",
  8. "url": "https://github.com/xinliangnote/go-gin-api/blob/master/LICENSE"
  9. },
  10. "version": "2.0"
  11. },
  12. "basePath": "/",
  13. "paths": {
  14. "/api/admin": {
  15. "get": {
  16. "security": [
  17. {
  18. "LoginToken": []
  19. }
  20. ],
  21. "description": "管理员列表",
  22. "consumes": [
  23. "application/x-www-form-urlencoded"
  24. ],
  25. "produces": [
  26. "application/json"
  27. ],
  28. "tags": [
  29. "API.admin"
  30. ],
  31. "summary": "管理员列表",
  32. "parameters": [
  33. {
  34. "type": "integer",
  35. "default": 1,
  36. "description": "第几页",
  37. "name": "page",
  38. "in": "query",
  39. "required": true
  40. },
  41. {
  42. "type": "integer",
  43. "default": 10,
  44. "description": "每页显示条数",
  45. "name": "page_size",
  46. "in": "query",
  47. "required": true
  48. },
  49. {
  50. "type": "string",
  51. "description": "用户名",
  52. "name": "username",
  53. "in": "query"
  54. },
  55. {
  56. "type": "string",
  57. "description": "昵称",
  58. "name": "nickname",
  59. "in": "query"
  60. },
  61. {
  62. "type": "string",
  63. "description": "手机号",
  64. "name": "mobile",
  65. "in": "query"
  66. }
  67. ],
  68. "responses": {
  69. "200": {
  70. "description": "OK",
  71. "schema": {
  72. "$ref": "#/definitions/admin.listResponse"
  73. }
  74. },
  75. "400": {
  76. "description": "Bad Request",
  77. "schema": {
  78. "$ref": "#/definitions/code.Failure"
  79. }
  80. }
  81. }
  82. },
  83. "post": {
  84. "security": [
  85. {
  86. "LoginToken": []
  87. }
  88. ],
  89. "description": "新增管理员",
  90. "consumes": [
  91. "application/x-www-form-urlencoded"
  92. ],
  93. "produces": [
  94. "application/json"
  95. ],
  96. "tags": [
  97. "API.admin"
  98. ],
  99. "summary": "新增管理员",
  100. "parameters": [
  101. {
  102. "type": "string",
  103. "description": "用户名",
  104. "name": "username",
  105. "in": "formData",
  106. "required": true
  107. },
  108. {
  109. "type": "string",
  110. "description": "昵称",
  111. "name": "nickname",
  112. "in": "formData",
  113. "required": true
  114. },
  115. {
  116. "type": "string",
  117. "description": "手机号",
  118. "name": "mobile",
  119. "in": "formData",
  120. "required": true
  121. },
  122. {
  123. "type": "string",
  124. "description": "MD5后的密码",
  125. "name": "password",
  126. "in": "formData",
  127. "required": true
  128. }
  129. ],
  130. "responses": {
  131. "200": {
  132. "description": "OK",
  133. "schema": {
  134. "$ref": "#/definitions/admin.createResponse"
  135. }
  136. },
  137. "400": {
  138. "description": "Bad Request",
  139. "schema": {
  140. "$ref": "#/definitions/code.Failure"
  141. }
  142. }
  143. }
  144. }
  145. },
  146. "/api/admin/info": {
  147. "get": {
  148. "security": [
  149. {
  150. "LoginToken": []
  151. }
  152. ],
  153. "description": "管理员详情",
  154. "consumes": [
  155. "application/x-www-form-urlencoded"
  156. ],
  157. "produces": [
  158. "application/json"
  159. ],
  160. "tags": [
  161. "API.admin"
  162. ],
  163. "summary": "管理员详情",
  164. "responses": {
  165. "200": {
  166. "description": "OK",
  167. "schema": {
  168. "$ref": "#/definitions/admin.detailResponse"
  169. }
  170. },
  171. "400": {
  172. "description": "Bad Request",
  173. "schema": {
  174. "$ref": "#/definitions/code.Failure"
  175. }
  176. }
  177. }
  178. }
  179. },
  180. "/api/admin/logout": {
  181. "post": {
  182. "security": [
  183. {
  184. "LoginToken": []
  185. }
  186. ],
  187. "description": "管理员登出",
  188. "consumes": [
  189. "application/x-www-form-urlencoded"
  190. ],
  191. "produces": [
  192. "application/json"
  193. ],
  194. "tags": [
  195. "API.admin"
  196. ],
  197. "summary": "管理员登出",
  198. "responses": {
  199. "200": {
  200. "description": "OK",
  201. "schema": {
  202. "$ref": "#/definitions/admin.logoutResponse"
  203. }
  204. },
  205. "400": {
  206. "description": "Bad Request",
  207. "schema": {
  208. "$ref": "#/definitions/code.Failure"
  209. }
  210. }
  211. }
  212. }
  213. },
  214. "/api/admin/menu": {
  215. "post": {
  216. "security": [
  217. {
  218. "LoginToken": []
  219. }
  220. ],
  221. "description": "提交菜单授权",
  222. "consumes": [
  223. "application/x-www-form-urlencoded"
  224. ],
  225. "produces": [
  226. "application/json"
  227. ],
  228. "tags": [
  229. "API.admin"
  230. ],
  231. "summary": "提交菜单授权",
  232. "parameters": [
  233. {
  234. "type": "string",
  235. "description": "Hashid",
  236. "name": "id",
  237. "in": "formData",
  238. "required": true
  239. },
  240. {
  241. "type": "string",
  242. "description": "功能权限ID,多个用,分割",
  243. "name": "actions",
  244. "in": "formData",
  245. "required": true
  246. }
  247. ],
  248. "responses": {
  249. "200": {
  250. "description": "OK",
  251. "schema": {
  252. "$ref": "#/definitions/admin.createResponse"
  253. }
  254. },
  255. "400": {
  256. "description": "Bad Request",
  257. "schema": {
  258. "$ref": "#/definitions/code.Failure"
  259. }
  260. }
  261. }
  262. }
  263. },
  264. "/api/admin/menu/{id}": {
  265. "get": {
  266. "security": [
  267. {
  268. "LoginToken": []
  269. }
  270. ],
  271. "description": "菜单授权列表",
  272. "consumes": [
  273. "application/x-www-form-urlencoded"
  274. ],
  275. "produces": [
  276. "application/json"
  277. ],
  278. "tags": [
  279. "API.admin"
  280. ],
  281. "summary": "菜单授权列表",
  282. "parameters": [
  283. {
  284. "type": "string",
  285. "description": "hashId",
  286. "name": "id",
  287. "in": "path",
  288. "required": true
  289. }
  290. ],
  291. "responses": {
  292. "200": {
  293. "description": "OK",
  294. "schema": {
  295. "$ref": "#/definitions/admin.listAdminMenuResponse"
  296. }
  297. },
  298. "400": {
  299. "description": "Bad Request",
  300. "schema": {
  301. "$ref": "#/definitions/code.Failure"
  302. }
  303. }
  304. }
  305. }
  306. },
  307. "/api/admin/modify_password": {
  308. "patch": {
  309. "security": [
  310. {
  311. "LoginToken": []
  312. }
  313. ],
  314. "description": "修改密码",
  315. "consumes": [
  316. "application/x-www-form-urlencoded"
  317. ],
  318. "produces": [
  319. "application/json"
  320. ],
  321. "tags": [
  322. "API.admin"
  323. ],
  324. "summary": "修改密码",
  325. "parameters": [
  326. {
  327. "type": "string",
  328. "description": "旧密码",
  329. "name": "old_password",
  330. "in": "formData",
  331. "required": true
  332. },
  333. {
  334. "type": "string",
  335. "description": "新密码",
  336. "name": "new_password",
  337. "in": "formData",
  338. "required": true
  339. }
  340. ],
  341. "responses": {
  342. "200": {
  343. "description": "OK",
  344. "schema": {
  345. "$ref": "#/definitions/admin.modifyPasswordResponse"
  346. }
  347. },
  348. "400": {
  349. "description": "Bad Request",
  350. "schema": {
  351. "$ref": "#/definitions/code.Failure"
  352. }
  353. }
  354. }
  355. }
  356. },
  357. "/api/admin/modify_personal_info": {
  358. "patch": {
  359. "security": [
  360. {
  361. "LoginToken": []
  362. }
  363. ],
  364. "description": "修改个人信息",
  365. "consumes": [
  366. "application/x-www-form-urlencoded"
  367. ],
  368. "produces": [
  369. "application/json"
  370. ],
  371. "tags": [
  372. "API.admin"
  373. ],
  374. "summary": "修改个人信息",
  375. "parameters": [
  376. {
  377. "type": "string",
  378. "description": "昵称",
  379. "name": "nickname",
  380. "in": "formData",
  381. "required": true
  382. },
  383. {
  384. "type": "string",
  385. "description": "手机号",
  386. "name": "mobile",
  387. "in": "formData",
  388. "required": true
  389. }
  390. ],
  391. "responses": {
  392. "200": {
  393. "description": "OK",
  394. "schema": {
  395. "$ref": "#/definitions/admin.modifyPersonalInfoResponse"
  396. }
  397. },
  398. "400": {
  399. "description": "Bad Request",
  400. "schema": {
  401. "$ref": "#/definitions/code.Failure"
  402. }
  403. }
  404. }
  405. }
  406. },
  407. "/api/admin/offline": {
  408. "patch": {
  409. "security": [
  410. {
  411. "LoginToken": []
  412. }
  413. ],
  414. "description": "下线管理员",
  415. "consumes": [
  416. "application/x-www-form-urlencoded"
  417. ],
  418. "produces": [
  419. "application/json"
  420. ],
  421. "tags": [
  422. "API.admin"
  423. ],
  424. "summary": "下线管理员",
  425. "parameters": [
  426. {
  427. "type": "string",
  428. "description": "Hashid",
  429. "name": "id",
  430. "in": "formData",
  431. "required": true
  432. }
  433. ],
  434. "responses": {
  435. "200": {
  436. "description": "OK",
  437. "schema": {
  438. "$ref": "#/definitions/admin.offlineResponse"
  439. }
  440. },
  441. "400": {
  442. "description": "Bad Request",
  443. "schema": {
  444. "$ref": "#/definitions/code.Failure"
  445. }
  446. }
  447. }
  448. }
  449. },
  450. "/api/admin/reset_password/{id}": {
  451. "patch": {
  452. "security": [
  453. {
  454. "LoginToken": []
  455. }
  456. ],
  457. "description": "重置密码",
  458. "consumes": [
  459. "application/json"
  460. ],
  461. "produces": [
  462. "application/json"
  463. ],
  464. "tags": [
  465. "API.admin"
  466. ],
  467. "summary": "重置密码",
  468. "parameters": [
  469. {
  470. "type": "string",
  471. "description": "hashId",
  472. "name": "id",
  473. "in": "path",
  474. "required": true
  475. }
  476. ],
  477. "responses": {
  478. "200": {
  479. "description": "OK",
  480. "schema": {
  481. "$ref": "#/definitions/admin.resetPasswordResponse"
  482. }
  483. },
  484. "400": {
  485. "description": "Bad Request",
  486. "schema": {
  487. "$ref": "#/definitions/code.Failure"
  488. }
  489. }
  490. }
  491. }
  492. },
  493. "/api/admin/used": {
  494. "patch": {
  495. "security": [
  496. {
  497. "LoginToken": []
  498. }
  499. ],
  500. "description": "更新管理员为启用/禁用",
  501. "consumes": [
  502. "application/x-www-form-urlencoded"
  503. ],
  504. "produces": [
  505. "application/json"
  506. ],
  507. "tags": [
  508. "API.admin"
  509. ],
  510. "summary": "更新管理员为启用/禁用",
  511. "parameters": [
  512. {
  513. "type": "string",
  514. "description": "Hashid",
  515. "name": "id",
  516. "in": "formData",
  517. "required": true
  518. },
  519. {
  520. "type": "integer",
  521. "description": "是否启用 1:是 -1:否",
  522. "name": "used",
  523. "in": "formData",
  524. "required": true
  525. }
  526. ],
  527. "responses": {
  528. "200": {
  529. "description": "OK",
  530. "schema": {
  531. "$ref": "#/definitions/admin.updateUsedResponse"
  532. }
  533. },
  534. "400": {
  535. "description": "Bad Request",
  536. "schema": {
  537. "$ref": "#/definitions/code.Failure"
  538. }
  539. }
  540. }
  541. }
  542. },
  543. "/api/admin/{id}": {
  544. "delete": {
  545. "security": [
  546. {
  547. "LoginToken": []
  548. }
  549. ],
  550. "description": "删除管理员",
  551. "consumes": [
  552. "application/json"
  553. ],
  554. "produces": [
  555. "application/json"
  556. ],
  557. "tags": [
  558. "API.admin"
  559. ],
  560. "summary": "删除管理员",
  561. "parameters": [
  562. {
  563. "type": "string",
  564. "description": "hashId",
  565. "name": "id",
  566. "in": "path",
  567. "required": true
  568. }
  569. ],
  570. "responses": {
  571. "200": {
  572. "description": "OK",
  573. "schema": {
  574. "$ref": "#/definitions/admin.deleteResponse"
  575. }
  576. },
  577. "400": {
  578. "description": "Bad Request",
  579. "schema": {
  580. "$ref": "#/definitions/code.Failure"
  581. }
  582. }
  583. }
  584. }
  585. },
  586. "/api/authorized": {
  587. "get": {
  588. "security": [
  589. {
  590. "LoginToken": []
  591. }
  592. ],
  593. "description": "调用方列表",
  594. "consumes": [
  595. "application/x-www-form-urlencoded"
  596. ],
  597. "produces": [
  598. "application/json"
  599. ],
  600. "tags": [
  601. "API.authorized"
  602. ],
  603. "summary": "调用方列表",
  604. "parameters": [
  605. {
  606. "type": "integer",
  607. "default": 1,
  608. "description": "第几页",
  609. "name": "page",
  610. "in": "query",
  611. "required": true
  612. },
  613. {
  614. "type": "integer",
  615. "default": 10,
  616. "description": "每页显示条数",
  617. "name": "page_size",
  618. "in": "query",
  619. "required": true
  620. },
  621. {
  622. "type": "string",
  623. "description": "调用方key",
  624. "name": "business_key",
  625. "in": "query"
  626. },
  627. {
  628. "type": "string",
  629. "description": "调用方secret",
  630. "name": "business_secret",
  631. "in": "query"
  632. },
  633. {
  634. "type": "string",
  635. "description": "调用方对接人",
  636. "name": "business_developer",
  637. "in": "query"
  638. },
  639. {
  640. "type": "string",
  641. "description": "备注",
  642. "name": "remark",
  643. "in": "path"
  644. }
  645. ],
  646. "responses": {
  647. "200": {
  648. "description": "OK",
  649. "schema": {
  650. "$ref": "#/definitions/authorized.listResponse"
  651. }
  652. },
  653. "400": {
  654. "description": "Bad Request",
  655. "schema": {
  656. "$ref": "#/definitions/code.Failure"
  657. }
  658. }
  659. }
  660. },
  661. "post": {
  662. "security": [
  663. {
  664. "LoginToken": []
  665. }
  666. ],
  667. "description": "新增调用方",
  668. "consumes": [
  669. "application/x-www-form-urlencoded"
  670. ],
  671. "produces": [
  672. "application/json"
  673. ],
  674. "tags": [
  675. "API.authorized"
  676. ],
  677. "summary": "新增调用方",
  678. "parameters": [
  679. {
  680. "type": "string",
  681. "description": "调用方key",
  682. "name": "business_key",
  683. "in": "formData",
  684. "required": true
  685. },
  686. {
  687. "type": "string",
  688. "description": "调用方对接人",
  689. "name": "business_developer",
  690. "in": "formData",
  691. "required": true
  692. },
  693. {
  694. "type": "string",
  695. "description": "备注",
  696. "name": "remark",
  697. "in": "formData",
  698. "required": true
  699. }
  700. ],
  701. "responses": {
  702. "200": {
  703. "description": "OK",
  704. "schema": {
  705. "$ref": "#/definitions/authorized.createResponse"
  706. }
  707. },
  708. "400": {
  709. "description": "Bad Request",
  710. "schema": {
  711. "$ref": "#/definitions/code.Failure"
  712. }
  713. }
  714. }
  715. }
  716. },
  717. "/api/authorized/used": {
  718. "patch": {
  719. "security": [
  720. {
  721. "LoginToken": []
  722. }
  723. ],
  724. "description": "更新调用方为启用/禁用",
  725. "consumes": [
  726. "application/x-www-form-urlencoded"
  727. ],
  728. "produces": [
  729. "application/json"
  730. ],
  731. "tags": [
  732. "API.authorized"
  733. ],
  734. "summary": "更新调用方为启用/禁用",
  735. "parameters": [
  736. {
  737. "type": "string",
  738. "description": "hashID",
  739. "name": "id",
  740. "in": "formData",
  741. "required": true
  742. },
  743. {
  744. "type": "integer",
  745. "description": "是否启用 1:是 -1:否",
  746. "name": "used",
  747. "in": "formData",
  748. "required": true
  749. }
  750. ],
  751. "responses": {
  752. "200": {
  753. "description": "OK",
  754. "schema": {
  755. "$ref": "#/definitions/authorized.updateUsedResponse"
  756. }
  757. },
  758. "400": {
  759. "description": "Bad Request",
  760. "schema": {
  761. "$ref": "#/definitions/code.Failure"
  762. }
  763. }
  764. }
  765. }
  766. },
  767. "/api/authorized/{id}": {
  768. "delete": {
  769. "security": [
  770. {
  771. "LoginToken": []
  772. }
  773. ],
  774. "description": "删除调用方",
  775. "consumes": [
  776. "application/json"
  777. ],
  778. "produces": [
  779. "application/json"
  780. ],
  781. "tags": [
  782. "API.authorized"
  783. ],
  784. "summary": "删除调用方",
  785. "parameters": [
  786. {
  787. "type": "string",
  788. "description": "hashId",
  789. "name": "id",
  790. "in": "path",
  791. "required": true
  792. }
  793. ],
  794. "responses": {
  795. "200": {
  796. "description": "OK",
  797. "schema": {
  798. "$ref": "#/definitions/authorized.deleteResponse"
  799. }
  800. },
  801. "400": {
  802. "description": "Bad Request",
  803. "schema": {
  804. "$ref": "#/definitions/code.Failure"
  805. }
  806. }
  807. }
  808. }
  809. },
  810. "/api/authorized_api": {
  811. "get": {
  812. "security": [
  813. {
  814. "LoginToken": []
  815. }
  816. ],
  817. "description": "调用方接口地址列表",
  818. "consumes": [
  819. "application/x-www-form-urlencoded"
  820. ],
  821. "produces": [
  822. "application/json"
  823. ],
  824. "tags": [
  825. "API.authorized"
  826. ],
  827. "summary": "调用方接口地址列表",
  828. "parameters": [
  829. {
  830. "type": "string",
  831. "description": "hashID",
  832. "name": "id",
  833. "in": "query",
  834. "required": true
  835. }
  836. ],
  837. "responses": {
  838. "200": {
  839. "description": "OK",
  840. "schema": {
  841. "$ref": "#/definitions/authorized.listAPIResponse"
  842. }
  843. },
  844. "400": {
  845. "description": "Bad Request",
  846. "schema": {
  847. "$ref": "#/definitions/code.Failure"
  848. }
  849. }
  850. }
  851. },
  852. "post": {
  853. "security": [
  854. {
  855. "LoginToken": []
  856. }
  857. ],
  858. "description": "授权调用方接口地址",
  859. "consumes": [
  860. "application/x-www-form-urlencoded"
  861. ],
  862. "produces": [
  863. "application/json"
  864. ],
  865. "tags": [
  866. "API.authorized"
  867. ],
  868. "summary": "授权调用方接口地址",
  869. "parameters": [
  870. {
  871. "type": "string",
  872. "description": "HashID",
  873. "name": "id",
  874. "in": "formData",
  875. "required": true
  876. },
  877. {
  878. "type": "string",
  879. "description": "请求方法",
  880. "name": "method",
  881. "in": "formData",
  882. "required": true
  883. },
  884. {
  885. "type": "string",
  886. "description": "请求地址",
  887. "name": "api",
  888. "in": "formData",
  889. "required": true
  890. }
  891. ],
  892. "responses": {
  893. "200": {
  894. "description": "OK",
  895. "schema": {
  896. "$ref": "#/definitions/authorized.createAPIResponse"
  897. }
  898. },
  899. "400": {
  900. "description": "Bad Request",
  901. "schema": {
  902. "$ref": "#/definitions/code.Failure"
  903. }
  904. }
  905. }
  906. }
  907. },
  908. "/api/authorized_api/{id}": {
  909. "delete": {
  910. "security": [
  911. {
  912. "LoginToken": []
  913. }
  914. ],
  915. "description": "删除调用方接口地址",
  916. "consumes": [
  917. "application/json"
  918. ],
  919. "produces": [
  920. "application/json"
  921. ],
  922. "tags": [
  923. "API.authorized"
  924. ],
  925. "summary": "删除调用方接口地址",
  926. "parameters": [
  927. {
  928. "type": "string",
  929. "description": "主键ID",
  930. "name": "id",
  931. "in": "path",
  932. "required": true
  933. }
  934. ],
  935. "responses": {
  936. "200": {
  937. "description": "OK",
  938. "schema": {
  939. "$ref": "#/definitions/authorized.deleteAPIResponse"
  940. }
  941. },
  942. "400": {
  943. "description": "Bad Request",
  944. "schema": {
  945. "$ref": "#/definitions/code.Failure"
  946. }
  947. }
  948. }
  949. }
  950. },
  951. "/api/config/email": {
  952. "patch": {
  953. "security": [
  954. {
  955. "LoginToken": []
  956. }
  957. ],
  958. "description": "修改邮件配置",
  959. "consumes": [
  960. "application/x-www-form-urlencoded"
  961. ],
  962. "produces": [
  963. "application/json"
  964. ],
  965. "tags": [
  966. "API.config"
  967. ],
  968. "summary": "修改邮件配置",
  969. "parameters": [
  970. {
  971. "type": "string",
  972. "description": "邮箱服务器",
  973. "name": "host",
  974. "in": "formData",
  975. "required": true
  976. },
  977. {
  978. "type": "string",
  979. "description": "端口",
  980. "name": "port",
  981. "in": "formData",
  982. "required": true
  983. },
  984. {
  985. "type": "string",
  986. "description": "发件人邮箱",
  987. "name": "user",
  988. "in": "formData",
  989. "required": true
  990. },
  991. {
  992. "type": "string",
  993. "description": "发件人密码",
  994. "name": "pass",
  995. "in": "formData",
  996. "required": true
  997. },
  998. {
  999. "type": "string",
  1000. "description": "收件人邮箱地址,多个用,分割",
  1001. "name": "to",
  1002. "in": "formData",
  1003. "required": true
  1004. }
  1005. ],
  1006. "responses": {
  1007. "200": {
  1008. "description": "OK",
  1009. "schema": {
  1010. "$ref": "#/definitions/config.emailResponse"
  1011. }
  1012. },
  1013. "400": {
  1014. "description": "Bad Request",
  1015. "schema": {
  1016. "$ref": "#/definitions/code.Failure"
  1017. }
  1018. }
  1019. }
  1020. }
  1021. },
  1022. "/api/cron": {
  1023. "get": {
  1024. "security": [
  1025. {
  1026. "LoginToken": []
  1027. }
  1028. ],
  1029. "description": "任务列表",
  1030. "consumes": [
  1031. "application/x-www-form-urlencoded"
  1032. ],
  1033. "produces": [
  1034. "application/json"
  1035. ],
  1036. "tags": [
  1037. "API.cron"
  1038. ],
  1039. "summary": "任务列表",
  1040. "parameters": [
  1041. {
  1042. "type": "integer",
  1043. "default": 1,
  1044. "description": "第几页",
  1045. "name": "page",
  1046. "in": "query",
  1047. "required": true
  1048. },
  1049. {
  1050. "type": "integer",
  1051. "default": 10,
  1052. "description": "每页显示条数",
  1053. "name": "page_size",
  1054. "in": "query",
  1055. "required": true
  1056. },
  1057. {
  1058. "type": "string",
  1059. "description": "任务名称",
  1060. "name": "name",
  1061. "in": "query"
  1062. },
  1063. {
  1064. "type": "integer",
  1065. "description": "执行方式 1:shell 2:http",
  1066. "name": "protocol",
  1067. "in": "query"
  1068. },
  1069. {
  1070. "type": "integer",
  1071. "description": "是否启用 1:是 -1:否",
  1072. "name": "is_used",
  1073. "in": "query"
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "OK",
  1079. "schema": {
  1080. "$ref": "#/definitions/cron.listResponse"
  1081. }
  1082. },
  1083. "400": {
  1084. "description": "Bad Request",
  1085. "schema": {
  1086. "$ref": "#/definitions/code.Failure"
  1087. }
  1088. }
  1089. }
  1090. },
  1091. "post": {
  1092. "security": [
  1093. {
  1094. "LoginToken": []
  1095. }
  1096. ],
  1097. "description": "创建任务",
  1098. "consumes": [
  1099. "application/x-www-form-urlencoded"
  1100. ],
  1101. "produces": [
  1102. "application/json"
  1103. ],
  1104. "tags": [
  1105. "API.cron"
  1106. ],
  1107. "summary": "创建任务",
  1108. "parameters": [
  1109. {
  1110. "type": "string",
  1111. "description": "任务名称",
  1112. "name": "name",
  1113. "in": "formData",
  1114. "required": true
  1115. },
  1116. {
  1117. "type": "string",
  1118. "description": "crontab 表达式",
  1119. "name": "spec",
  1120. "in": "formData",
  1121. "required": true
  1122. },
  1123. {
  1124. "type": "string",
  1125. "description": "执行命令",
  1126. "name": "command",
  1127. "in": "formData",
  1128. "required": true
  1129. },
  1130. {
  1131. "type": "integer",
  1132. "description": "执行方式 1:shell 2:http",
  1133. "name": "protocol",
  1134. "in": "formData",
  1135. "required": true
  1136. },
  1137. {
  1138. "type": "integer",
  1139. "description": "http 请求方式 1:get 2:post",
  1140. "name": "http_method",
  1141. "in": "formData"
  1142. },
  1143. {
  1144. "type": "integer",
  1145. "description": "超时时间(单位:秒)",
  1146. "name": "timeout",
  1147. "in": "formData",
  1148. "required": true
  1149. },
  1150. {
  1151. "type": "integer",
  1152. "description": "重试次数",
  1153. "name": "retry_times",
  1154. "in": "formData",
  1155. "required": true
  1156. },
  1157. {
  1158. "type": "integer",
  1159. "description": "重试间隔(单位:秒)",
  1160. "name": "retry_interval",
  1161. "in": "formData",
  1162. "required": true
  1163. },
  1164. {
  1165. "type": "integer",
  1166. "description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
  1167. "name": "notify_status",
  1168. "in": "formData",
  1169. "required": true
  1170. },
  1171. {
  1172. "type": "integer",
  1173. "description": "通知类型 1:邮件 2:webhook",
  1174. "name": "notify_type",
  1175. "in": "formData"
  1176. },
  1177. {
  1178. "type": "string",
  1179. "description": "通知者邮箱地址(多个用,分割)",
  1180. "name": "notify_receiver_email",
  1181. "in": "formData"
  1182. },
  1183. {
  1184. "type": "string",
  1185. "description": "通知匹配关键字(多个用,分割)",
  1186. "name": "notify_keyword",
  1187. "in": "formData"
  1188. },
  1189. {
  1190. "type": "string",
  1191. "description": "备注",
  1192. "name": "remark",
  1193. "in": "formData"
  1194. },
  1195. {
  1196. "type": "integer",
  1197. "description": "是否启用 1:是 -1:否",
  1198. "name": "is_used",
  1199. "in": "formData",
  1200. "required": true
  1201. }
  1202. ],
  1203. "responses": {
  1204. "200": {
  1205. "description": "OK",
  1206. "schema": {
  1207. "$ref": "#/definitions/cron.createResponse"
  1208. }
  1209. },
  1210. "400": {
  1211. "description": "Bad Request",
  1212. "schema": {
  1213. "$ref": "#/definitions/code.Failure"
  1214. }
  1215. }
  1216. }
  1217. }
  1218. },
  1219. "/api/cron/used": {
  1220. "patch": {
  1221. "security": [
  1222. {
  1223. "LoginToken": []
  1224. }
  1225. ],
  1226. "description": "更新任务为启用/禁用",
  1227. "consumes": [
  1228. "application/x-www-form-urlencoded"
  1229. ],
  1230. "produces": [
  1231. "application/json"
  1232. ],
  1233. "tags": [
  1234. "API.cron"
  1235. ],
  1236. "summary": "更新任务为启用/禁用",
  1237. "parameters": [
  1238. {
  1239. "type": "string",
  1240. "description": "hashID",
  1241. "name": "id",
  1242. "in": "formData",
  1243. "required": true
  1244. },
  1245. {
  1246. "type": "integer",
  1247. "description": "是否启用 1:是 -1:否",
  1248. "name": "used",
  1249. "in": "formData",
  1250. "required": true
  1251. }
  1252. ],
  1253. "responses": {
  1254. "200": {
  1255. "description": "OK",
  1256. "schema": {
  1257. "$ref": "#/definitions/cron.updateUsedResponse"
  1258. }
  1259. },
  1260. "400": {
  1261. "description": "Bad Request",
  1262. "schema": {
  1263. "$ref": "#/definitions/code.Failure"
  1264. }
  1265. }
  1266. }
  1267. }
  1268. },
  1269. "/api/cron/{id}": {
  1270. "get": {
  1271. "security": [
  1272. {
  1273. "LoginToken": []
  1274. }
  1275. ],
  1276. "description": "获取单条任务详情",
  1277. "consumes": [
  1278. "application/json"
  1279. ],
  1280. "produces": [
  1281. "application/json"
  1282. ],
  1283. "tags": [
  1284. "API.cron"
  1285. ],
  1286. "summary": "获取单条任务详情",
  1287. "parameters": [
  1288. {
  1289. "type": "string",
  1290. "description": "hashId",
  1291. "name": "id",
  1292. "in": "path",
  1293. "required": true
  1294. }
  1295. ],
  1296. "responses": {
  1297. "200": {
  1298. "description": "OK",
  1299. "schema": {
  1300. "$ref": "#/definitions/cron.detailResponse"
  1301. }
  1302. },
  1303. "400": {
  1304. "description": "Bad Request",
  1305. "schema": {
  1306. "$ref": "#/definitions/code.Failure"
  1307. }
  1308. }
  1309. }
  1310. },
  1311. "post": {
  1312. "security": [
  1313. {
  1314. "LoginToken": []
  1315. }
  1316. ],
  1317. "description": "编辑任务",
  1318. "consumes": [
  1319. "application/x-www-form-urlencoded"
  1320. ],
  1321. "produces": [
  1322. "application/json"
  1323. ],
  1324. "tags": [
  1325. "API.cron"
  1326. ],
  1327. "summary": "编辑任务",
  1328. "parameters": [
  1329. {
  1330. "type": "string",
  1331. "description": "hashID",
  1332. "name": "id",
  1333. "in": "formData",
  1334. "required": true
  1335. },
  1336. {
  1337. "type": "string",
  1338. "description": "任务名称",
  1339. "name": "name",
  1340. "in": "formData",
  1341. "required": true
  1342. },
  1343. {
  1344. "type": "string",
  1345. "description": "crontab 表达式",
  1346. "name": "spec",
  1347. "in": "formData",
  1348. "required": true
  1349. },
  1350. {
  1351. "type": "string",
  1352. "description": "执行命令",
  1353. "name": "command",
  1354. "in": "formData",
  1355. "required": true
  1356. },
  1357. {
  1358. "type": "integer",
  1359. "description": "执行方式 1:shell 2:http",
  1360. "name": "protocol",
  1361. "in": "formData",
  1362. "required": true
  1363. },
  1364. {
  1365. "type": "integer",
  1366. "description": "http 请求方式 1:get 2:post",
  1367. "name": "http_method",
  1368. "in": "formData"
  1369. },
  1370. {
  1371. "type": "integer",
  1372. "description": "超时时间(单位:秒)",
  1373. "name": "timeout",
  1374. "in": "formData",
  1375. "required": true
  1376. },
  1377. {
  1378. "type": "integer",
  1379. "description": "重试次数",
  1380. "name": "retry_times",
  1381. "in": "formData",
  1382. "required": true
  1383. },
  1384. {
  1385. "type": "integer",
  1386. "description": "重试间隔(单位:秒)",
  1387. "name": "retry_interval",
  1388. "in": "formData",
  1389. "required": true
  1390. },
  1391. {
  1392. "type": "integer",
  1393. "description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
  1394. "name": "notify_status",
  1395. "in": "formData",
  1396. "required": true
  1397. },
  1398. {
  1399. "type": "integer",
  1400. "description": "通知类型 1:邮件 2:webhook",
  1401. "name": "notify_type",
  1402. "in": "formData"
  1403. },
  1404. {
  1405. "type": "string",
  1406. "description": "通知者邮箱地址(多个用,分割)",
  1407. "name": "notify_receiver_email",
  1408. "in": "formData"
  1409. },
  1410. {
  1411. "type": "string",
  1412. "description": "通知匹配关键字(多个用,分割)",
  1413. "name": "notify_keyword",
  1414. "in": "formData"
  1415. },
  1416. {
  1417. "type": "string",
  1418. "description": "备注",
  1419. "name": "remark",
  1420. "in": "formData"
  1421. },
  1422. {
  1423. "type": "integer",
  1424. "description": "是否启用 1:是 -1:否",
  1425. "name": "is_used",
  1426. "in": "formData",
  1427. "required": true
  1428. }
  1429. ],
  1430. "responses": {
  1431. "200": {
  1432. "description": "OK",
  1433. "schema": {
  1434. "$ref": "#/definitions/cron.modifyResponse"
  1435. }
  1436. },
  1437. "400": {
  1438. "description": "Bad Request",
  1439. "schema": {
  1440. "$ref": "#/definitions/code.Failure"
  1441. }
  1442. }
  1443. }
  1444. },
  1445. "patch": {
  1446. "security": [
  1447. {
  1448. "LoginToken": []
  1449. }
  1450. ],
  1451. "description": "手动执行单条任务",
  1452. "consumes": [
  1453. "application/json"
  1454. ],
  1455. "produces": [
  1456. "application/json"
  1457. ],
  1458. "tags": [
  1459. "API.cron"
  1460. ],
  1461. "summary": "手动执行单条任务",
  1462. "parameters": [
  1463. {
  1464. "type": "string",
  1465. "description": "hashId",
  1466. "name": "id",
  1467. "in": "path",
  1468. "required": true
  1469. }
  1470. ],
  1471. "responses": {
  1472. "200": {
  1473. "description": "OK",
  1474. "schema": {
  1475. "$ref": "#/definitions/cron.detailResponse"
  1476. }
  1477. },
  1478. "400": {
  1479. "description": "Bad Request",
  1480. "schema": {
  1481. "$ref": "#/definitions/code.Failure"
  1482. }
  1483. }
  1484. }
  1485. }
  1486. },
  1487. "/api/login": {
  1488. "post": {
  1489. "security": [
  1490. {
  1491. "LoginToken": []
  1492. }
  1493. ],
  1494. "description": "管理员登录",
  1495. "consumes": [
  1496. "application/x-www-form-urlencoded"
  1497. ],
  1498. "produces": [
  1499. "application/json"
  1500. ],
  1501. "tags": [
  1502. "API.admin"
  1503. ],
  1504. "summary": "管理员登录",
  1505. "parameters": [
  1506. {
  1507. "type": "string",
  1508. "description": "用户名",
  1509. "name": "username",
  1510. "in": "formData",
  1511. "required": true
  1512. },
  1513. {
  1514. "type": "string",
  1515. "description": "MD5后的密码",
  1516. "name": "password",
  1517. "in": "formData",
  1518. "required": true
  1519. }
  1520. ],
  1521. "responses": {
  1522. "200": {
  1523. "description": "OK",
  1524. "schema": {
  1525. "$ref": "#/definitions/admin.loginResponse"
  1526. }
  1527. },
  1528. "400": {
  1529. "description": "Bad Request",
  1530. "schema": {
  1531. "$ref": "#/definitions/code.Failure"
  1532. }
  1533. }
  1534. }
  1535. }
  1536. },
  1537. "/api/menu": {
  1538. "get": {
  1539. "security": [
  1540. {
  1541. "LoginToken": []
  1542. }
  1543. ],
  1544. "description": "菜单列表",
  1545. "consumes": [
  1546. "application/x-www-form-urlencoded"
  1547. ],
  1548. "produces": [
  1549. "application/json"
  1550. ],
  1551. "tags": [
  1552. "API.menu"
  1553. ],
  1554. "summary": "菜单列表",
  1555. "responses": {
  1556. "200": {
  1557. "description": "OK",
  1558. "schema": {
  1559. "$ref": "#/definitions/menu.listResponse"
  1560. }
  1561. },
  1562. "400": {
  1563. "description": "Bad Request",
  1564. "schema": {
  1565. "$ref": "#/definitions/code.Failure"
  1566. }
  1567. }
  1568. }
  1569. },
  1570. "post": {
  1571. "security": [
  1572. {
  1573. "LoginToken": []
  1574. }
  1575. ],
  1576. "description": "创建/编辑菜单",
  1577. "consumes": [
  1578. "application/x-www-form-urlencoded"
  1579. ],
  1580. "produces": [
  1581. "application/json"
  1582. ],
  1583. "tags": [
  1584. "API.menu"
  1585. ],
  1586. "summary": "创建/编辑菜单",
  1587. "parameters": [
  1588. {
  1589. "description": "请求信息",
  1590. "name": "Request",
  1591. "in": "body",
  1592. "required": true,
  1593. "schema": {
  1594. "$ref": "#/definitions/menu.createRequest"
  1595. }
  1596. }
  1597. ],
  1598. "responses": {
  1599. "200": {
  1600. "description": "OK",
  1601. "schema": {
  1602. "$ref": "#/definitions/menu.createResponse"
  1603. }
  1604. },
  1605. "400": {
  1606. "description": "Bad Request",
  1607. "schema": {
  1608. "$ref": "#/definitions/code.Failure"
  1609. }
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "/api/menu/sort": {
  1615. "patch": {
  1616. "security": [
  1617. {
  1618. "LoginToken": []
  1619. }
  1620. ],
  1621. "description": "更新菜单排序",
  1622. "consumes": [
  1623. "application/x-www-form-urlencoded"
  1624. ],
  1625. "produces": [
  1626. "application/json"
  1627. ],
  1628. "tags": [
  1629. "API.menu"
  1630. ],
  1631. "summary": "更新菜单排序",
  1632. "parameters": [
  1633. {
  1634. "type": "string",
  1635. "description": "hashId",
  1636. "name": "id",
  1637. "in": "formData",
  1638. "required": true
  1639. },
  1640. {
  1641. "type": "integer",
  1642. "description": "排序",
  1643. "name": "sort",
  1644. "in": "formData",
  1645. "required": true
  1646. }
  1647. ],
  1648. "responses": {
  1649. "200": {
  1650. "description": "OK",
  1651. "schema": {
  1652. "$ref": "#/definitions/menu.updateSortResponse"
  1653. }
  1654. },
  1655. "400": {
  1656. "description": "Bad Request",
  1657. "schema": {
  1658. "$ref": "#/definitions/code.Failure"
  1659. }
  1660. }
  1661. }
  1662. }
  1663. },
  1664. "/api/menu/used": {
  1665. "patch": {
  1666. "security": [
  1667. {
  1668. "LoginToken": []
  1669. }
  1670. ],
  1671. "description": "更新菜单为启用/禁用",
  1672. "consumes": [
  1673. "application/x-www-form-urlencoded"
  1674. ],
  1675. "produces": [
  1676. "application/json"
  1677. ],
  1678. "tags": [
  1679. "API.menu"
  1680. ],
  1681. "summary": "更新菜单为启用/禁用",
  1682. "parameters": [
  1683. {
  1684. "type": "string",
  1685. "description": "hashId",
  1686. "name": "id",
  1687. "in": "formData",
  1688. "required": true
  1689. },
  1690. {
  1691. "type": "integer",
  1692. "description": "是否启用 1:是 -1:否",
  1693. "name": "used",
  1694. "in": "formData",
  1695. "required": true
  1696. }
  1697. ],
  1698. "responses": {
  1699. "200": {
  1700. "description": "OK",
  1701. "schema": {
  1702. "$ref": "#/definitions/menu.updateUsedResponse"
  1703. }
  1704. },
  1705. "400": {
  1706. "description": "Bad Request",
  1707. "schema": {
  1708. "$ref": "#/definitions/code.Failure"
  1709. }
  1710. }
  1711. }
  1712. }
  1713. },
  1714. "/api/menu/{id}": {
  1715. "get": {
  1716. "security": [
  1717. {
  1718. "LoginToken": []
  1719. }
  1720. ],
  1721. "description": "菜单详情",
  1722. "consumes": [
  1723. "application/x-www-form-urlencoded"
  1724. ],
  1725. "produces": [
  1726. "application/json"
  1727. ],
  1728. "tags": [
  1729. "API.menu"
  1730. ],
  1731. "summary": "菜单详情",
  1732. "parameters": [
  1733. {
  1734. "type": "string",
  1735. "description": "hashId",
  1736. "name": "id",
  1737. "in": "path",
  1738. "required": true
  1739. }
  1740. ],
  1741. "responses": {
  1742. "200": {
  1743. "description": "OK",
  1744. "schema": {
  1745. "$ref": "#/definitions/menu.detailResponse"
  1746. }
  1747. },
  1748. "400": {
  1749. "description": "Bad Request",
  1750. "schema": {
  1751. "$ref": "#/definitions/code.Failure"
  1752. }
  1753. }
  1754. }
  1755. },
  1756. "delete": {
  1757. "security": [
  1758. {
  1759. "LoginToken": []
  1760. }
  1761. ],
  1762. "description": "删除菜单",
  1763. "consumes": [
  1764. "application/json"
  1765. ],
  1766. "produces": [
  1767. "application/json"
  1768. ],
  1769. "tags": [
  1770. "API.menu"
  1771. ],
  1772. "summary": "删除菜单",
  1773. "parameters": [
  1774. {
  1775. "type": "string",
  1776. "description": "hashId",
  1777. "name": "id",
  1778. "in": "path",
  1779. "required": true
  1780. }
  1781. ],
  1782. "responses": {
  1783. "200": {
  1784. "description": "OK",
  1785. "schema": {
  1786. "$ref": "#/definitions/menu.deleteResponse"
  1787. }
  1788. },
  1789. "400": {
  1790. "description": "Bad Request",
  1791. "schema": {
  1792. "$ref": "#/definitions/code.Failure"
  1793. }
  1794. }
  1795. }
  1796. }
  1797. },
  1798. "/api/menu_action": {
  1799. "get": {
  1800. "security": [
  1801. {
  1802. "LoginToken": []
  1803. }
  1804. ],
  1805. "description": "功能权限列表",
  1806. "consumes": [
  1807. "application/x-www-form-urlencoded"
  1808. ],
  1809. "produces": [
  1810. "application/json"
  1811. ],
  1812. "tags": [
  1813. "API.menu"
  1814. ],
  1815. "summary": "功能权限列表",
  1816. "parameters": [
  1817. {
  1818. "type": "string",
  1819. "description": "hashID",
  1820. "name": "id",
  1821. "in": "query",
  1822. "required": true
  1823. }
  1824. ],
  1825. "responses": {
  1826. "200": {
  1827. "description": "OK",
  1828. "schema": {
  1829. "$ref": "#/definitions/menu.listActionResponse"
  1830. }
  1831. },
  1832. "400": {
  1833. "description": "Bad Request",
  1834. "schema": {
  1835. "$ref": "#/definitions/code.Failure"
  1836. }
  1837. }
  1838. }
  1839. },
  1840. "post": {
  1841. "security": [
  1842. {
  1843. "LoginToken": []
  1844. }
  1845. ],
  1846. "description": "创建功能权限",
  1847. "consumes": [
  1848. "application/x-www-form-urlencoded"
  1849. ],
  1850. "produces": [
  1851. "application/json"
  1852. ],
  1853. "tags": [
  1854. "API.menu"
  1855. ],
  1856. "summary": "创建功能权限",
  1857. "parameters": [
  1858. {
  1859. "type": "string",
  1860. "description": "HashID",
  1861. "name": "id",
  1862. "in": "formData",
  1863. "required": true
  1864. },
  1865. {
  1866. "type": "string",
  1867. "description": "请求方法",
  1868. "name": "method",
  1869. "in": "formData",
  1870. "required": true
  1871. },
  1872. {
  1873. "type": "string",
  1874. "description": "请求地址",
  1875. "name": "api",
  1876. "in": "formData",
  1877. "required": true
  1878. }
  1879. ],
  1880. "responses": {
  1881. "200": {
  1882. "description": "OK",
  1883. "schema": {
  1884. "$ref": "#/definitions/menu.createActionResponse"
  1885. }
  1886. },
  1887. "400": {
  1888. "description": "Bad Request",
  1889. "schema": {
  1890. "$ref": "#/definitions/code.Failure"
  1891. }
  1892. }
  1893. }
  1894. }
  1895. },
  1896. "/api/menu_action/{id}": {
  1897. "delete": {
  1898. "security": [
  1899. {
  1900. "LoginToken": []
  1901. }
  1902. ],
  1903. "description": "删除功能权限",
  1904. "consumes": [
  1905. "application/json"
  1906. ],
  1907. "produces": [
  1908. "application/json"
  1909. ],
  1910. "tags": [
  1911. "API.menu"
  1912. ],
  1913. "summary": "删除功能权限",
  1914. "parameters": [
  1915. {
  1916. "type": "string",
  1917. "description": "hashId",
  1918. "name": "id",
  1919. "in": "path",
  1920. "required": true
  1921. }
  1922. ],
  1923. "responses": {
  1924. "200": {
  1925. "description": "OK",
  1926. "schema": {
  1927. "$ref": "#/definitions/menu.deleteActionResponse"
  1928. }
  1929. },
  1930. "400": {
  1931. "description": "Bad Request",
  1932. "schema": {
  1933. "$ref": "#/definitions/code.Failure"
  1934. }
  1935. }
  1936. }
  1937. }
  1938. },
  1939. "/api/tool/cache/clear": {
  1940. "patch": {
  1941. "security": [
  1942. {
  1943. "LoginToken": []
  1944. }
  1945. ],
  1946. "description": "清空缓存",
  1947. "consumes": [
  1948. "application/x-www-form-urlencoded"
  1949. ],
  1950. "produces": [
  1951. "application/json"
  1952. ],
  1953. "tags": [
  1954. "API.tool"
  1955. ],
  1956. "summary": "清空缓存",
  1957. "parameters": [
  1958. {
  1959. "type": "string",
  1960. "description": "Redis Key",
  1961. "name": "redis_key",
  1962. "in": "formData",
  1963. "required": true
  1964. }
  1965. ],
  1966. "responses": {
  1967. "200": {
  1968. "description": "OK",
  1969. "schema": {
  1970. "$ref": "#/definitions/tool.searchCacheResponse"
  1971. }
  1972. },
  1973. "400": {
  1974. "description": "Bad Request",
  1975. "schema": {
  1976. "$ref": "#/definitions/code.Failure"
  1977. }
  1978. }
  1979. }
  1980. }
  1981. },
  1982. "/api/tool/cache/search": {
  1983. "post": {
  1984. "security": [
  1985. {
  1986. "LoginToken": []
  1987. }
  1988. ],
  1989. "description": "查询缓存",
  1990. "consumes": [
  1991. "application/x-www-form-urlencoded"
  1992. ],
  1993. "produces": [
  1994. "application/json"
  1995. ],
  1996. "tags": [
  1997. "API.tool"
  1998. ],
  1999. "summary": "查询缓存",
  2000. "parameters": [
  2001. {
  2002. "type": "string",
  2003. "description": "Redis Key",
  2004. "name": "redis_key",
  2005. "in": "formData",
  2006. "required": true
  2007. }
  2008. ],
  2009. "responses": {
  2010. "200": {
  2011. "description": "OK",
  2012. "schema": {
  2013. "$ref": "#/definitions/tool.searchCacheResponse"
  2014. }
  2015. },
  2016. "400": {
  2017. "description": "Bad Request",
  2018. "schema": {
  2019. "$ref": "#/definitions/code.Failure"
  2020. }
  2021. }
  2022. }
  2023. }
  2024. },
  2025. "/api/tool/data/dbs": {
  2026. "get": {
  2027. "security": [
  2028. {
  2029. "LoginToken": []
  2030. }
  2031. ],
  2032. "description": "查询 DB",
  2033. "consumes": [
  2034. "application/x-www-form-urlencoded"
  2035. ],
  2036. "produces": [
  2037. "application/json"
  2038. ],
  2039. "tags": [
  2040. "API.tool"
  2041. ],
  2042. "summary": "查询 DB",
  2043. "responses": {
  2044. "200": {
  2045. "description": "OK",
  2046. "schema": {
  2047. "$ref": "#/definitions/tool.dbsResponse"
  2048. }
  2049. },
  2050. "400": {
  2051. "description": "Bad Request",
  2052. "schema": {
  2053. "$ref": "#/definitions/code.Failure"
  2054. }
  2055. }
  2056. }
  2057. }
  2058. },
  2059. "/api/tool/data/mysql": {
  2060. "post": {
  2061. "security": [
  2062. {
  2063. "LoginToken": []
  2064. }
  2065. ],
  2066. "description": "执行 SQL 语句",
  2067. "consumes": [
  2068. "application/x-www-form-urlencoded"
  2069. ],
  2070. "produces": [
  2071. "application/json"
  2072. ],
  2073. "tags": [
  2074. "API.tool"
  2075. ],
  2076. "summary": "执行 SQL 语句",
  2077. "parameters": [
  2078. {
  2079. "type": "string",
  2080. "description": "数据库名称",
  2081. "name": "db_name",
  2082. "in": "formData",
  2083. "required": true
  2084. },
  2085. {
  2086. "type": "string",
  2087. "description": "数据表名称",
  2088. "name": "table_name",
  2089. "in": "formData",
  2090. "required": true
  2091. },
  2092. {
  2093. "type": "string",
  2094. "description": "SQL 语句",
  2095. "name": "sql",
  2096. "in": "formData",
  2097. "required": true
  2098. }
  2099. ],
  2100. "responses": {
  2101. "200": {
  2102. "description": "OK",
  2103. "schema": {
  2104. "$ref": "#/definitions/tool.searchMySQLResponse"
  2105. }
  2106. },
  2107. "400": {
  2108. "description": "Bad Request",
  2109. "schema": {
  2110. "$ref": "#/definitions/code.Failure"
  2111. }
  2112. }
  2113. }
  2114. }
  2115. },
  2116. "/api/tool/data/tables": {
  2117. "post": {
  2118. "security": [
  2119. {
  2120. "LoginToken": []
  2121. }
  2122. ],
  2123. "description": "查询 Table",
  2124. "consumes": [
  2125. "application/x-www-form-urlencoded"
  2126. ],
  2127. "produces": [
  2128. "application/json"
  2129. ],
  2130. "tags": [
  2131. "API.tool"
  2132. ],
  2133. "summary": "查询 Table",
  2134. "parameters": [
  2135. {
  2136. "type": "string",
  2137. "description": "数据库名称",
  2138. "name": "db_name",
  2139. "in": "formData",
  2140. "required": true
  2141. }
  2142. ],
  2143. "responses": {
  2144. "200": {
  2145. "description": "OK",
  2146. "schema": {
  2147. "$ref": "#/definitions/tool.tablesResponse"
  2148. }
  2149. },
  2150. "400": {
  2151. "description": "Bad Request",
  2152. "schema": {
  2153. "$ref": "#/definitions/code.Failure"
  2154. }
  2155. }
  2156. }
  2157. }
  2158. },
  2159. "/api/tool/hashids/decode/{id}": {
  2160. "get": {
  2161. "security": [
  2162. {
  2163. "LoginToken": []
  2164. }
  2165. ],
  2166. "description": "HashIds 解密",
  2167. "consumes": [
  2168. "application/x-www-form-urlencoded"
  2169. ],
  2170. "produces": [
  2171. "application/json"
  2172. ],
  2173. "tags": [
  2174. "API.tool"
  2175. ],
  2176. "summary": "HashIds 解密",
  2177. "parameters": [
  2178. {
  2179. "type": "string",
  2180. "description": "需解密的密文",
  2181. "name": "id",
  2182. "in": "path",
  2183. "required": true
  2184. }
  2185. ],
  2186. "responses": {
  2187. "200": {
  2188. "description": "OK",
  2189. "schema": {
  2190. "$ref": "#/definitions/tool.hashIdsDecodeResponse"
  2191. }
  2192. },
  2193. "400": {
  2194. "description": "Bad Request",
  2195. "schema": {
  2196. "$ref": "#/definitions/code.Failure"
  2197. }
  2198. }
  2199. }
  2200. }
  2201. },
  2202. "/api/tool/hashids/encode/{id}": {
  2203. "get": {
  2204. "security": [
  2205. {
  2206. "LoginToken": []
  2207. }
  2208. ],
  2209. "description": "HashIds 加密",
  2210. "consumes": [
  2211. "application/x-www-form-urlencoded"
  2212. ],
  2213. "produces": [
  2214. "application/json"
  2215. ],
  2216. "tags": [
  2217. "API.tool"
  2218. ],
  2219. "summary": "HashIds 加密",
  2220. "parameters": [
  2221. {
  2222. "type": "string",
  2223. "description": "需加密的数字",
  2224. "name": "id",
  2225. "in": "path",
  2226. "required": true
  2227. }
  2228. ],
  2229. "responses": {
  2230. "200": {
  2231. "description": "OK",
  2232. "schema": {
  2233. "$ref": "#/definitions/tool.hashIdsEncodeResponse"
  2234. }
  2235. },
  2236. "400": {
  2237. "description": "Bad Request",
  2238. "schema": {
  2239. "$ref": "#/definitions/code.Failure"
  2240. }
  2241. }
  2242. }
  2243. }
  2244. },
  2245. "/api/tool/send_message": {
  2246. "post": {
  2247. "security": [
  2248. {
  2249. "LoginToken": []
  2250. }
  2251. ],
  2252. "description": "发送消息",
  2253. "consumes": [
  2254. "application/x-www-form-urlencoded"
  2255. ],
  2256. "produces": [
  2257. "application/json"
  2258. ],
  2259. "tags": [
  2260. "API.tool"
  2261. ],
  2262. "summary": "发送消息",
  2263. "parameters": [
  2264. {
  2265. "type": "string",
  2266. "description": "消息内容",
  2267. "name": "message",
  2268. "in": "formData",
  2269. "required": true
  2270. }
  2271. ],
  2272. "responses": {
  2273. "200": {
  2274. "description": "OK",
  2275. "schema": {
  2276. "$ref": "#/definitions/tool.sendMessageResponse"
  2277. }
  2278. },
  2279. "400": {
  2280. "description": "Bad Request",
  2281. "schema": {
  2282. "$ref": "#/definitions/code.Failure"
  2283. }
  2284. }
  2285. }
  2286. }
  2287. },
  2288. "/helper/md5/{str}": {
  2289. "get": {
  2290. "description": "加密",
  2291. "consumes": [
  2292. "application/x-www-form-urlencoded"
  2293. ],
  2294. "produces": [
  2295. "application/json"
  2296. ],
  2297. "tags": [
  2298. "Helper"
  2299. ],
  2300. "summary": "加密",
  2301. "parameters": [
  2302. {
  2303. "type": "string",
  2304. "description": "需要加密的字符串",
  2305. "name": "str",
  2306. "in": "path",
  2307. "required": true
  2308. }
  2309. ],
  2310. "responses": {
  2311. "200": {
  2312. "description": "OK",
  2313. "schema": {
  2314. "$ref": "#/definitions/helper.md5Response"
  2315. }
  2316. },
  2317. "400": {
  2318. "description": "Bad Request",
  2319. "schema": {
  2320. "$ref": "#/definitions/code.Failure"
  2321. }
  2322. }
  2323. }
  2324. }
  2325. },
  2326. "/helper/sign": {
  2327. "post": {
  2328. "description": "签名",
  2329. "consumes": [
  2330. "application/x-www-form-urlencoded"
  2331. ],
  2332. "produces": [
  2333. "application/json"
  2334. ],
  2335. "tags": [
  2336. "Helper"
  2337. ],
  2338. "summary": "签名",
  2339. "parameters": [
  2340. {
  2341. "type": "string",
  2342. "description": "调用方 KEY",
  2343. "name": "key",
  2344. "in": "formData",
  2345. "required": true
  2346. },
  2347. {
  2348. "type": "string",
  2349. "description": "请求路径 (不附带 querystring),例如:/api/login",
  2350. "name": "path",
  2351. "in": "formData",
  2352. "required": true
  2353. },
  2354. {
  2355. "type": "string",
  2356. "description": "请求方式,例如:POST",
  2357. "name": "method",
  2358. "in": "formData",
  2359. "required": true
  2360. },
  2361. {
  2362. "type": "string",
  2363. "description": "请求参数,例如:username=tom\u0026password=123456",
  2364. "name": "params",
  2365. "in": "formData",
  2366. "required": true
  2367. }
  2368. ],
  2369. "responses": {
  2370. "200": {
  2371. "description": "OK",
  2372. "schema": {
  2373. "$ref": "#/definitions/helper.signResponse"
  2374. }
  2375. },
  2376. "400": {
  2377. "description": "Bad Request",
  2378. "schema": {
  2379. "$ref": "#/definitions/code.Failure"
  2380. }
  2381. }
  2382. }
  2383. }
  2384. }
  2385. },
  2386. "definitions": {
  2387. "admin.ListMenuData": {
  2388. "type": "object",
  2389. "properties": {
  2390. "id": {
  2391. "description": "ID",
  2392. "type": "integer"
  2393. },
  2394. "is_have": {
  2395. "description": "是否已拥有权限",
  2396. "type": "integer"
  2397. },
  2398. "name": {
  2399. "description": "菜单名称",
  2400. "type": "string"
  2401. },
  2402. "pid": {
  2403. "description": "父类ID",
  2404. "type": "integer"
  2405. }
  2406. }
  2407. },
  2408. "admin.ListMyMenuData": {
  2409. "type": "object",
  2410. "properties": {
  2411. "icon": {
  2412. "description": "图标",
  2413. "type": "string"
  2414. },
  2415. "id": {
  2416. "description": "ID",
  2417. "type": "integer"
  2418. },
  2419. "link": {
  2420. "description": "链接地址",
  2421. "type": "string"
  2422. },
  2423. "name": {
  2424. "description": "菜单名称",
  2425. "type": "string"
  2426. },
  2427. "pid": {
  2428. "description": "父类ID",
  2429. "type": "integer"
  2430. }
  2431. }
  2432. },
  2433. "admin.createResponse": {
  2434. "type": "object",
  2435. "properties": {
  2436. "id": {
  2437. "description": "主键ID",
  2438. "type": "integer"
  2439. }
  2440. }
  2441. },
  2442. "admin.deleteResponse": {
  2443. "type": "object",
  2444. "properties": {
  2445. "id": {
  2446. "description": "主键ID",
  2447. "type": "integer"
  2448. }
  2449. }
  2450. },
  2451. "admin.detailResponse": {
  2452. "type": "object",
  2453. "properties": {
  2454. "menu": {
  2455. "description": "菜单栏",
  2456. "type": "array",
  2457. "items": {
  2458. "$ref": "#/definitions/admin.ListMyMenuData"
  2459. }
  2460. },
  2461. "mobile": {
  2462. "description": "手机号",
  2463. "type": "string"
  2464. },
  2465. "nickname": {
  2466. "description": "昵称",
  2467. "type": "string"
  2468. },
  2469. "username": {
  2470. "description": "用户名",
  2471. "type": "string"
  2472. }
  2473. }
  2474. },
  2475. "admin.listAdminMenuResponse": {
  2476. "type": "object",
  2477. "properties": {
  2478. "list": {
  2479. "type": "array",
  2480. "items": {
  2481. "$ref": "#/definitions/admin.ListMenuData"
  2482. }
  2483. },
  2484. "username": {
  2485. "type": "string"
  2486. }
  2487. }
  2488. },
  2489. "admin.listData": {
  2490. "type": "object",
  2491. "properties": {
  2492. "created_at": {
  2493. "description": "创建时间",
  2494. "type": "string"
  2495. },
  2496. "created_user": {
  2497. "description": "创建人",
  2498. "type": "string"
  2499. },
  2500. "hashid": {
  2501. "description": "hashid",
  2502. "type": "string"
  2503. },
  2504. "id": {
  2505. "description": "ID",
  2506. "type": "integer"
  2507. },
  2508. "is_online": {
  2509. "description": "是否在线 1:是 -1:否",
  2510. "type": "integer"
  2511. },
  2512. "is_used": {
  2513. "description": "是否启用 1:是 -1:否",
  2514. "type": "integer"
  2515. },
  2516. "mobile": {
  2517. "description": "手机号",
  2518. "type": "string"
  2519. },
  2520. "nickname": {
  2521. "description": "昵称",
  2522. "type": "string"
  2523. },
  2524. "updated_at": {
  2525. "description": "更新时间",
  2526. "type": "string"
  2527. },
  2528. "updated_user": {
  2529. "description": "更新人",
  2530. "type": "string"
  2531. },
  2532. "username": {
  2533. "description": "用户名",
  2534. "type": "string"
  2535. }
  2536. }
  2537. },
  2538. "admin.listResponse": {
  2539. "type": "object",
  2540. "properties": {
  2541. "list": {
  2542. "type": "array",
  2543. "items": {
  2544. "$ref": "#/definitions/admin.listData"
  2545. }
  2546. },
  2547. "pagination": {
  2548. "type": "object",
  2549. "properties": {
  2550. "current_page": {
  2551. "type": "integer"
  2552. },
  2553. "per_page_count": {
  2554. "type": "integer"
  2555. },
  2556. "total": {
  2557. "type": "integer"
  2558. }
  2559. }
  2560. }
  2561. }
  2562. },
  2563. "admin.loginResponse": {
  2564. "type": "object",
  2565. "properties": {
  2566. "token": {
  2567. "description": "用户身份标识",
  2568. "type": "string"
  2569. }
  2570. }
  2571. },
  2572. "admin.logoutResponse": {
  2573. "type": "object",
  2574. "properties": {
  2575. "username": {
  2576. "description": "用户账号",
  2577. "type": "string"
  2578. }
  2579. }
  2580. },
  2581. "admin.modifyPasswordResponse": {
  2582. "type": "object",
  2583. "properties": {
  2584. "username": {
  2585. "description": "用户账号",
  2586. "type": "string"
  2587. }
  2588. }
  2589. },
  2590. "admin.modifyPersonalInfoResponse": {
  2591. "type": "object",
  2592. "properties": {
  2593. "username": {
  2594. "description": "用户账号",
  2595. "type": "string"
  2596. }
  2597. }
  2598. },
  2599. "admin.offlineResponse": {
  2600. "type": "object",
  2601. "properties": {
  2602. "id": {
  2603. "description": "主键ID",
  2604. "type": "integer"
  2605. }
  2606. }
  2607. },
  2608. "admin.resetPasswordResponse": {
  2609. "type": "object",
  2610. "properties": {
  2611. "id": {
  2612. "description": "主键ID",
  2613. "type": "integer"
  2614. }
  2615. }
  2616. },
  2617. "admin.updateUsedResponse": {
  2618. "type": "object",
  2619. "properties": {
  2620. "id": {
  2621. "description": "主键ID",
  2622. "type": "integer"
  2623. }
  2624. }
  2625. },
  2626. "authorized.createAPIResponse": {
  2627. "type": "object",
  2628. "properties": {
  2629. "id": {
  2630. "description": "主键ID",
  2631. "type": "integer"
  2632. }
  2633. }
  2634. },
  2635. "authorized.createResponse": {
  2636. "type": "object",
  2637. "properties": {
  2638. "id": {
  2639. "description": "主键ID",
  2640. "type": "integer"
  2641. }
  2642. }
  2643. },
  2644. "authorized.deleteAPIResponse": {
  2645. "type": "object",
  2646. "properties": {
  2647. "id": {
  2648. "description": "主键ID",
  2649. "type": "integer"
  2650. }
  2651. }
  2652. },
  2653. "authorized.deleteResponse": {
  2654. "type": "object",
  2655. "properties": {
  2656. "id": {
  2657. "description": "主键ID",
  2658. "type": "integer"
  2659. }
  2660. }
  2661. },
  2662. "authorized.listAPIData": {
  2663. "type": "object",
  2664. "properties": {
  2665. "api": {
  2666. "description": "调用方对接人",
  2667. "type": "string"
  2668. },
  2669. "business_key": {
  2670. "description": "调用方key",
  2671. "type": "string"
  2672. },
  2673. "hash_id": {
  2674. "description": "hashID",
  2675. "type": "string"
  2676. },
  2677. "method": {
  2678. "description": "调用方secret",
  2679. "type": "string"
  2680. }
  2681. }
  2682. },
  2683. "authorized.listAPIResponse": {
  2684. "type": "object",
  2685. "properties": {
  2686. "business_key": {
  2687. "description": "调用方key",
  2688. "type": "string"
  2689. },
  2690. "list": {
  2691. "type": "array",
  2692. "items": {
  2693. "$ref": "#/definitions/authorized.listAPIData"
  2694. }
  2695. }
  2696. }
  2697. },
  2698. "authorized.listData": {
  2699. "type": "object",
  2700. "properties": {
  2701. "business_developer": {
  2702. "description": "调用方对接人",
  2703. "type": "string"
  2704. },
  2705. "business_key": {
  2706. "description": "调用方key",
  2707. "type": "string"
  2708. },
  2709. "business_secret": {
  2710. "description": "调用方secret",
  2711. "type": "string"
  2712. },
  2713. "created_at": {
  2714. "description": "创建时间",
  2715. "type": "string"
  2716. },
  2717. "created_user": {
  2718. "description": "创建人",
  2719. "type": "string"
  2720. },
  2721. "hashid": {
  2722. "description": "hashid",
  2723. "type": "string"
  2724. },
  2725. "id": {
  2726. "description": "ID",
  2727. "type": "integer"
  2728. },
  2729. "is_used": {
  2730. "description": "是否启用 1:是 -1:否",
  2731. "type": "integer"
  2732. },
  2733. "remark": {
  2734. "description": "备注",
  2735. "type": "string"
  2736. },
  2737. "updated_at": {
  2738. "description": "更新时间",
  2739. "type": "string"
  2740. },
  2741. "updated_user": {
  2742. "description": "更新人",
  2743. "type": "string"
  2744. }
  2745. }
  2746. },
  2747. "authorized.listResponse": {
  2748. "type": "object",
  2749. "properties": {
  2750. "list": {
  2751. "type": "array",
  2752. "items": {
  2753. "$ref": "#/definitions/authorized.listData"
  2754. }
  2755. },
  2756. "pagination": {
  2757. "type": "object",
  2758. "properties": {
  2759. "current_page": {
  2760. "type": "integer"
  2761. },
  2762. "per_page_count": {
  2763. "type": "integer"
  2764. },
  2765. "total": {
  2766. "type": "integer"
  2767. }
  2768. }
  2769. }
  2770. }
  2771. },
  2772. "authorized.updateUsedResponse": {
  2773. "type": "object",
  2774. "properties": {
  2775. "id": {
  2776. "description": "主键ID",
  2777. "type": "integer"
  2778. }
  2779. }
  2780. },
  2781. "code.Failure": {
  2782. "type": "object",
  2783. "properties": {
  2784. "code": {
  2785. "description": "业务码",
  2786. "type": "integer"
  2787. },
  2788. "message": {
  2789. "description": "描述信息",
  2790. "type": "string"
  2791. }
  2792. }
  2793. },
  2794. "config.emailResponse": {
  2795. "type": "object",
  2796. "properties": {
  2797. "email": {
  2798. "description": "邮箱地址",
  2799. "type": "string"
  2800. }
  2801. }
  2802. },
  2803. "cron.createResponse": {
  2804. "type": "object",
  2805. "properties": {
  2806. "id": {
  2807. "description": "主键ID",
  2808. "type": "integer"
  2809. }
  2810. }
  2811. },
  2812. "cron.detailResponse": {
  2813. "type": "object",
  2814. "properties": {
  2815. "command": {
  2816. "description": "执行命令",
  2817. "type": "string"
  2818. },
  2819. "http_method": {
  2820. "description": "http 请求方式 1:get 2:post",
  2821. "type": "integer"
  2822. },
  2823. "is_used": {
  2824. "description": "是否启用 1:是 -1:否",
  2825. "type": "integer"
  2826. },
  2827. "name": {
  2828. "description": "任务名称",
  2829. "type": "string"
  2830. },
  2831. "notify_keyword": {
  2832. "description": "通知匹配关键字(多个用,分割)",
  2833. "type": "string"
  2834. },
  2835. "notify_receiver_email": {
  2836. "description": "通知者邮箱地址(多个用,分割)",
  2837. "type": "string"
  2838. },
  2839. "notify_status": {
  2840. "description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
  2841. "type": "integer"
  2842. },
  2843. "notify_type": {
  2844. "description": "通知类型 1:邮件 2:webhook",
  2845. "type": "integer"
  2846. },
  2847. "protocol": {
  2848. "description": "执行方式 1:shell 2:http",
  2849. "type": "integer"
  2850. },
  2851. "remark": {
  2852. "description": "备注",
  2853. "type": "string"
  2854. },
  2855. "retry_interval": {
  2856. "description": "重试间隔(单位:秒)",
  2857. "type": "integer"
  2858. },
  2859. "retry_times": {
  2860. "description": "重试次数",
  2861. "type": "integer"
  2862. },
  2863. "spec": {
  2864. "description": "crontab 表达式",
  2865. "type": "string"
  2866. },
  2867. "timeout": {
  2868. "description": "超时时间(单位:秒)",
  2869. "type": "integer"
  2870. }
  2871. }
  2872. },
  2873. "cron.listData": {
  2874. "type": "object",
  2875. "properties": {
  2876. "command": {
  2877. "description": "执行命令",
  2878. "type": "string"
  2879. },
  2880. "created_at": {
  2881. "description": "创建时间",
  2882. "type": "string"
  2883. },
  2884. "created_user": {
  2885. "description": "创建人",
  2886. "type": "string"
  2887. },
  2888. "hashid": {
  2889. "description": "hashid",
  2890. "type": "string"
  2891. },
  2892. "http_method": {
  2893. "description": "http 请求方式 1:get 2:post",
  2894. "type": "integer"
  2895. },
  2896. "http_method_text": {
  2897. "description": "http 请求方式",
  2898. "type": "string"
  2899. },
  2900. "id": {
  2901. "description": "ID",
  2902. "type": "integer"
  2903. },
  2904. "is_used": {
  2905. "description": "是否启用 1=启用 2=禁用",
  2906. "type": "integer"
  2907. },
  2908. "is_used_text": {
  2909. "description": "是否启用",
  2910. "type": "string"
  2911. },
  2912. "name": {
  2913. "description": "任务名称",
  2914. "type": "string"
  2915. },
  2916. "notify_status": {
  2917. "description": "执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知",
  2918. "type": "integer"
  2919. },
  2920. "notify_status_text": {
  2921. "description": "执行结束是否通知",
  2922. "type": "string"
  2923. },
  2924. "protocol": {
  2925. "description": "执行方式 1:shell 2:http",
  2926. "type": "integer"
  2927. },
  2928. "protocol_text": {
  2929. "description": "执行方式",
  2930. "type": "string"
  2931. },
  2932. "retry_interval": {
  2933. "description": "重试间隔(单位:秒)",
  2934. "type": "integer"
  2935. },
  2936. "retry_times": {
  2937. "description": "重试次数",
  2938. "type": "integer"
  2939. },
  2940. "spec": {
  2941. "description": "crontab 表达式",
  2942. "type": "string"
  2943. },
  2944. "timeout": {
  2945. "description": "超时时间(单位:秒)",
  2946. "type": "integer"
  2947. },
  2948. "updated_at": {
  2949. "description": "更新时间",
  2950. "type": "string"
  2951. },
  2952. "updated_user": {
  2953. "description": "更新人",
  2954. "type": "string"
  2955. }
  2956. }
  2957. },
  2958. "cron.listResponse": {
  2959. "type": "object",
  2960. "properties": {
  2961. "list": {
  2962. "type": "array",
  2963. "items": {
  2964. "$ref": "#/definitions/cron.listData"
  2965. }
  2966. },
  2967. "pagination": {
  2968. "type": "object",
  2969. "properties": {
  2970. "current_page": {
  2971. "type": "integer"
  2972. },
  2973. "per_page_count": {
  2974. "type": "integer"
  2975. },
  2976. "total": {
  2977. "type": "integer"
  2978. }
  2979. }
  2980. }
  2981. }
  2982. },
  2983. "cron.modifyResponse": {
  2984. "type": "object",
  2985. "properties": {
  2986. "id": {
  2987. "description": "主键ID",
  2988. "type": "integer"
  2989. }
  2990. }
  2991. },
  2992. "cron.updateUsedResponse": {
  2993. "type": "object",
  2994. "properties": {
  2995. "id": {
  2996. "description": "主键ID",
  2997. "type": "integer"
  2998. }
  2999. }
  3000. },
  3001. "helper.md5Response": {
  3002. "type": "object",
  3003. "properties": {
  3004. "md5_str": {
  3005. "description": "MD5后的字符串",
  3006. "type": "string"
  3007. }
  3008. }
  3009. },
  3010. "helper.signResponse": {
  3011. "type": "object",
  3012. "properties": {
  3013. "authorization": {
  3014. "description": "签名信息-Authorization",
  3015. "type": "string"
  3016. },
  3017. "authorization_date": {
  3018. "description": "签名信息-Authorization-Date",
  3019. "type": "string"
  3020. }
  3021. }
  3022. },
  3023. "menu.createActionResponse": {
  3024. "type": "object",
  3025. "properties": {
  3026. "id": {
  3027. "description": "主键ID",
  3028. "type": "integer"
  3029. }
  3030. }
  3031. },
  3032. "menu.createRequest": {
  3033. "type": "object",
  3034. "properties": {
  3035. "icon": {
  3036. "description": "图标",
  3037. "type": "string"
  3038. },
  3039. "id": {
  3040. "description": "ID",
  3041. "type": "string"
  3042. },
  3043. "level": {
  3044. "description": "菜单类型 1:一级菜单 2:二级菜单",
  3045. "type": "integer"
  3046. },
  3047. "link": {
  3048. "description": "链接地址",
  3049. "type": "string"
  3050. },
  3051. "name": {
  3052. "description": "菜单名称",
  3053. "type": "string"
  3054. },
  3055. "pid": {
  3056. "description": "父类ID",
  3057. "type": "integer"
  3058. }
  3059. }
  3060. },
  3061. "menu.createResponse": {
  3062. "type": "object",
  3063. "properties": {
  3064. "id": {
  3065. "description": "主键ID",
  3066. "type": "integer"
  3067. }
  3068. }
  3069. },
  3070. "menu.deleteActionResponse": {
  3071. "type": "object",
  3072. "properties": {
  3073. "id": {
  3074. "description": "主键ID",
  3075. "type": "integer"
  3076. }
  3077. }
  3078. },
  3079. "menu.deleteResponse": {
  3080. "type": "object",
  3081. "properties": {
  3082. "id": {
  3083. "description": "主键ID",
  3084. "type": "integer"
  3085. }
  3086. }
  3087. },
  3088. "menu.detailResponse": {
  3089. "type": "object",
  3090. "properties": {
  3091. "icon": {
  3092. "description": "图标",
  3093. "type": "string"
  3094. },
  3095. "id": {
  3096. "description": "主键ID",
  3097. "type": "integer"
  3098. },
  3099. "link": {
  3100. "description": "链接地址",
  3101. "type": "string"
  3102. },
  3103. "name": {
  3104. "description": "菜单名称",
  3105. "type": "string"
  3106. },
  3107. "pid": {
  3108. "description": "父类ID",
  3109. "type": "integer"
  3110. }
  3111. }
  3112. },
  3113. "menu.listActionData": {
  3114. "type": "object",
  3115. "properties": {
  3116. "api": {
  3117. "description": "调用方对接人",
  3118. "type": "string"
  3119. },
  3120. "hash_id": {
  3121. "description": "hashID",
  3122. "type": "string"
  3123. },
  3124. "menu_id": {
  3125. "description": "菜单栏ID",
  3126. "type": "integer"
  3127. },
  3128. "method": {
  3129. "description": "调用方secret",
  3130. "type": "string"
  3131. }
  3132. }
  3133. },
  3134. "menu.listActionResponse": {
  3135. "type": "object",
  3136. "properties": {
  3137. "list": {
  3138. "type": "array",
  3139. "items": {
  3140. "$ref": "#/definitions/menu.listActionData"
  3141. }
  3142. },
  3143. "menu_name": {
  3144. "type": "string"
  3145. }
  3146. }
  3147. },
  3148. "menu.listData": {
  3149. "type": "object",
  3150. "properties": {
  3151. "hashid": {
  3152. "description": "hashid",
  3153. "type": "string"
  3154. },
  3155. "icon": {
  3156. "description": "图标",
  3157. "type": "string"
  3158. },
  3159. "id": {
  3160. "description": "ID",
  3161. "type": "integer"
  3162. },
  3163. "is_used": {
  3164. "description": "是否启用 1=启用 -1=禁用",
  3165. "type": "integer"
  3166. },
  3167. "link": {
  3168. "description": "链接地址",
  3169. "type": "string"
  3170. },
  3171. "name": {
  3172. "description": "菜单名称",
  3173. "type": "string"
  3174. },
  3175. "pid": {
  3176. "description": "父类ID",
  3177. "type": "integer"
  3178. },
  3179. "sort": {
  3180. "description": "排序",
  3181. "type": "integer"
  3182. }
  3183. }
  3184. },
  3185. "menu.listResponse": {
  3186. "type": "object",
  3187. "properties": {
  3188. "list": {
  3189. "type": "array",
  3190. "items": {
  3191. "$ref": "#/definitions/menu.listData"
  3192. }
  3193. }
  3194. }
  3195. },
  3196. "menu.updateSortResponse": {
  3197. "type": "object",
  3198. "properties": {
  3199. "id": {
  3200. "description": "主键ID",
  3201. "type": "integer"
  3202. }
  3203. }
  3204. },
  3205. "menu.updateUsedResponse": {
  3206. "type": "object",
  3207. "properties": {
  3208. "id": {
  3209. "description": "主键ID",
  3210. "type": "integer"
  3211. }
  3212. }
  3213. },
  3214. "tool.dbData": {
  3215. "type": "object",
  3216. "properties": {
  3217. "db_name": {
  3218. "description": "数据库名称",
  3219. "type": "string"
  3220. }
  3221. }
  3222. },
  3223. "tool.dbsResponse": {
  3224. "type": "object",
  3225. "properties": {
  3226. "list": {
  3227. "description": "数据库列表",
  3228. "type": "array",
  3229. "items": {
  3230. "$ref": "#/definitions/tool.dbData"
  3231. }
  3232. }
  3233. }
  3234. },
  3235. "tool.hashIdsDecodeResponse": {
  3236. "type": "object",
  3237. "properties": {
  3238. "val": {
  3239. "description": "解密后的值",
  3240. "type": "integer"
  3241. }
  3242. }
  3243. },
  3244. "tool.hashIdsEncodeResponse": {
  3245. "type": "object",
  3246. "properties": {
  3247. "val": {
  3248. "description": "加密后的值",
  3249. "type": "string"
  3250. }
  3251. }
  3252. },
  3253. "tool.searchCacheResponse": {
  3254. "type": "object",
  3255. "properties": {
  3256. "ttl": {
  3257. "description": "过期时间",
  3258. "type": "string"
  3259. },
  3260. "val": {
  3261. "description": "查询后的值",
  3262. "type": "string"
  3263. }
  3264. }
  3265. },
  3266. "tool.searchMySQLResponse": {
  3267. "type": "object",
  3268. "properties": {
  3269. "cols": {
  3270. "description": "查询后的行",
  3271. "type": "array",
  3272. "items": {
  3273. "type": "string"
  3274. }
  3275. },
  3276. "cols_info": {
  3277. "description": "行信息",
  3278. "type": "array",
  3279. "items": {
  3280. "$ref": "#/definitions/tool.tableColumn"
  3281. }
  3282. },
  3283. "list": {
  3284. "description": "查询后的数据",
  3285. "type": "array",
  3286. "items": {
  3287. "type": "object",
  3288. "additionalProperties": true
  3289. }
  3290. }
  3291. }
  3292. },
  3293. "tool.sendMessageResponse": {
  3294. "type": "object",
  3295. "properties": {
  3296. "status": {
  3297. "description": "状态",
  3298. "type": "string"
  3299. }
  3300. }
  3301. },
  3302. "tool.tableColumn": {
  3303. "type": "object",
  3304. "properties": {
  3305. "column_comment": {
  3306. "description": "字段注释",
  3307. "type": "string"
  3308. },
  3309. "column_name": {
  3310. "description": "字段名称",
  3311. "type": "string"
  3312. }
  3313. }
  3314. },
  3315. "tool.tableData": {
  3316. "type": "object",
  3317. "properties": {
  3318. "table_comment": {
  3319. "description": "数据表备注",
  3320. "type": "string"
  3321. },
  3322. "table_name": {
  3323. "description": "数据表名称",
  3324. "type": "string"
  3325. }
  3326. }
  3327. },
  3328. "tool.tablesResponse": {
  3329. "type": "object",
  3330. "properties": {
  3331. "list": {
  3332. "description": "数据表列表",
  3333. "type": "array",
  3334. "items": {
  3335. "$ref": "#/definitions/tool.tableData"
  3336. }
  3337. }
  3338. }
  3339. }
  3340. },
  3341. "securityDefinitions": {
  3342. "LoginToken": {
  3343. "type": "apiKey",
  3344. "name": "token",
  3345. "in": "header"
  3346. }
  3347. }
  3348. }