swagger.json 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "This is a sample server celler server.",
  5. "title": "Swagger Example API",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {
  8. "name": "API Support",
  9. "url": "http://www.swagger.io/support",
  10. "email": "support@swagger.io"
  11. },
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "1.0"
  17. },
  18. "host": "localhost:8080",
  19. "basePath": "/v1/api",
  20. "paths": {
  21. "/v1/api/admin/login": {
  22. "post": {
  23. "description": "登录API",
  24. "consumes": [
  25. "application/json"
  26. ],
  27. "produces": [
  28. "application/json"
  29. ],
  30. "tags": [
  31. "Common"
  32. ],
  33. "summary": "登录",
  34. "parameters": [
  35. {
  36. "description": "请求body",
  37. "name": "body",
  38. "in": "body",
  39. "required": true,
  40. "schema": {
  41. "$ref": "#/definitions/admin_common.Request"
  42. }
  43. }
  44. ],
  45. "responses": {
  46. "200": {
  47. "description": "成功",
  48. "schema": {
  49. "allOf": [
  50. {
  51. "$ref": "#/definitions/response.ApiResponse"
  52. },
  53. {
  54. "type": "object",
  55. "properties": {
  56. "data": {
  57. "$ref": "#/definitions/common.UserInfo"
  58. }
  59. }
  60. }
  61. ]
  62. }
  63. },
  64. "400": {
  65. "description": "请求错误",
  66. "schema": {
  67. "$ref": "#/definitions/response.ApiResponse"
  68. }
  69. },
  70. "500": {
  71. "description": "内部错误",
  72. "schema": {
  73. "$ref": "#/definitions/response.ApiResponse"
  74. }
  75. }
  76. }
  77. }
  78. },
  79. "/v1/api/admin/permission": {
  80. "post": {
  81. "consumes": [
  82. "application/json"
  83. ],
  84. "produces": [
  85. "application/json"
  86. ],
  87. "tags": [
  88. "Permissions"
  89. ],
  90. "summary": "新增权限",
  91. "parameters": [
  92. {
  93. "type": "string",
  94. "description": "Bearer 用户令牌",
  95. "name": "Authorization",
  96. "in": "header",
  97. "required": true
  98. },
  99. {
  100. "description": "请求body",
  101. "name": "body",
  102. "in": "body",
  103. "required": true,
  104. "schema": {
  105. "$ref": "#/definitions/permission.CreateRequest"
  106. }
  107. }
  108. ],
  109. "responses": {
  110. "200": {
  111. "description": "成功",
  112. "schema": {
  113. "$ref": "#/definitions/response.ApiResponse"
  114. }
  115. },
  116. "400": {
  117. "description": "请求错误",
  118. "schema": {
  119. "$ref": "#/definitions/response.ApiResponse"
  120. }
  121. },
  122. "500": {
  123. "description": "内部错误",
  124. "schema": {
  125. "$ref": "#/definitions/response.ApiResponse"
  126. }
  127. }
  128. }
  129. }
  130. },
  131. "/v1/api/admin/permission/{permissionID}": {
  132. "get": {
  133. "consumes": [
  134. "application/json"
  135. ],
  136. "produces": [
  137. "application/json"
  138. ],
  139. "tags": [
  140. "Permissions"
  141. ],
  142. "summary": "获取权限详情",
  143. "parameters": [
  144. {
  145. "type": "string",
  146. "description": "Bearer 用户令牌",
  147. "name": "Authorization",
  148. "in": "header",
  149. "required": true
  150. },
  151. {
  152. "type": "integer",
  153. "description": "权限ID",
  154. "name": "id",
  155. "in": "path",
  156. "required": true
  157. }
  158. ],
  159. "responses": {
  160. "200": {
  161. "description": "成功",
  162. "schema": {
  163. "allOf": [
  164. {
  165. "$ref": "#/definitions/response.ApiResponse"
  166. },
  167. {
  168. "type": "object",
  169. "properties": {
  170. "data": {
  171. "$ref": "#/definitions/admin.AdminPermission"
  172. }
  173. }
  174. }
  175. ]
  176. }
  177. },
  178. "400": {
  179. "description": "请求错误",
  180. "schema": {
  181. "$ref": "#/definitions/response.ApiResponse"
  182. }
  183. },
  184. "500": {
  185. "description": "内部错误",
  186. "schema": {
  187. "$ref": "#/definitions/response.ApiResponse"
  188. }
  189. }
  190. }
  191. },
  192. "put": {
  193. "consumes": [
  194. "application/json"
  195. ],
  196. "produces": [
  197. "application/json"
  198. ],
  199. "tags": [
  200. "Permissions"
  201. ],
  202. "summary": "更新权限",
  203. "parameters": [
  204. {
  205. "type": "string",
  206. "description": "Bearer 用户令牌",
  207. "name": "Authorization",
  208. "in": "header",
  209. "required": true
  210. },
  211. {
  212. "type": "integer",
  213. "description": "权限ID",
  214. "name": "id",
  215. "in": "path",
  216. "required": true
  217. },
  218. {
  219. "description": "请求body",
  220. "name": "body",
  221. "in": "body",
  222. "required": true,
  223. "schema": {
  224. "$ref": "#/definitions/permission.UpdateRequest"
  225. }
  226. }
  227. ],
  228. "responses": {
  229. "200": {
  230. "description": "成功",
  231. "schema": {
  232. "$ref": "#/definitions/response.ApiResponse"
  233. }
  234. },
  235. "400": {
  236. "description": "请求错误",
  237. "schema": {
  238. "$ref": "#/definitions/response.ApiResponse"
  239. }
  240. },
  241. "500": {
  242. "description": "内部错误",
  243. "schema": {
  244. "$ref": "#/definitions/response.ApiResponse"
  245. }
  246. }
  247. }
  248. },
  249. "delete": {
  250. "consumes": [
  251. "application/json"
  252. ],
  253. "produces": [
  254. "application/json"
  255. ],
  256. "tags": [
  257. "Permissions"
  258. ],
  259. "summary": "删除权限",
  260. "parameters": [
  261. {
  262. "type": "string",
  263. "description": "Bearer 用户令牌",
  264. "name": "Authorization",
  265. "in": "header",
  266. "required": true
  267. },
  268. {
  269. "type": "integer",
  270. "description": "权限ID",
  271. "name": "id",
  272. "in": "path",
  273. "required": true
  274. }
  275. ],
  276. "responses": {
  277. "200": {
  278. "description": "成功",
  279. "schema": {
  280. "$ref": "#/definitions/response.ApiResponse"
  281. }
  282. },
  283. "400": {
  284. "description": "请求错误",
  285. "schema": {
  286. "$ref": "#/definitions/response.ApiResponse"
  287. }
  288. },
  289. "500": {
  290. "description": "内部错误",
  291. "schema": {
  292. "$ref": "#/definitions/response.ApiResponse"
  293. }
  294. }
  295. }
  296. }
  297. },
  298. "/v1/api/admin/permission/{permissionID}/toggle": {
  299. "put": {
  300. "consumes": [
  301. "application/json"
  302. ],
  303. "produces": [
  304. "application/json"
  305. ],
  306. "tags": [
  307. "Permissions"
  308. ],
  309. "summary": "启用/禁用",
  310. "parameters": [
  311. {
  312. "type": "string",
  313. "description": "Bearer 用户令牌",
  314. "name": "Authorization",
  315. "in": "header",
  316. "required": true
  317. },
  318. {
  319. "description": "请求body",
  320. "name": "body",
  321. "in": "body",
  322. "required": true,
  323. "schema": {
  324. "$ref": "#/definitions/permission.ToggleRequest"
  325. }
  326. }
  327. ],
  328. "responses": {
  329. "200": {
  330. "description": "成功",
  331. "schema": {
  332. "$ref": "#/definitions/response.ApiResponse"
  333. }
  334. },
  335. "400": {
  336. "description": "请求错误",
  337. "schema": {
  338. "$ref": "#/definitions/response.ApiResponse"
  339. }
  340. },
  341. "500": {
  342. "description": "内部错误",
  343. "schema": {
  344. "$ref": "#/definitions/response.ApiResponse"
  345. }
  346. }
  347. }
  348. }
  349. },
  350. "/v1/api/admin/permissions": {
  351. "get": {
  352. "consumes": [
  353. "application/json"
  354. ],
  355. "produces": [
  356. "application/json"
  357. ],
  358. "tags": [
  359. "Permissions"
  360. ],
  361. "summary": "权限列表",
  362. "parameters": [
  363. {
  364. "type": "string",
  365. "description": "Bearer 用户令牌",
  366. "name": "Authorization",
  367. "in": "header",
  368. "required": true
  369. },
  370. {
  371. "type": "integer",
  372. "description": "页码",
  373. "name": "page",
  374. "in": "query",
  375. "required": true
  376. },
  377. {
  378. "type": "integer",
  379. "description": "每页数量",
  380. "name": "page_size",
  381. "in": "query",
  382. "required": true
  383. },
  384. {
  385. "type": "string",
  386. "description": "关键字",
  387. "name": "keyword",
  388. "in": "query"
  389. },
  390. {
  391. "enum": [
  392. "enabled",
  393. "disabled"
  394. ],
  395. "type": "string",
  396. "description": "状态",
  397. "name": "status",
  398. "in": "query"
  399. }
  400. ],
  401. "responses": {
  402. "200": {
  403. "description": "成功",
  404. "schema": {
  405. "allOf": [
  406. {
  407. "$ref": "#/definitions/response.ApiResponse"
  408. },
  409. {
  410. "type": "object",
  411. "properties": {
  412. "data": {
  413. "$ref": "#/definitions/permission.ListResponse"
  414. }
  415. }
  416. }
  417. ]
  418. }
  419. },
  420. "400": {
  421. "description": "请求错误",
  422. "schema": {
  423. "$ref": "#/definitions/response.ApiResponse"
  424. }
  425. },
  426. "500": {
  427. "description": "内部错误",
  428. "schema": {
  429. "$ref": "#/definitions/response.ApiResponse"
  430. }
  431. }
  432. }
  433. }
  434. },
  435. "/v1/api/admin/profile": {
  436. "get": {
  437. "description": "查询个人信息",
  438. "consumes": [
  439. "application/json"
  440. ],
  441. "produces": [
  442. "application/json"
  443. ],
  444. "tags": [
  445. "Common"
  446. ],
  447. "summary": "获取个人信息",
  448. "parameters": [
  449. {
  450. "type": "string",
  451. "description": "Bearer 用户令牌",
  452. "name": "Authorization",
  453. "in": "header",
  454. "required": true
  455. }
  456. ],
  457. "responses": {
  458. "200": {
  459. "description": "成功",
  460. "schema": {
  461. "allOf": [
  462. {
  463. "$ref": "#/definitions/response.ApiResponse"
  464. },
  465. {
  466. "type": "object",
  467. "properties": {
  468. "data": {
  469. "$ref": "#/definitions/common.UserInfo"
  470. }
  471. }
  472. }
  473. ]
  474. }
  475. },
  476. "400": {
  477. "description": "请求错误",
  478. "schema": {
  479. "$ref": "#/definitions/response.ApiResponse"
  480. }
  481. },
  482. "500": {
  483. "description": "内部错误",
  484. "schema": {
  485. "$ref": "#/definitions/response.ApiResponse"
  486. }
  487. }
  488. }
  489. },
  490. "post": {
  491. "consumes": [
  492. "application/json"
  493. ],
  494. "produces": [
  495. "application/json"
  496. ],
  497. "tags": [
  498. "Common"
  499. ],
  500. "summary": "退出登录",
  501. "parameters": [
  502. {
  503. "type": "string",
  504. "description": "Bearer 用户令牌",
  505. "name": "Authorization",
  506. "in": "header",
  507. "required": true
  508. }
  509. ],
  510. "responses": {
  511. "200": {
  512. "description": "成功",
  513. "schema": {
  514. "$ref": "#/definitions/response.ApiResponse"
  515. }
  516. },
  517. "400": {
  518. "description": "请求错误",
  519. "schema": {
  520. "$ref": "#/definitions/response.ApiResponse"
  521. }
  522. },
  523. "500": {
  524. "description": "内部错误",
  525. "schema": {
  526. "$ref": "#/definitions/response.ApiResponse"
  527. }
  528. }
  529. }
  530. }
  531. },
  532. "/v1/api/admin/role": {
  533. "post": {
  534. "description": "创建角色",
  535. "consumes": [
  536. "application/json"
  537. ],
  538. "produces": [
  539. "application/json"
  540. ],
  541. "tags": [
  542. "Role 角色管理"
  543. ],
  544. "summary": "新增角色",
  545. "parameters": [
  546. {
  547. "type": "string",
  548. "description": "Bearer 用户令牌",
  549. "name": "Authorization",
  550. "in": "header",
  551. "required": true
  552. },
  553. {
  554. "description": "请求body",
  555. "name": "body",
  556. "in": "body",
  557. "required": true,
  558. "schema": {
  559. "$ref": "#/definitions/admin_role.CreateAdminRoleRequest"
  560. }
  561. }
  562. ],
  563. "responses": {
  564. "200": {
  565. "description": "成功",
  566. "schema": {
  567. "$ref": "#/definitions/response.ApiResponse"
  568. }
  569. },
  570. "400": {
  571. "description": "请求错误",
  572. "schema": {
  573. "$ref": "#/definitions/response.ApiResponse"
  574. }
  575. },
  576. "500": {
  577. "description": "内部错误",
  578. "schema": {
  579. "$ref": "#/definitions/response.ApiResponse"
  580. }
  581. }
  582. }
  583. }
  584. },
  585. "/v1/api/admin/role/labels": {
  586. "get": {
  587. "description": "获取所有已启用角色列表",
  588. "consumes": [
  589. "application/json"
  590. ],
  591. "produces": [
  592. "application/json"
  593. ],
  594. "tags": [
  595. "Role 角色管理"
  596. ],
  597. "summary": "已启用角色列表",
  598. "parameters": [
  599. {
  600. "type": "string",
  601. "description": "Bearer 用户令牌",
  602. "name": "Authorization",
  603. "in": "header",
  604. "required": true
  605. }
  606. ],
  607. "responses": {
  608. "200": {
  609. "description": "成功",
  610. "schema": {
  611. "allOf": [
  612. {
  613. "$ref": "#/definitions/response.ApiResponse"
  614. },
  615. {
  616. "type": "object",
  617. "properties": {
  618. "data": {
  619. "$ref": "#/definitions/admin_role.EnabledRoles"
  620. }
  621. }
  622. }
  623. ]
  624. }
  625. },
  626. "400": {
  627. "description": "请求错误",
  628. "schema": {
  629. "$ref": "#/definitions/response.ApiResponse"
  630. }
  631. },
  632. "500": {
  633. "description": "内部错误",
  634. "schema": {
  635. "$ref": "#/definitions/response.ApiResponse"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "/v1/api/admin/role/{roleID}": {
  642. "get": {
  643. "description": "获取角色详情",
  644. "consumes": [
  645. "application/json"
  646. ],
  647. "produces": [
  648. "application/json"
  649. ],
  650. "tags": [
  651. "Role 角色管理"
  652. ],
  653. "summary": "详情",
  654. "parameters": [
  655. {
  656. "type": "string",
  657. "description": "Bearer 用户令牌",
  658. "name": "Authorization",
  659. "in": "header",
  660. "required": true
  661. },
  662. {
  663. "type": "integer",
  664. "description": "角色ID",
  665. "name": "id",
  666. "in": "path",
  667. "required": true
  668. }
  669. ],
  670. "responses": {
  671. "200": {
  672. "description": "成功",
  673. "schema": {
  674. "allOf": [
  675. {
  676. "$ref": "#/definitions/response.ApiResponse"
  677. },
  678. {
  679. "type": "object",
  680. "properties": {
  681. "data": {
  682. "$ref": "#/definitions/admin.RoleItem"
  683. }
  684. }
  685. }
  686. ]
  687. }
  688. },
  689. "400": {
  690. "description": "请求错误",
  691. "schema": {
  692. "$ref": "#/definitions/response.ApiResponse"
  693. }
  694. },
  695. "500": {
  696. "description": "内部错误",
  697. "schema": {
  698. "$ref": "#/definitions/response.ApiResponse"
  699. }
  700. }
  701. }
  702. },
  703. "put": {
  704. "description": "更新角色内容",
  705. "consumes": [
  706. "application/json"
  707. ],
  708. "produces": [
  709. "application/json"
  710. ],
  711. "tags": [
  712. "Role 角色管理"
  713. ],
  714. "summary": "更新角色",
  715. "parameters": [
  716. {
  717. "type": "string",
  718. "description": "Bearer 用户令牌",
  719. "name": "Authorization",
  720. "in": "header",
  721. "required": true
  722. },
  723. {
  724. "type": "integer",
  725. "description": "角色ID",
  726. "name": "id",
  727. "in": "path",
  728. "required": true
  729. },
  730. {
  731. "description": "请求body",
  732. "name": "body",
  733. "in": "body",
  734. "required": true,
  735. "schema": {
  736. "$ref": "#/definitions/admin_role.UpdateRequest"
  737. }
  738. }
  739. ],
  740. "responses": {
  741. "200": {
  742. "description": "成功",
  743. "schema": {
  744. "$ref": "#/definitions/response.ApiResponse"
  745. }
  746. },
  747. "400": {
  748. "description": "请求错误",
  749. "schema": {
  750. "$ref": "#/definitions/response.ApiResponse"
  751. }
  752. },
  753. "500": {
  754. "description": "内部错误",
  755. "schema": {
  756. "$ref": "#/definitions/response.ApiResponse"
  757. }
  758. }
  759. }
  760. },
  761. "delete": {
  762. "description": "删除角色",
  763. "consumes": [
  764. "application/json"
  765. ],
  766. "produces": [
  767. "application/json"
  768. ],
  769. "tags": [
  770. "Role 角色管理"
  771. ],
  772. "summary": "删除",
  773. "parameters": [
  774. {
  775. "type": "string",
  776. "description": "Bearer 用户令牌",
  777. "name": "Authorization",
  778. "in": "header",
  779. "required": true
  780. },
  781. {
  782. "type": "integer",
  783. "description": "角色ID",
  784. "name": "id",
  785. "in": "path",
  786. "required": true
  787. }
  788. ],
  789. "responses": {
  790. "200": {
  791. "description": "成功",
  792. "schema": {
  793. "$ref": "#/definitions/response.ApiResponse"
  794. }
  795. },
  796. "400": {
  797. "description": "请求错误",
  798. "schema": {
  799. "$ref": "#/definitions/response.ApiResponse"
  800. }
  801. },
  802. "500": {
  803. "description": "内部错误",
  804. "schema": {
  805. "$ref": "#/definitions/response.ApiResponse"
  806. }
  807. }
  808. }
  809. }
  810. },
  811. "/v1/api/admin/role/{roleID}/toggle": {
  812. "put": {
  813. "consumes": [
  814. "application/json"
  815. ],
  816. "produces": [
  817. "application/json"
  818. ],
  819. "tags": [
  820. "Role 角色管理"
  821. ],
  822. "summary": "启用/禁用",
  823. "parameters": [
  824. {
  825. "type": "string",
  826. "description": "Bearer 用户令牌",
  827. "name": "Authorization",
  828. "in": "header",
  829. "required": true
  830. },
  831. {
  832. "description": "请求body",
  833. "name": "body",
  834. "in": "body",
  835. "required": true,
  836. "schema": {
  837. "$ref": "#/definitions/admin_role.ToggleRequest"
  838. }
  839. }
  840. ],
  841. "responses": {
  842. "200": {
  843. "description": "成功",
  844. "schema": {
  845. "$ref": "#/definitions/response.ApiResponse"
  846. }
  847. },
  848. "400": {
  849. "description": "请求错误",
  850. "schema": {
  851. "$ref": "#/definitions/response.ApiResponse"
  852. }
  853. },
  854. "500": {
  855. "description": "内部错误",
  856. "schema": {
  857. "$ref": "#/definitions/response.ApiResponse"
  858. }
  859. }
  860. }
  861. }
  862. },
  863. "/v1/api/admin/roles": {
  864. "get": {
  865. "description": "获取角色列表",
  866. "consumes": [
  867. "application/json"
  868. ],
  869. "produces": [
  870. "application/json"
  871. ],
  872. "tags": [
  873. "Role 角色管理"
  874. ],
  875. "summary": "角色列表",
  876. "parameters": [
  877. {
  878. "type": "string",
  879. "description": "Bearer 用户令牌",
  880. "name": "Authorization",
  881. "in": "header",
  882. "required": true
  883. },
  884. {
  885. "type": "integer",
  886. "description": "页码",
  887. "name": "page",
  888. "in": "query",
  889. "required": true
  890. },
  891. {
  892. "type": "integer",
  893. "description": "每页数量",
  894. "name": "page_size",
  895. "in": "query",
  896. "required": true
  897. },
  898. {
  899. "type": "string",
  900. "description": "关键字",
  901. "name": "keyword",
  902. "in": "query"
  903. },
  904. {
  905. "enum": [
  906. "enabled",
  907. "disabled"
  908. ],
  909. "type": "string",
  910. "description": "状态",
  911. "name": "status",
  912. "in": "query"
  913. }
  914. ],
  915. "responses": {
  916. "200": {
  917. "description": "成功",
  918. "schema": {
  919. "allOf": [
  920. {
  921. "$ref": "#/definitions/response.ApiResponse"
  922. },
  923. {
  924. "type": "object",
  925. "properties": {
  926. "data": {
  927. "$ref": "#/definitions/admin_role.ListAdminRolesResponse"
  928. }
  929. }
  930. }
  931. ]
  932. }
  933. },
  934. "400": {
  935. "description": "请求错误",
  936. "schema": {
  937. "$ref": "#/definitions/response.ApiResponse"
  938. }
  939. },
  940. "500": {
  941. "description": "内部错误",
  942. "schema": {
  943. "$ref": "#/definitions/response.ApiResponse"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "/v1/api/admin/user": {
  950. "post": {
  951. "description": "创建用户",
  952. "consumes": [
  953. "application/json"
  954. ],
  955. "produces": [
  956. "application/json"
  957. ],
  958. "tags": [
  959. "User 用户管理"
  960. ],
  961. "summary": "新增用户",
  962. "parameters": [
  963. {
  964. "type": "string",
  965. "description": "Bearer 用户令牌",
  966. "name": "Authorization",
  967. "in": "header",
  968. "required": true
  969. },
  970. {
  971. "description": "请求body",
  972. "name": "body",
  973. "in": "body",
  974. "required": true,
  975. "schema": {
  976. "$ref": "#/definitions/admin_user.UserRequest"
  977. }
  978. }
  979. ],
  980. "responses": {
  981. "200": {
  982. "description": "成功",
  983. "schema": {
  984. "$ref": "#/definitions/response.ApiResponse"
  985. }
  986. },
  987. "400": {
  988. "description": "请求错误",
  989. "schema": {
  990. "$ref": "#/definitions/response.ApiResponse"
  991. }
  992. },
  993. "500": {
  994. "description": "内部错误",
  995. "schema": {
  996. "$ref": "#/definitions/response.ApiResponse"
  997. }
  998. }
  999. }
  1000. }
  1001. },
  1002. "/v1/api/admin/user/labels": {
  1003. "get": {
  1004. "description": "获取所有已启用 用户列表",
  1005. "consumes": [
  1006. "application/json"
  1007. ],
  1008. "produces": [
  1009. "application/json"
  1010. ],
  1011. "tags": [
  1012. "User 用户管理"
  1013. ],
  1014. "summary": "已启用 用户列表",
  1015. "parameters": [
  1016. {
  1017. "type": "string",
  1018. "description": "Bearer 用户令牌",
  1019. "name": "Authorization",
  1020. "in": "header",
  1021. "required": true
  1022. }
  1023. ],
  1024. "responses": {
  1025. "200": {
  1026. "description": "成功",
  1027. "schema": {
  1028. "allOf": [
  1029. {
  1030. "$ref": "#/definitions/response.ApiResponse"
  1031. },
  1032. {
  1033. "type": "object",
  1034. "properties": {
  1035. "data": {
  1036. "type": "array",
  1037. "items": {
  1038. "$ref": "#/definitions/admin_user.EnabledUserItem"
  1039. }
  1040. }
  1041. }
  1042. }
  1043. ]
  1044. }
  1045. },
  1046. "400": {
  1047. "description": "请求错误",
  1048. "schema": {
  1049. "$ref": "#/definitions/response.ApiResponse"
  1050. }
  1051. },
  1052. "500": {
  1053. "description": "内部错误",
  1054. "schema": {
  1055. "$ref": "#/definitions/response.ApiResponse"
  1056. }
  1057. }
  1058. }
  1059. }
  1060. },
  1061. "/v1/api/admin/user/{id}": {
  1062. "get": {
  1063. "description": "获取用户详情",
  1064. "consumes": [
  1065. "application/json"
  1066. ],
  1067. "produces": [
  1068. "application/json"
  1069. ],
  1070. "tags": [
  1071. "User 用户管理"
  1072. ],
  1073. "summary": "详情",
  1074. "parameters": [
  1075. {
  1076. "type": "string",
  1077. "description": "Bearer 用户令牌",
  1078. "name": "Authorization",
  1079. "in": "header",
  1080. "required": true
  1081. },
  1082. {
  1083. "type": "integer",
  1084. "description": "角色ID",
  1085. "name": "id",
  1086. "in": "path",
  1087. "required": true
  1088. }
  1089. ],
  1090. "responses": {
  1091. "200": {
  1092. "description": "成功",
  1093. "schema": {
  1094. "allOf": [
  1095. {
  1096. "$ref": "#/definitions/response.ApiResponse"
  1097. },
  1098. {
  1099. "type": "object",
  1100. "properties": {
  1101. "data": {
  1102. "$ref": "#/definitions/authorization_client.GetAdminUser"
  1103. }
  1104. }
  1105. }
  1106. ]
  1107. }
  1108. },
  1109. "400": {
  1110. "description": "请求错误",
  1111. "schema": {
  1112. "$ref": "#/definitions/response.ApiResponse"
  1113. }
  1114. },
  1115. "500": {
  1116. "description": "内部错误",
  1117. "schema": {
  1118. "$ref": "#/definitions/response.ApiResponse"
  1119. }
  1120. }
  1121. }
  1122. }
  1123. },
  1124. "/v1/api/admin/user/{userID}": {
  1125. "put": {
  1126. "description": "更新用户内容",
  1127. "consumes": [
  1128. "application/json"
  1129. ],
  1130. "produces": [
  1131. "application/json"
  1132. ],
  1133. "tags": [
  1134. "User 用户管理"
  1135. ],
  1136. "summary": "修改个人信息",
  1137. "parameters": [
  1138. {
  1139. "type": "string",
  1140. "description": "Bearer 用户令牌",
  1141. "name": "Authorization",
  1142. "in": "header",
  1143. "required": true
  1144. },
  1145. {
  1146. "type": "integer",
  1147. "description": "角色ID",
  1148. "name": "id",
  1149. "in": "path",
  1150. "required": true
  1151. },
  1152. {
  1153. "description": "请求body",
  1154. "name": "body",
  1155. "in": "body",
  1156. "required": true,
  1157. "schema": {
  1158. "$ref": "#/definitions/admin_user.UpdateRequest"
  1159. }
  1160. }
  1161. ],
  1162. "responses": {
  1163. "200": {
  1164. "description": "成功",
  1165. "schema": {
  1166. "$ref": "#/definitions/response.ApiResponse"
  1167. }
  1168. },
  1169. "400": {
  1170. "description": "请求错误",
  1171. "schema": {
  1172. "$ref": "#/definitions/response.ApiResponse"
  1173. }
  1174. },
  1175. "500": {
  1176. "description": "内部错误",
  1177. "schema": {
  1178. "$ref": "#/definitions/response.ApiResponse"
  1179. }
  1180. }
  1181. }
  1182. },
  1183. "delete": {
  1184. "description": "删除管理员",
  1185. "consumes": [
  1186. "application/json"
  1187. ],
  1188. "produces": [
  1189. "application/json"
  1190. ],
  1191. "tags": [
  1192. "User 用户管理"
  1193. ],
  1194. "summary": "删除",
  1195. "parameters": [
  1196. {
  1197. "type": "string",
  1198. "description": "Bearer 用户令牌",
  1199. "name": "Authorization",
  1200. "in": "header",
  1201. "required": true
  1202. },
  1203. {
  1204. "type": "integer",
  1205. "description": "用户ID",
  1206. "name": "id",
  1207. "in": "path",
  1208. "required": true
  1209. }
  1210. ],
  1211. "responses": {
  1212. "200": {
  1213. "description": "成功",
  1214. "schema": {
  1215. "$ref": "#/definitions/response.ApiResponse"
  1216. }
  1217. },
  1218. "400": {
  1219. "description": "请求错误",
  1220. "schema": {
  1221. "$ref": "#/definitions/response.ApiResponse"
  1222. }
  1223. },
  1224. "500": {
  1225. "description": "内部错误",
  1226. "schema": {
  1227. "$ref": "#/definitions/response.ApiResponse"
  1228. }
  1229. }
  1230. }
  1231. }
  1232. },
  1233. "/v1/api/admin/user/{userID}/toggle": {
  1234. "put": {
  1235. "consumes": [
  1236. "application/json"
  1237. ],
  1238. "produces": [
  1239. "application/json"
  1240. ],
  1241. "tags": [
  1242. "User 用户管理"
  1243. ],
  1244. "summary": "启用/禁用",
  1245. "parameters": [
  1246. {
  1247. "type": "string",
  1248. "description": "Bearer 用户令牌",
  1249. "name": "Authorization",
  1250. "in": "header",
  1251. "required": true
  1252. },
  1253. {
  1254. "description": "请求body",
  1255. "name": "body",
  1256. "in": "body",
  1257. "required": true,
  1258. "schema": {
  1259. "$ref": "#/definitions/admin_user.ToggleRequest"
  1260. }
  1261. }
  1262. ],
  1263. "responses": {
  1264. "200": {
  1265. "description": "成功",
  1266. "schema": {
  1267. "$ref": "#/definitions/response.ApiResponse"
  1268. }
  1269. },
  1270. "400": {
  1271. "description": "请求错误",
  1272. "schema": {
  1273. "$ref": "#/definitions/response.ApiResponse"
  1274. }
  1275. },
  1276. "500": {
  1277. "description": "内部错误",
  1278. "schema": {
  1279. "$ref": "#/definitions/response.ApiResponse"
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "/v1/api/admin/users": {
  1286. "get": {
  1287. "description": "获取用户列表",
  1288. "consumes": [
  1289. "application/json"
  1290. ],
  1291. "produces": [
  1292. "application/json"
  1293. ],
  1294. "tags": [
  1295. "User 用户管理"
  1296. ],
  1297. "summary": "用户列表",
  1298. "parameters": [
  1299. {
  1300. "type": "string",
  1301. "description": "Bearer 用户令牌",
  1302. "name": "Authorization",
  1303. "in": "header",
  1304. "required": true
  1305. },
  1306. {
  1307. "type": "integer",
  1308. "description": "页码",
  1309. "name": "page",
  1310. "in": "query",
  1311. "required": true
  1312. },
  1313. {
  1314. "type": "integer",
  1315. "description": "每页数量",
  1316. "name": "page_size",
  1317. "in": "query",
  1318. "required": true
  1319. },
  1320. {
  1321. "type": "string",
  1322. "description": "关键字",
  1323. "name": "keyword",
  1324. "in": "query"
  1325. },
  1326. {
  1327. "enum": [
  1328. "enabled",
  1329. "disabled"
  1330. ],
  1331. "type": "string",
  1332. "description": "状态",
  1333. "name": "status",
  1334. "in": "query"
  1335. }
  1336. ],
  1337. "responses": {
  1338. "200": {
  1339. "description": "成功",
  1340. "schema": {
  1341. "allOf": [
  1342. {
  1343. "$ref": "#/definitions/response.ApiResponse"
  1344. },
  1345. {
  1346. "type": "object",
  1347. "properties": {
  1348. "data": {
  1349. "$ref": "#/definitions/admin_user.ListAdminUserResponse"
  1350. }
  1351. }
  1352. }
  1353. ]
  1354. }
  1355. },
  1356. "400": {
  1357. "description": "请求错误",
  1358. "schema": {
  1359. "$ref": "#/definitions/response.ApiResponse"
  1360. }
  1361. },
  1362. "500": {
  1363. "description": "内部错误",
  1364. "schema": {
  1365. "$ref": "#/definitions/response.ApiResponse"
  1366. }
  1367. }
  1368. }
  1369. }
  1370. }
  1371. },
  1372. "definitions": {
  1373. "admin.AdminPermission": {
  1374. "type": "object",
  1375. "properties": {
  1376. "created_at": {
  1377. "type": "string"
  1378. },
  1379. "created_by": {
  1380. "type": "string"
  1381. },
  1382. "description": {
  1383. "type": "string"
  1384. },
  1385. "endpoint": {
  1386. "type": "string"
  1387. },
  1388. "id": {
  1389. "type": "integer"
  1390. },
  1391. "is_reserved": {
  1392. "type": "boolean"
  1393. },
  1394. "name": {
  1395. "type": "string"
  1396. },
  1397. "roles": {
  1398. "type": "array",
  1399. "items": {
  1400. "$ref": "#/definitions/base.ListMapItem"
  1401. }
  1402. },
  1403. "status": {
  1404. "description": "可以是 \"enabled\", \"disabled\", \"deleted\" 等",
  1405. "type": "string"
  1406. },
  1407. "updated_at": {
  1408. "type": "string"
  1409. },
  1410. "updated_by": {
  1411. "type": "string"
  1412. }
  1413. }
  1414. },
  1415. "admin.RoleItem": {
  1416. "type": "object",
  1417. "properties": {
  1418. "created_at": {
  1419. "description": "创建时间",
  1420. "type": "string"
  1421. },
  1422. "created_by": {
  1423. "description": "创建人",
  1424. "type": "string"
  1425. },
  1426. "description": {
  1427. "description": "描述",
  1428. "type": "string"
  1429. },
  1430. "id": {
  1431. "type": "integer"
  1432. },
  1433. "is_reserved": {
  1434. "description": "是否可操作",
  1435. "type": "boolean"
  1436. },
  1437. "name": {
  1438. "description": "名称",
  1439. "type": "string"
  1440. },
  1441. "permissions": {
  1442. "description": "权限",
  1443. "type": "array",
  1444. "items": {
  1445. "$ref": "#/definitions/base.ListMapItem"
  1446. }
  1447. },
  1448. "status": {
  1449. "description": "\"enabled\", \"disabled\"",
  1450. "type": "string"
  1451. },
  1452. "updated_at": {
  1453. "description": "更新时间",
  1454. "type": "string"
  1455. },
  1456. "users": {
  1457. "description": "关联用户",
  1458. "type": "array",
  1459. "items": {
  1460. "$ref": "#/definitions/base.ListMapItem"
  1461. }
  1462. }
  1463. }
  1464. },
  1465. "admin.UserItem": {
  1466. "type": "object",
  1467. "properties": {
  1468. "avatar": {
  1469. "description": "头像",
  1470. "type": "string"
  1471. },
  1472. "created_at": {
  1473. "description": "创建时间",
  1474. "type": "string"
  1475. },
  1476. "email": {
  1477. "description": "邮箱",
  1478. "type": "string"
  1479. },
  1480. "id": {
  1481. "type": "integer"
  1482. },
  1483. "is_reserved": {
  1484. "type": "boolean"
  1485. },
  1486. "name": {
  1487. "description": "名称",
  1488. "type": "string"
  1489. },
  1490. "phone_number": {
  1491. "description": "手机号",
  1492. "type": "string"
  1493. },
  1494. "roles": {
  1495. "description": "角色",
  1496. "type": "array",
  1497. "items": {
  1498. "$ref": "#/definitions/base.ListMapItem"
  1499. }
  1500. },
  1501. "status": {
  1502. "description": "状态 \"enabled\"|\"disabled\"",
  1503. "allOf": [
  1504. {
  1505. "$ref": "#/definitions/base.Status"
  1506. }
  1507. ]
  1508. },
  1509. "teams": {
  1510. "description": "团队",
  1511. "type": "array",
  1512. "items": {
  1513. "$ref": "#/definitions/base.ListMapItem"
  1514. }
  1515. },
  1516. "updated_at": {
  1517. "description": "更新时间",
  1518. "type": "string"
  1519. }
  1520. }
  1521. },
  1522. "admin_common.Request": {
  1523. "type": "object",
  1524. "required": [
  1525. "password",
  1526. "username"
  1527. ],
  1528. "properties": {
  1529. "password": {
  1530. "description": "密码",
  1531. "type": "string",
  1532. "maxLength": 18,
  1533. "minLength": 6
  1534. },
  1535. "username": {
  1536. "description": "用户名",
  1537. "type": "string",
  1538. "maxLength": 15,
  1539. "minLength": 5
  1540. }
  1541. }
  1542. },
  1543. "admin_role.CreateAdminRoleRequest": {
  1544. "type": "object",
  1545. "required": [
  1546. "name"
  1547. ],
  1548. "properties": {
  1549. "description": {
  1550. "description": "非必填,描述",
  1551. "type": "string"
  1552. },
  1553. "name": {
  1554. "description": "角色名称",
  1555. "type": "string",
  1556. "maxLength": 15,
  1557. "minLength": 3
  1558. },
  1559. "permissions": {
  1560. "description": "权限",
  1561. "type": "array",
  1562. "items": {
  1563. "type": "integer"
  1564. }
  1565. },
  1566. "users": {
  1567. "description": "管理员",
  1568. "type": "array",
  1569. "items": {
  1570. "type": "integer"
  1571. }
  1572. }
  1573. }
  1574. },
  1575. "admin_role.EnabledRoleItem": {
  1576. "type": "object",
  1577. "properties": {
  1578. "description": {
  1579. "type": "string"
  1580. },
  1581. "id": {
  1582. "type": "integer"
  1583. },
  1584. "name": {
  1585. "type": "string"
  1586. }
  1587. }
  1588. },
  1589. "admin_role.EnabledRoles": {
  1590. "type": "object",
  1591. "properties": {
  1592. "roles": {
  1593. "type": "array",
  1594. "items": {
  1595. "$ref": "#/definitions/admin_role.EnabledRoleItem"
  1596. }
  1597. }
  1598. }
  1599. },
  1600. "admin_role.ListAdminRolesResponse": {
  1601. "type": "object",
  1602. "properties": {
  1603. "items": {
  1604. "type": "array",
  1605. "items": {
  1606. "$ref": "#/definitions/admin.RoleItem"
  1607. }
  1608. },
  1609. "total_count": {
  1610. "type": "integer"
  1611. }
  1612. }
  1613. },
  1614. "admin_role.ToggleRequest": {
  1615. "type": "object",
  1616. "required": [
  1617. "status"
  1618. ],
  1619. "properties": {
  1620. "status": {
  1621. "description": "\"enabled\"|\"disabled\"",
  1622. "allOf": [
  1623. {
  1624. "$ref": "#/definitions/base.Status"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. },
  1630. "admin_role.UpdateRequest": {
  1631. "type": "object",
  1632. "properties": {
  1633. "description": {
  1634. "description": "非必填,描述",
  1635. "type": "string"
  1636. },
  1637. "permissions": {
  1638. "description": "权限",
  1639. "type": "array",
  1640. "items": {
  1641. "type": "integer"
  1642. }
  1643. },
  1644. "users": {
  1645. "description": "管理员",
  1646. "type": "array",
  1647. "items": {
  1648. "type": "integer"
  1649. }
  1650. }
  1651. }
  1652. },
  1653. "admin_user.EnabledUserItem": {
  1654. "type": "object",
  1655. "properties": {
  1656. "id": {
  1657. "type": "integer"
  1658. },
  1659. "name": {
  1660. "type": "string"
  1661. }
  1662. }
  1663. },
  1664. "admin_user.ListAdminUserResponse": {
  1665. "type": "object",
  1666. "properties": {
  1667. "items": {
  1668. "type": "array",
  1669. "items": {
  1670. "$ref": "#/definitions/admin.UserItem"
  1671. }
  1672. },
  1673. "total_count": {
  1674. "type": "integer"
  1675. }
  1676. }
  1677. },
  1678. "admin_user.ToggleRequest": {
  1679. "type": "object",
  1680. "required": [
  1681. "status"
  1682. ],
  1683. "properties": {
  1684. "status": {
  1685. "description": "\"enabled\"|\"disabled\"",
  1686. "allOf": [
  1687. {
  1688. "$ref": "#/definitions/base.Status"
  1689. }
  1690. ]
  1691. }
  1692. }
  1693. },
  1694. "admin_user.UpdateRequest": {
  1695. "type": "object",
  1696. "required": [
  1697. "email",
  1698. "phone_number"
  1699. ],
  1700. "properties": {
  1701. "avatar": {
  1702. "description": "头像",
  1703. "type": "string"
  1704. },
  1705. "email": {
  1706. "description": "邮箱",
  1707. "type": "string"
  1708. },
  1709. "phone_number": {
  1710. "description": "手机号",
  1711. "type": "string"
  1712. },
  1713. "roles": {
  1714. "description": "角色ID",
  1715. "type": "array",
  1716. "items": {
  1717. "type": "integer"
  1718. }
  1719. },
  1720. "teams": {
  1721. "description": "团队ID",
  1722. "type": "array",
  1723. "items": {
  1724. "type": "integer"
  1725. }
  1726. }
  1727. }
  1728. },
  1729. "admin_user.UserRequest": {
  1730. "type": "object",
  1731. "required": [
  1732. "password",
  1733. "phone_number",
  1734. "username"
  1735. ],
  1736. "properties": {
  1737. "avatar": {
  1738. "description": "头像",
  1739. "type": "string"
  1740. },
  1741. "email": {
  1742. "description": "邮箱",
  1743. "type": "string"
  1744. },
  1745. "password": {
  1746. "description": "密码",
  1747. "type": "string",
  1748. "maxLength": 18,
  1749. "minLength": 6
  1750. },
  1751. "phone_number": {
  1752. "description": "手机号",
  1753. "type": "string"
  1754. },
  1755. "roles": {
  1756. "description": "角色ID",
  1757. "type": "array",
  1758. "items": {
  1759. "type": "integer"
  1760. }
  1761. },
  1762. "teams": {
  1763. "description": "团队ID",
  1764. "type": "array",
  1765. "items": {
  1766. "type": "integer"
  1767. }
  1768. },
  1769. "username": {
  1770. "description": "用户名",
  1771. "type": "string",
  1772. "maxLength": 15,
  1773. "minLength": 5
  1774. }
  1775. }
  1776. },
  1777. "authorization_client.AdminUserBase": {
  1778. "type": "object",
  1779. "properties": {
  1780. "key": {
  1781. "type": "string"
  1782. },
  1783. "value": {
  1784. "type": "string"
  1785. }
  1786. }
  1787. },
  1788. "authorization_client.AdminUserProfile": {
  1789. "type": "object",
  1790. "properties": {
  1791. "address": {
  1792. "type": "string"
  1793. },
  1794. "avatar": {
  1795. "type": "string"
  1796. },
  1797. "bio": {
  1798. "type": "string"
  1799. },
  1800. "birthdate": {
  1801. "type": "integer"
  1802. },
  1803. "educations": {
  1804. "type": "array",
  1805. "items": {
  1806. "$ref": "#/definitions/authorization_client.AdminUserProfileEducation"
  1807. }
  1808. },
  1809. "email": {
  1810. "type": "string"
  1811. },
  1812. "gender": {
  1813. "type": "integer"
  1814. },
  1815. "phone_number": {
  1816. "type": "string"
  1817. },
  1818. "social_links": {
  1819. "type": "array",
  1820. "items": {
  1821. "$ref": "#/definitions/authorization_client.AdminUserProfileSocialLink"
  1822. }
  1823. },
  1824. "website": {
  1825. "type": "string"
  1826. },
  1827. "work_histories": {
  1828. "type": "array",
  1829. "items": {
  1830. "$ref": "#/definitions/authorization_client.AdminUserProfileWorkHistory"
  1831. }
  1832. }
  1833. }
  1834. },
  1835. "authorization_client.AdminUserProfileEducation": {
  1836. "type": "object",
  1837. "properties": {
  1838. "degree": {
  1839. "type": "string"
  1840. },
  1841. "graduated": {
  1842. "type": "integer"
  1843. },
  1844. "school": {
  1845. "type": "string"
  1846. }
  1847. }
  1848. },
  1849. "authorization_client.AdminUserProfileSocialLink": {
  1850. "type": "object",
  1851. "properties": {
  1852. "platform": {
  1853. "type": "string"
  1854. },
  1855. "url": {
  1856. "type": "string"
  1857. }
  1858. }
  1859. },
  1860. "authorization_client.AdminUserProfileWorkHistory": {
  1861. "type": "object",
  1862. "properties": {
  1863. "company": {
  1864. "type": "string"
  1865. },
  1866. "end_date": {
  1867. "type": "integer"
  1868. },
  1869. "position": {
  1870. "type": "string"
  1871. },
  1872. "responsibilities": {
  1873. "type": "string"
  1874. },
  1875. "start_date": {
  1876. "type": "integer"
  1877. }
  1878. }
  1879. },
  1880. "authorization_client.GetAdminUser": {
  1881. "type": "object",
  1882. "properties": {
  1883. "profile": {
  1884. "$ref": "#/definitions/authorization_client.AdminUserProfile"
  1885. },
  1886. "roles": {
  1887. "type": "array",
  1888. "items": {
  1889. "$ref": "#/definitions/authorization_client.AdminUserBase"
  1890. }
  1891. },
  1892. "status": {
  1893. "type": "string"
  1894. },
  1895. "teams": {
  1896. "type": "array",
  1897. "items": {
  1898. "$ref": "#/definitions/authorization_client.AdminUserBase"
  1899. }
  1900. },
  1901. "user_id": {
  1902. "type": "integer"
  1903. },
  1904. "username": {
  1905. "type": "string"
  1906. }
  1907. }
  1908. },
  1909. "base.ListMapItem": {
  1910. "type": "object",
  1911. "properties": {
  1912. "key": {
  1913. "type": "string"
  1914. },
  1915. "value": {
  1916. "type": "string"
  1917. }
  1918. }
  1919. },
  1920. "base.Status": {
  1921. "type": "string",
  1922. "enum": [
  1923. "ENABLED",
  1924. "DISABLED",
  1925. "DELETED"
  1926. ],
  1927. "x-enum-varnames": [
  1928. "ToggleEnabled",
  1929. "ToggleDisabled",
  1930. "ToggleDeleted"
  1931. ]
  1932. },
  1933. "common.UserInfo": {
  1934. "type": "object",
  1935. "properties": {
  1936. "avatar": {
  1937. "type": "string"
  1938. },
  1939. "email": {
  1940. "type": "string"
  1941. },
  1942. "id": {
  1943. "type": "integer"
  1944. },
  1945. "phone_number": {
  1946. "type": "string"
  1947. },
  1948. "roles": {
  1949. "type": "array",
  1950. "items": {
  1951. "$ref": "#/definitions/base.ListMapItem"
  1952. }
  1953. },
  1954. "teams": {
  1955. "type": "array",
  1956. "items": {
  1957. "$ref": "#/definitions/base.ListMapItem"
  1958. }
  1959. },
  1960. "username": {
  1961. "type": "string"
  1962. }
  1963. }
  1964. },
  1965. "permission.CreateRequest": {
  1966. "type": "object",
  1967. "required": [
  1968. "endpoint",
  1969. "name"
  1970. ],
  1971. "properties": {
  1972. "description": {
  1973. "description": "非必填,描述",
  1974. "type": "string"
  1975. },
  1976. "endpoint": {
  1977. "type": "string"
  1978. },
  1979. "name": {
  1980. "description": "权限名称",
  1981. "type": "string",
  1982. "maxLength": 50,
  1983. "minLength": 3
  1984. },
  1985. "roles": {
  1986. "description": "角色",
  1987. "type": "array",
  1988. "items": {
  1989. "type": "integer"
  1990. }
  1991. }
  1992. }
  1993. },
  1994. "permission.ListResponse": {
  1995. "type": "object",
  1996. "properties": {
  1997. "items": {
  1998. "type": "array",
  1999. "items": {
  2000. "$ref": "#/definitions/admin.AdminPermission"
  2001. }
  2002. },
  2003. "total_count": {
  2004. "type": "integer"
  2005. }
  2006. }
  2007. },
  2008. "permission.ToggleRequest": {
  2009. "type": "object",
  2010. "required": [
  2011. "status"
  2012. ],
  2013. "properties": {
  2014. "status": {
  2015. "description": "\"enabled\"|\"disabled\"",
  2016. "allOf": [
  2017. {
  2018. "$ref": "#/definitions/base.Status"
  2019. }
  2020. ]
  2021. }
  2022. }
  2023. },
  2024. "permission.UpdateRequest": {
  2025. "type": "object",
  2026. "properties": {
  2027. "description": {
  2028. "description": "非必填,描述",
  2029. "type": "string"
  2030. },
  2031. "roles": {
  2032. "description": "角色",
  2033. "type": "array",
  2034. "items": {
  2035. "type": "integer"
  2036. }
  2037. }
  2038. }
  2039. },
  2040. "response.ApiResponse": {
  2041. "type": "object",
  2042. "properties": {
  2043. "code": {
  2044. "type": "integer"
  2045. },
  2046. "data": {},
  2047. "message": {
  2048. "type": "string"
  2049. }
  2050. }
  2051. }
  2052. },
  2053. "securityDefinitions": {
  2054. "BasicAuth": {
  2055. "type": "basic"
  2056. }
  2057. },
  2058. "externalDocs": {
  2059. "description": "OpenAPI",
  2060. "url": "https://swagger.io/resources/open-api/"
  2061. }
  2062. }