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