oneapi.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. {
  2. "openapi": "3.0.1",
  3. "info": {
  4. "title": "惠融数科",
  5. "version": "1.0.0"
  6. },
  7. "servers": [
  8. {
  9. "url": "http://localhost:8000/"
  10. },
  11. {
  12. "url": "https://localhost:8000/"
  13. }
  14. ],
  15. "paths": {
  16. "/api/currentUser": {
  17. "get": {
  18. "tags": ["api"],
  19. "description": "获取当前的用户",
  20. "operationId": "currentUser",
  21. "responses": {
  22. "200": {
  23. "description": "Success",
  24. "content": {
  25. "application/json": {
  26. "schema": {
  27. "$ref": "#/components/schemas/CurrentUser"
  28. }
  29. }
  30. }
  31. },
  32. "401": {
  33. "description": "Error",
  34. "content": {
  35. "application/json": {
  36. "schema": {
  37. "$ref": "#/components/schemas/ErrorResponse"
  38. }
  39. }
  40. }
  41. }
  42. }
  43. },
  44. "x-swagger-router-controller": "api"
  45. },
  46. "/api/login/captcha": {
  47. "post": {
  48. "description": "发送验证码",
  49. "operationId": "getFakeCaptcha",
  50. "tags": ["login"],
  51. "parameters": [
  52. {
  53. "name": "phone",
  54. "in": "query",
  55. "description": "手机号",
  56. "schema": {
  57. "type": "string"
  58. }
  59. }
  60. ],
  61. "responses": {
  62. "200": {
  63. "description": "Success",
  64. "content": {
  65. "application/json": {
  66. "schema": {
  67. "$ref": "#/components/schemas/FakeCaptcha"
  68. }
  69. }
  70. }
  71. }
  72. }
  73. }
  74. },
  75. "/api/login/outLogin": {
  76. "post": {
  77. "description": "登录接口",
  78. "operationId": "outLogin",
  79. "tags": ["login"],
  80. "responses": {
  81. "200": {
  82. "description": "Success",
  83. "content": {
  84. "application/json": {
  85. "schema": {
  86. "type": "object"
  87. }
  88. }
  89. }
  90. },
  91. "401": {
  92. "description": "Error",
  93. "content": {
  94. "application/json": {
  95. "schema": {
  96. "$ref": "#/components/schemas/ErrorResponse"
  97. }
  98. }
  99. }
  100. }
  101. }
  102. },
  103. "x-swagger-router-controller": "api"
  104. },
  105. "/api/login/account": {
  106. "post": {
  107. "tags": ["login"],
  108. "description": "登录接口",
  109. "operationId": "login",
  110. "requestBody": {
  111. "description": "登录系统",
  112. "content": {
  113. "application/json": {
  114. "schema": {
  115. "$ref": "#/components/schemas/LoginParams"
  116. }
  117. }
  118. },
  119. "required": true
  120. },
  121. "responses": {
  122. "200": {
  123. "description": "Success",
  124. "content": {
  125. "application/json": {
  126. "schema": {
  127. "$ref": "#/components/schemas/LoginResult"
  128. }
  129. }
  130. }
  131. },
  132. "401": {
  133. "description": "Error",
  134. "content": {
  135. "application/json": {
  136. "schema": {
  137. "$ref": "#/components/schemas/ErrorResponse"
  138. }
  139. }
  140. }
  141. }
  142. },
  143. "x-codegen-request-body-name": "body"
  144. },
  145. "x-swagger-router-controller": "api"
  146. },
  147. "/api/notices": {
  148. "summary": "getNotices",
  149. "description": "NoticeIconItem",
  150. "get": {
  151. "tags": ["api"],
  152. "operationId": "getNotices",
  153. "responses": {
  154. "200": {
  155. "description": "Success",
  156. "content": {
  157. "application/json": {
  158. "schema": {
  159. "$ref": "#/components/schemas/NoticeIconList"
  160. }
  161. }
  162. }
  163. }
  164. }
  165. }
  166. },
  167. "/api/rule": {
  168. "get": {
  169. "tags": ["rule"],
  170. "description": "获取规则列表",
  171. "operationId": "rule",
  172. "parameters": [
  173. {
  174. "name": "current",
  175. "in": "query",
  176. "description": "当前的页码",
  177. "schema": {
  178. "type": "number"
  179. }
  180. },
  181. {
  182. "name": "pageSize",
  183. "in": "query",
  184. "description": "页面的容量",
  185. "schema": {
  186. "type": "number"
  187. }
  188. }
  189. ],
  190. "responses": {
  191. "200": {
  192. "description": "Success",
  193. "content": {
  194. "application/json": {
  195. "schema": {
  196. "$ref": "#/components/schemas/RuleList"
  197. }
  198. }
  199. }
  200. },
  201. "401": {
  202. "description": "Error",
  203. "content": {
  204. "application/json": {
  205. "schema": {
  206. "$ref": "#/components/schemas/ErrorResponse"
  207. }
  208. }
  209. }
  210. }
  211. }
  212. },
  213. "post": {
  214. "tags": ["rule"],
  215. "description": "新建规则",
  216. "operationId": "addRule",
  217. "responses": {
  218. "200": {
  219. "description": "Success",
  220. "content": {
  221. "application/json": {
  222. "schema": {
  223. "$ref": "#/components/schemas/RuleListItem"
  224. }
  225. }
  226. }
  227. },
  228. "401": {
  229. "description": "Error",
  230. "content": {
  231. "application/json": {
  232. "schema": {
  233. "$ref": "#/components/schemas/ErrorResponse"
  234. }
  235. }
  236. }
  237. }
  238. }
  239. },
  240. "put": {
  241. "tags": ["rule"],
  242. "description": "新建规则",
  243. "operationId": "updateRule",
  244. "responses": {
  245. "200": {
  246. "description": "Success",
  247. "content": {
  248. "application/json": {
  249. "schema": {
  250. "$ref": "#/components/schemas/RuleListItem"
  251. }
  252. }
  253. }
  254. },
  255. "401": {
  256. "description": "Error",
  257. "content": {
  258. "application/json": {
  259. "schema": {
  260. "$ref": "#/components/schemas/ErrorResponse"
  261. }
  262. }
  263. }
  264. }
  265. }
  266. },
  267. "delete": {
  268. "tags": ["rule"],
  269. "description": "删除规则",
  270. "operationId": "removeRule",
  271. "responses": {
  272. "200": {
  273. "description": "Success",
  274. "content": {
  275. "application/json": {
  276. "schema": {
  277. "type": "object"
  278. }
  279. }
  280. }
  281. },
  282. "401": {
  283. "description": "Error",
  284. "content": {
  285. "application/json": {
  286. "schema": {
  287. "$ref": "#/components/schemas/ErrorResponse"
  288. }
  289. }
  290. }
  291. }
  292. }
  293. },
  294. "x-swagger-router-controller": "api"
  295. },
  296. "/swagger": {
  297. "x-swagger-pipe": "swagger_raw"
  298. }
  299. },
  300. "components": {
  301. "schemas": {
  302. "CurrentUser": {
  303. "type": "object",
  304. "properties": {
  305. "name": {
  306. "type": "string"
  307. },
  308. "avatar": {
  309. "type": "string"
  310. },
  311. "userid": {
  312. "type": "string"
  313. },
  314. "email": {
  315. "type": "string"
  316. },
  317. "signature": {
  318. "type": "string"
  319. },
  320. "title": {
  321. "type": "string"
  322. },
  323. "group": {
  324. "type": "string"
  325. },
  326. "tags": {
  327. "type": "array",
  328. "items": {
  329. "type": "object",
  330. "properties": {
  331. "key": {
  332. "type": "string"
  333. },
  334. "label": {
  335. "type": "string"
  336. }
  337. }
  338. }
  339. },
  340. "notifyCount": {
  341. "type": "integer",
  342. "format": "int32"
  343. },
  344. "unreadCount": {
  345. "type": "integer",
  346. "format": "int32"
  347. },
  348. "country": {
  349. "type": "string"
  350. },
  351. "access": {
  352. "type": "string"
  353. },
  354. "geographic": {
  355. "type": "object",
  356. "properties": {
  357. "province": {
  358. "type": "object",
  359. "properties": {
  360. "label": {
  361. "type": "string"
  362. },
  363. "key": {
  364. "type": "string"
  365. }
  366. }
  367. },
  368. "city": {
  369. "type": "object",
  370. "properties": {
  371. "label": {
  372. "type": "string"
  373. },
  374. "key": {
  375. "type": "string"
  376. }
  377. }
  378. }
  379. }
  380. },
  381. "address": {
  382. "type": "string"
  383. },
  384. "phone": {
  385. "type": "string"
  386. }
  387. }
  388. },
  389. "LoginResult": {
  390. "type": "object",
  391. "properties": {
  392. "status": {
  393. "type": "string"
  394. },
  395. "type": {
  396. "type": "string"
  397. },
  398. "currentAuthority": {
  399. "type": "string"
  400. }
  401. }
  402. },
  403. "PageParams": {
  404. "type": "object",
  405. "properties": {
  406. "current": {
  407. "type": "number"
  408. },
  409. "pageSize": {
  410. "type": "number"
  411. }
  412. }
  413. },
  414. "RuleListItem": {
  415. "type": "object",
  416. "properties": {
  417. "key": {
  418. "type": "integer",
  419. "format": "int32"
  420. },
  421. "disabled": {
  422. "type": "boolean"
  423. },
  424. "href": {
  425. "type": "string"
  426. },
  427. "avatar": {
  428. "type": "string"
  429. },
  430. "name": {
  431. "type": "string"
  432. },
  433. "owner": {
  434. "type": "string"
  435. },
  436. "desc": {
  437. "type": "string"
  438. },
  439. "callNo": {
  440. "type": "integer",
  441. "format": "int32"
  442. },
  443. "status": {
  444. "type": "integer",
  445. "format": "int32"
  446. },
  447. "updatedAt": {
  448. "type": "string",
  449. "format": "datetime"
  450. },
  451. "createdAt": {
  452. "type": "string",
  453. "format": "datetime"
  454. },
  455. "progress": {
  456. "type": "integer",
  457. "format": "int32"
  458. }
  459. }
  460. },
  461. "RuleList": {
  462. "type": "object",
  463. "properties": {
  464. "data": {
  465. "type": "array",
  466. "items": {
  467. "$ref": "#/components/schemas/RuleListItem"
  468. }
  469. },
  470. "total": {
  471. "type": "integer",
  472. "description": "列表的内容总数",
  473. "format": "int32"
  474. },
  475. "success": {
  476. "type": "boolean"
  477. }
  478. }
  479. },
  480. "FakeCaptcha": {
  481. "type": "object",
  482. "properties": {
  483. "code": {
  484. "type": "integer",
  485. "format": "int32"
  486. },
  487. "status": {
  488. "type": "string"
  489. }
  490. }
  491. },
  492. "LoginParams": {
  493. "type": "object",
  494. "properties": {
  495. "username": {
  496. "type": "string"
  497. },
  498. "password": {
  499. "type": "string"
  500. },
  501. "autoLogin": {
  502. "type": "boolean"
  503. },
  504. "type": {
  505. "type": "string"
  506. }
  507. }
  508. },
  509. "ErrorResponse": {
  510. "required": ["errorCode"],
  511. "type": "object",
  512. "properties": {
  513. "errorCode": {
  514. "type": "string",
  515. "description": "业务约定的错误码"
  516. },
  517. "errorMessage": {
  518. "type": "string",
  519. "description": "业务上的错误信息"
  520. },
  521. "success": {
  522. "type": "boolean",
  523. "description": "业务上的请求是否成功"
  524. }
  525. }
  526. },
  527. "NoticeIconList": {
  528. "type": "object",
  529. "properties": {
  530. "data": {
  531. "type": "array",
  532. "items": {
  533. "$ref": "#/components/schemas/NoticeIconItem"
  534. }
  535. },
  536. "total": {
  537. "type": "integer",
  538. "description": "列表的内容总数",
  539. "format": "int32"
  540. },
  541. "success": {
  542. "type": "boolean"
  543. }
  544. }
  545. },
  546. "NoticeIconItemType": {
  547. "title": "NoticeIconItemType",
  548. "description": "已读未读列表的枚举",
  549. "type": "string",
  550. "properties": {},
  551. "enum": ["notification", "message", "event"]
  552. },
  553. "NoticeIconItem": {
  554. "type": "object",
  555. "properties": {
  556. "id": {
  557. "type": "string"
  558. },
  559. "extra": {
  560. "type": "string",
  561. "format": "any"
  562. },
  563. "key": { "type": "string" },
  564. "read": {
  565. "type": "boolean"
  566. },
  567. "avatar": {
  568. "type": "string"
  569. },
  570. "title": {
  571. "type": "string"
  572. },
  573. "status": {
  574. "type": "string"
  575. },
  576. "datetime": {
  577. "type": "string",
  578. "format": "date"
  579. },
  580. "description": {
  581. "type": "string"
  582. },
  583. "type": {
  584. "extensions": {
  585. "x-is-enum": true
  586. },
  587. "$ref": "#/components/schemas/NoticeIconItemType"
  588. }
  589. }
  590. }
  591. }
  592. }
  593. }