Skip to content

Conversation

kanyxmo
Copy link
Member

@kanyxmo kanyxmo commented Oct 25, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Added uniqueness constraints for username, name, and code fields in their respective tables to enhance data integrity.
    • Introduced new API endpoints for managing attachments and improved logging capabilities.
    • Enhanced user management with new endpoints for retrieving user menus and roles.
  • User Interface Improvements

    • Added localized error messages for operations that have already been performed across English, Simplified Chinese, and Traditional Chinese.
  • Bug Fixes

    • Improved validation and error handling in menu creation and editing processes to ensure robust functionality.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 25, 2024
Copy link

coderabbitai bot commented Oct 25, 2024

Walkthrough

The changes in this pull request include modifications to several migration files to enforce uniqueness constraints on specific columns in the user, menu, and role tables. Additionally, updates to the OpenAPI specification enhance the API's functionality with new endpoints for managing attachments, user logs, and permissions. Localization files were updated to provide consistent error messages in English, Simplified Chinese, and Traditional Chinese. Lastly, changes to Vue components improve form handling and localization support, ensuring that menu creation and editing functionalities are robust and user-friendly.

Changes

File Path Change Summary
databases/migrations/2021_04_12_160526_create_user_table.php Added uniqueness constraint to the username column in the user table.
databases/migrations/2021_04_18_215320_create_menu_table.php Added uniqueness constraint to the name column in the menu table.
databases/migrations/2021_04_18_215515_create_role_table.php Added uniqueness constraint to the code column in the role table.
storage/swagger/http.json Updated OpenAPI specification with new endpoints for managing attachments, user logs, and permissions.
web/src/modules/base/locales/en[English].yaml Added error message entry for baseMenuManage.
web/src/modules/base/locales/zh_CN[简体中文].yaml Added error message entry for baseMenuManage.
web/src/modules/base/locales/zh_TW[繁體中文].yaml Added error message entry for baseMenuManage.
web/src/modules/base/views/permission/menu/index.vue Modified createOrSaveMenu function to validate currentMenu before adding a new menu item.
web/src/modules/base/views/permission/menu/menu-form.vue Enhanced form logic and localization support with new checks and updates based on context (add/edit).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MenuForm
    participant API

    User->>MenuForm: Clicks to add new menu
    MenuForm->>MenuForm: Check currentMenu.value
    alt currentMenu is valid
        MenuForm->>API: Send request to create menu
    else currentMenu is null
        MenuForm->>User: Show error message
    end
Loading

🐰 "In the code we make our mark,
Unique names, a vital spark.
With menus and roles all in line,
Our API shines, oh how divine!
Errors caught, messages clear,
In every locale, we spread good cheer!" 🐇


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dosubot dosubot bot added the bug label Oct 25, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Outside diff range and nitpick comments (7)
databases/migrations/2021_04_18_215320_create_menu_table.php (1)

27-27: Consider a composite unique constraint with parent_id.

Since this is a hierarchical menu structure (with parent_id), you might want to allow the same menu name under different parents. Consider using a composite unique constraint instead.

-            $table->string('name', 50)->default('')->comment('菜单名称')->unique();
+            $table->string('name', 50)->default('')->comment('菜单名称');
+            $table->unique(['parent_id', 'name'], 'menu_parent_name_unique');
web/src/modules/base/locales/en[English].yaml (1)

26-26: LGTM! The translation effectively addresses the menu error message issue.

The added error message is clear, grammatically correct, and provides actionable guidance to users.

Consider making the message slightly more specific:

-  addError: This operation has already been performed. Please click the left menu to try again.
+  addError: Menu has already been added. Please refresh the left menu to continue.
web/src/modules/base/views/permission/menu/index.vue (2)

71-72: Enhance error message clarity.

The error message could be more specific about why the menu creation failed (i.e., no menu selected).

-      msg.alertError(t('baseMenuManage.addError'))
+      msg.alertError(t('baseMenuManage.selectMenuFirst'))

Line range hint 74-78: Maintain consistency between create and edit operations.

The edit operation should follow similar patterns as the create operation for consistency:

  1. State management during API calls
  2. Validation checks
  3. Success feedback with tree updates
 if (model.dataType === 'edit' && model.id) {
+  const saveButton = document.querySelector('button[type="primary"]')
+  if (saveButton) saveButton.disabled = true
   save(model.id as number, model).then((res: any) => {
     res.code === ResultCode.SUCCESS ? msg.success(t('crud.updateSuccess')) : msg.error(res.message)
+    return getMenu()  // Refresh tree after successful edit
+  }).finally(() => {
+    if (saveButton) saveButton.disabled = false
   }).catch((err: any) => msg.alertError(err))
 }
web/src/modules/base/views/permission/menu/menu-form.vue (1)

269-274: Add safety check for rules array access.

While the implementation correctly handles translations, consider adding a safety check before accessing the first rule to prevent potential errors with empty rules arrays.

- if (formItem?.itemProps?.rules && item?.itemProps?.rules) {
-   formItem.itemProps.rules[0].message = t(`${item?.itemProps?.rules[0].message}`)
+ if (formItem?.itemProps?.rules?.[0] && item?.itemProps?.rules?.[0]) {
+   formItem.itemProps.rules[0].message = t(`${item?.itemProps?.rules[0].message}`)
storage/swagger/http.json (2)

1-1: Enhance menu endpoint documentation

The menu-related endpoints (/admin/menu/*) should document specific error responses for common failure cases (e.g., duplicate menu names, invalid parent IDs).

Add error responses to menu endpoints:

"/admin/menu": {
  "post": {
    "responses": {
      "200": { ... },
+     "400": {
+       "description": "Invalid request (e.g., duplicate menu name)",
+       "content": {
+         "application/json": {
+           "schema": {
+             "$ref": "#/components/schemas/Result"
+           }
+         }
+       }
+     },
+     "404": {
+       "description": "Parent menu not found",
+       "content": {
+         "application/json": {
+           "schema": {
+             "$ref": "#/components/schemas/Result"
+           }
+         }
+       }
+     }
    }
  }
}
🧰 Tools
🪛 Gitleaks

1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 checkov

[HIGH] 0-1: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[HIGH] 0-1: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[HIGH] 0-1: Ensure that API keys are not sent over cleartext

(CKV_OPENAPI_20)


1-1: Improve API documentation quality

Several endpoints lack comprehensive descriptions and realistic example responses. This makes the API harder to understand and use correctly.

Consider the following improvements:

  1. Add detailed descriptions for each endpoint explaining its purpose and usage
  2. Provide realistic example responses that match the actual data structure
  3. Document rate limiting and pagination behavior where applicable
  4. Include examples of error responses for common failure scenarios

Would you like me to help generate improved documentation for specific endpoints?

🧰 Tools
🪛 Gitleaks

1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 checkov

[HIGH] 0-1: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[HIGH] 0-1: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[HIGH] 0-1: Ensure that API keys are not sent over cleartext

(CKV_OPENAPI_20)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between afe51c4 and 8ac3676.

📒 Files selected for processing (9)
  • databases/migrations/2021_04_12_160526_create_user_table.php (1 hunks)
  • databases/migrations/2021_04_18_215320_create_menu_table.php (1 hunks)
  • databases/migrations/2021_04_18_215515_create_role_table.php (1 hunks)
  • storage/swagger/http.json (1 hunks)
  • web/src/modules/base/locales/en[English].yaml (1 hunks)
  • web/src/modules/base/locales/zh_CN[简体中文].yaml (1 hunks)
  • web/src/modules/base/locales/zh_TW[繁體中文].yaml (1 hunks)
  • web/src/modules/base/views/permission/menu/index.vue (1 hunks)
  • web/src/modules/base/views/permission/menu/menu-form.vue (3 hunks)
🧰 Additional context used
🪛 Gitleaks
storage/swagger/http.json

1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 checkov
storage/swagger/http.json

[HIGH] 0-1: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[HIGH] 0-1: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[HIGH] 0-1: Ensure that API keys are not sent over cleartext

(CKV_OPENAPI_20)

🔇 Additional comments (5)
databases/migrations/2021_04_18_215515_create_role_table.php (1)

27-27: Verify existing data before applying unique constraint.

The addition of the unique constraint on the code column is a good practice for data integrity. However, if this migration will be run on an existing database, ensure there are no duplicate role codes in the existing data.

databases/migrations/2021_04_18_215320_create_menu_table.php (1)

27-27: Verify existing data before deploying unique constraint.

The addition of a unique constraint is good for data integrity. However, ensure there are no duplicate menu names in existing data before applying this migration.

web/src/modules/base/locales/zh_TW[繁體中文].yaml (1)

26-26: LGTM! Verify translations in other language files.

The Traditional Chinese translation is grammatically correct and properly uses Traditional Chinese characters. The message provides clear guidance to users.

Let's verify the consistency of this translation across other language files:

✅ Verification successful

Translation is consistent across all language files

The addError message is properly translated in all three language files:

  • English: "This operation has already been performed. Please click the left menu to try again."
  • Simplified Chinese: "此操作已执行过,请点击左侧菜单重新操作。"
  • Traditional Chinese: "此操作已執行過,請點擊左側選單重新操作。"

Each translation maintains consistent meaning while using the appropriate character variants and terminology for its locale (e.g., 選單 vs 菜单).

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the same translation key exists in other language files
# and compare their content for consistency

# Test: Check English translation
rg "addError:" "web/src/modules/base/locales/en\[English\].yaml" -A 1

# Test: Check Simplified Chinese translation
rg "addError:" "web/src/modules/base/locales/zh_CN\[简体中文\].yaml" -A 1

Length of output: 315


Script:

#!/bin/bash
# Let's first find all locale files in the repository
fd "\.ya?ml$" web/src/modules/base/locales

# Then check the content of these files focusing on the addError translation
for file in $(fd "\.ya?ml$" web/src/modules/base/locales); do
  echo "=== $file ==="
  rg "addError:" "$file" -A 1
done

Length of output: 1194

web/src/modules/base/locales/zh_CN[简体中文].yaml (1)

26-26: Translation looks good, verify consistency across languages.

The added error message is grammatically correct and properly formatted. However, let's ensure it matches the translations in other language files.

✅ Verification successful

Translation is consistent across all language files

The addError message is properly translated in all locale files:

  • English: "This operation has already been performed. Please click the left menu to try again."
  • Traditional Chinese: "此操作已執行過,請點擊左側選單重新操作。"
  • Simplified Chinese: "此操作已执行过,请点击左侧菜单重新操作。"
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the same key exists in other language files with appropriate translations
# Expected: Should find matching 'addError' entries in en[English].yaml and zh_TW[繁體中文].yaml

echo "Checking English translation..."
rg "addError:" "web/src/modules/base/locales/en\[English\].yaml"

echo "Checking Traditional Chinese translation..."
rg "addError:" "web/src/modules/base/locales/zh_TW\[繁體中文\].yaml"

Length of output: 475


Script:

#!/bin/bash
# Let's first check what locale files actually exist in the repository
echo "Checking available locale files..."
fd -e yaml -e yml . web/src/modules/base/locales/

# Then let's check the content of these files for the addError key
echo -e "\nChecking for addError translations in all locale files..."
rg "addError:" web/src/modules/base/locales/

Length of output: 744

web/src/modules/base/views/permission/menu/menu-form.vue (1)

65-68: LGTM: Proper form mode handling implemented.

The addition of the dataType check helps distinguish between create and edit modes, addressing the menu creation issue mentioned in the PR title.

@@ -24,7 +24,7 @@ public function up(): void
$table->comment('角色信息表');
$table->bigIncrements('id')->comment('主键');
$table->string('name', 30)->comment('角色名称');
$table->string('code', 100)->comment('角色代码');
$table->string('code', 100)->comment('角色代码')->unique();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider optimizing the column length.

The code column is defined with a length of 100 characters, which seems excessive for role codes. Consider reducing this to a more appropriate length (e.g., 30-50 characters) to optimize storage and index performance, unless there's a specific requirement for longer role codes.

-            $table->string('code', 100)->comment('角色代码')->unique();
+            $table->string('code', 50)->comment('角色代码')->unique();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$table->string('code', 100)->comment('角色代码')->unique();
$table->string('code', 50)->comment('角色代码')->unique();

@@ -23,7 +23,7 @@ public function up(): void
Schema::create('user', static function (Blueprint $table) {
$table->comment('用户信息表');
$table->bigIncrements('id')->comment('用户ID,主键');
$table->string('username', 20)->unique()->comment('用户名');
$table->string('username', 20)->unique()->comment('用户名')->unique();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove duplicate unique constraint on username column.

The line contains two unique() constraints which is redundant. Only one unique constraint is needed to enforce uniqueness on the username column.

Apply this fix:

-            $table->string('username', 20)->unique()->comment('用户名')->unique();
+            $table->string('username', 20)->unique()->comment('用户名');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$table->string('username', 20)->unique()->comment('用户名')->unique();
$table->string('username', 20)->unique()->comment('用户名');

Comment on lines +59 to +66
if (currentMenu.value !== null && model.dataType && model.dataType === 'add') {
if (!model.parent_id) {
model.parent_id = 0
}
create(model).then(async (res: any) => {
res.code === ResultCode.SUCCESS ? msg.success(t('crud.createSuccess')) : msg.error(res.message)
await getMenu()
currentMenu.value = null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider improving state management during menu creation.

While the changes prevent continuous clicks by checking currentMenu.value, there's a potential race condition between the API call and state updates. Consider:

  1. Disabling the save button during API calls
  2. Using a loading state for better UX
 if (currentMenu.value !== null && model.dataType && model.dataType === 'add') {
   if (!model.parent_id) {
     model.parent_id = 0
   }
+  const saveButton = document.querySelector('button[type="primary"]')
+  if (saveButton) saveButton.disabled = true
   create(model).then(async (res: any) => {
     res.code === ResultCode.SUCCESS ? msg.success(t('crud.createSuccess')) : msg.error(res.message)
     await getMenu()
     currentMenu.value = null
     setNodeExpand(model.parent_id as number)
+  }).finally(() => {
+    if (saveButton) saveButton.disabled = false
   }).catch((err: any) => msg.alertError(err))
 }

Committable suggestion was skipped due to low confidence.

Comment on lines +284 to +286
if (formItem?.itemProps?.rules && item?.itemProps?.rules) {
formItem.itemProps.rules[0].message = t(`${item?.itemProps?.rules[0].message}`)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Refactor to eliminate code duplication.

The validation message translation logic is duplicated between the watch handler and onMounted hook. Consider extracting this into a shared function.

+ const updateValidationMessages = () => {
+   formItems.value.map((item) => {
+     const formItem = menuForm.value?.getItemByProp(item.prop as string)
+     if (formItem?.renderProps?.placeholder && item.renderProps?.placeholder) {
+       formItem.renderProps.placeholder = t(`${item.renderProps?.placeholder}`)
+     }
+     if (formItem?.itemProps?.rules?.[0] && item?.itemProps?.rules?.[0]) {
+       formItem.itemProps.rules[0].message = t(`${item?.itemProps?.rules[0].message}`)
+     }
+   })
+ }

  watch(
    locale,
-   () => {
-     formItems.value.map((item) => {
-       const formItem = menuForm.value?.getItemByProp(item.prop as string)
-       if (formItem?.renderProps?.placeholder && item.renderProps?.placeholder) {
-         formItem.renderProps.placeholder = t(`${item.renderProps?.placeholder}`)
-       }
-       if (formItem?.itemProps?.rules && item?.itemProps?.rules) {
-         formItem.itemProps.rules[0].message = t(`${item?.itemProps?.rules[0].message}`)
-       }
-     })
-   },
+   updateValidationMessages,
    { immediate: true },
  )

  onMounted(() => {
    menuForm.value?.setItems(cloneDeep(formItems.value))
-   formItems.value.map((item) => {
-     const formItem = menuForm.value?.getItemByProp(item.prop as string)
-     if (formItem?.renderProps?.placeholder && item.renderProps?.placeholder) {
-       formItem.renderProps.placeholder = t(`${item.renderProps?.placeholder}`)
-     }
-     if (formItem?.itemProps?.rules && item?.itemProps?.rules) {
-       formItem.itemProps.rules[0].message = t(`${item?.itemProps?.rules[0].message}`)
-     }
-   })
+   updateValidationMessages()
  })

Committable suggestion was skipped due to low confidence.

{"openapi":"3.0.0","info":{"title":"MineAdmin","description":"MineAdmin 是一款基于 Hyperf 开发的开源管理系统,提供了用户管理、权限管理、系统设置、系统监控等功能。","termsOfService":"https:\/\/www.mineadmin.com","contact":{"name":"MineAdmin","url":"https:\/\/www.mineadmin.com\/about"},"license":{"name":"Apache2.0","url":"https:\/\/github.com\/mineadmin\/MineAdmin\/blob\/master\/LICENSE"},"version":"3.0.0"},"servers":[{"url":"http:\/\/127.0.0.1:9501","description":"本地服务"},{"url":"https:\/\/demo.mineadmin.com","description":"演示服务"}],"paths":{"\/admin\/attachment\/list":{"get":{"tags":["数据中心"],"summary":"附件列表","operationId":"AttachmentList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/AttachmentSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/attachment\/upload":{"post":{"tags":["数据中心"],"summary":"上传附件","operationId":"UploadAttachment","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/attachment\/{id}":{"delete":{"operationId":"DeleteAttachment","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}}}},"\/admin\/user-login-log\/list":{"get":{"tags":["系统管理"],"summary":"用户登录日志列表","operationId":"UserLoginLogList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserLoginLogSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-login-log":{"delete":{"tags":["系统管理"],"summary":"删除用户登录日志","operationId":"UserLoginLogDelete","security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-operation-log\/list":{"get":{"tags":["系统管理"],"summary":"用户操作日志列表","operationId":"UserOperationLogList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserOperationLogSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-operation-log":{"delete":{"tags":["系统管理"],"summary":"删除用户操作日志","operationId":"UserOperationLogDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"$ref":"#\/components\/schemas\/Result"},"data":{"$ref":"#\/components\/schemas\/Result"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/login":{"post":{"tags":["admin:passport"],"summary":"系统登录","operationId":"passportLogin","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PassportLoginRequest"},"example":"{\"username\":\"admin\",\"password\":\"123456\"}"}},"_content":{"$ref":"#\/components\/schemas\/PassportLoginRequest"}},"responses":{"200":{"description":"登录成功返回对象","content":{"application\/json":{"schema":{"title":"登录成功","properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/PassportLoginVo"}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"refresh_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"expire_at\":300}}"}}}}}},"\/admin\/passport\/logout":{"post":{"tags":["admin:passport"],"summary":"退出","operationId":"passportLogout","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/getInfo":{"get":{"tags":["admin:passport"],"summary":"获取用户信息","operationId":"getInfo","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/UserSchema"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/refresh":{"post":{"tags":["admin:passport"],"summary":"刷新token","operationId":"refresh","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/PassportLoginVo"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu\/list":{"get":{"tags":["菜单管理"],"summary":"菜单列表","operationId":"menuList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu":{"post":{"tags":["菜单管理"],"summary":"创建菜单","operationId":"menuCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MenuRequest"}}},"_content":{"$ref":"#\/components\/schemas\/MenuRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["菜单管理"],"summary":"删除菜单","operationId":"menuDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu\/{id}":{"put":{"tags":["菜单管理"],"summary":"编辑菜单","operationId":"menuEdit","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MenuRequest"}}},"_content":{"$ref":"#\/components\/schemas\/MenuRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/list":{"get":{"tags":["角色管理"],"summary":"角色列表","operationId":"roleList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoleSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role":{"post":{"tags":["角色管理"],"summary":"创建角色","operationId":"roleCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/RoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["角色管理"],"summary":"删除角色","operationId":"roleDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/{id}":{"put":{"tags":["角色管理"],"summary":"保存角色","operationId":"roleSave","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/RoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/{id}\/permissions":{"get":{"tags":["角色管理"],"summary":"获取角色权限列表","operationId":"setRolePermission","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":59,\"name\":\"xdrljpefIZ\"},{\"id\":60,\"name\":\"GIdOejHL2R\"},{\"id\":61,\"name\":\"ZpEnJv00VG\"}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"put":{"tags":["角色管理"],"summary":"赋予角色权限","operationId":"roleGrantPermissions","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BatchGrantPermissionsForRoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/BatchGrantPermissionsForRoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/list":{"get":{"tags":["用户管理"],"summary":"用户列表","operationId":"userList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user":{"put":{"tags":["用户管理"],"summary":"更新用户信息","operationId":"updateInfo","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"post":{"tags":["用户管理"],"summary":"创建用户","operationId":"userCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["用户管理"],"summary":"删除用户","operationId":"userDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/password":{"put":{"tags":["用户管理"],"summary":"重置密码","operationId":"updatePassword","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/{userId}":{"put":{"tags":["用户管理"],"summary":"更新用户","operationId":"userUpdate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/{userId}\/roles":{"get":{"tags":["用户管理"],"summary":"获取用户角色列表","operationId":"getUserRole","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"put":{"tags":["用户管理"],"summary":"批量授权用户角色","operationId":"batchGrantRolesForUser","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BatchGrantRolesForUserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/menus":{"get":{"tags":["权限"],"summary":"获取当前用户菜单","operationId":"PermissionMenus","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/MenuSchema"},"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":290,\"parent_id\":0,\"name\":\"LAme6dFrlf\",\"code\":\"eNiYagCtJp\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":292,\"parent_id\":0,\"name\":\"mMMSlHc8cv\",\"code\":\"xzobstyEmP\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":294,\"parent_id\":0,\"name\":\"ot8fL3u7QZ\",\"code\":\"kCbrLhgYDj\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/roles":{"get":{"tags":["权限"],"summary":"获取当前用户角色","operationId":"PermissionRoles","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoleSchema"},"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":290,\"parent_id\":0,\"name\":\"LAme6dFrlf\",\"code\":\"eNiYagCtJp\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":292,\"parent_id\":0,\"name\":\"mMMSlHc8cv\",\"code\":\"xzobstyEmP\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":294,\"parent_id\":0,\"name\":\"ot8fL3u7QZ\",\"code\":\"kCbrLhgYDj\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/update":{"post":{"tags":["权限"],"summary":"更新用户信息","operationId":"updateInfo","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/api\/v1\/login":{"post":{"tags":["api"],"summary":"用户登录","operationId":"ApiV1Login"}}},"components":{"schemas":{"PassportLoginRequest":{"title":"登录请求","description":"登录请求参数","properties":{"username":{"description":"用户名","type":"string","rules":null,"attribute":null},"password":{"description":"密码","type":"string","rules":null,"attribute":null}},"type":"object"},"BatchGrantPermissionsForRoleRequest":{"title":"批量授权角色权限","properties":{"permission_ids":{"description":"权限ID","type":"array","example":"[1,2,3]","rules":null,"attribute":null}},"type":"object"},"BatchGrantRolesForUserRequest":{"title":"批量授权用户角色","properties":{"role_ids":{"description":"角色ID","type":"array","example":"[1,2,3]","rules":null,"attribute":null}},"type":"object"},"MenuRequest":{"properties":{"parent_id":{"title":"父ID","type":"integer","rules":null,"attribute":null},"name":{"title":"菜单名称","type":"string","rules":null,"attribute":null},"component":{"title":"组件路径","type":"string","rules":null,"attribute":null},"redirect":{"title":"重定向地址","type":"string","rules":null,"attribute":null},"type":{"title":"菜单类型, (M菜单 B按钮 L链接 I iframe)","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"PermissionRequest":{"properties":{"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null}},"type":"object"},"RoleRequest":{"properties":{"name":{"title":"角色名称","type":"string","rules":null,"attribute":null},"code":{"title":"角色代码","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserRequest":{"title":"创建用户","required":["username","user_type","nickname","phone","email","avatar","signed","status","backend_setting","remark"],"properties":{"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"user_type":{"title":"用户类型:(100系统用户)","type":"string","rules":null,"attribute":null},"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"phone":{"title":"手机","type":"string","rules":null,"attribute":null},"email":{"title":"用户邮箱","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UploadRequest":{"title":"上传附件","properties":{"file":{"description":"文件","type":"file","rules":null,"attribute":null}},"type":"object"},"PassportLoginVo":{"description":"登录成功返回","properties":{"access_token":{"description":"Access Token","type":"string","example":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k","rules":null,"attribute":null},"refresh_token":{"description":"Refresh Token","type":"string","example":"eyJ0eXAiOi","rules":null,"attribute":null},"expire_at":{"description":"过期时间,单位秒","type":"integer","example":300,"rules":null,"attribute":null}},"type":"object","example":"{\"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"expire_at\":300}"},"Result":{"title":"Api Response","description":"Api Response","properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"title":"响应消息","type":"string","nullable":true,"rules":null,"attribute":null},"data":{"title":"响应数据","type":"array","nullable":true,"rules":null,"attribute":null}},"type":"object"},"ResultCode":{"title":"ResultCode","type":"integer","default":200,"enum":[200,500,401,403,404,405,406,422]},"AttachmentSchema":{"title":"AttachmentSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"storage_mode":{"title":"存储模式 (1 本地 2 阿里云 3 七牛云 4 腾讯云)","type":"integer","rules":null,"attribute":null},"origin_name":{"title":"原文件名","type":"string","rules":null,"attribute":null},"object_name":{"title":"新文件名","type":"string","rules":null,"attribute":null},"hash":{"title":"文件hash","type":"string","rules":null,"attribute":null},"mime_type":{"title":"资源类型","type":"string","rules":null,"attribute":null},"storage_path":{"title":"存储目录","type":"string","rules":null,"attribute":null},"suffix":{"title":"文件后缀","type":"string","rules":null,"attribute":null},"size_byte":{"title":"字节数","type":"integer","rules":null,"attribute":null},"size_info":{"title":"文件大小","type":"string","rules":null,"attribute":null},"url":{"title":"url地址","type":"string","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"","type":"mixed","rules":null,"attribute":null},"deleted_at":{"title":"","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"MenuMetaSchema":{"title":"MenuMetaSchema","properties":{"title":{"title":"标题","type":"string","rules":null,"attribute":null},"i18n":{"title":"国际化","type":"string","rules":null,"attribute":null},"badge":{"title":"徽章","type":"string","rules":null,"attribute":null},"icon":{"title":"图标","type":"string","rules":null,"attribute":null},"affix":{"title":"是否固定","type":"boolean","rules":null,"attribute":null},"hidden":{"title":"是否隐藏","type":"boolean","rules":null,"attribute":null},"type":{"title":"类型","type":"string","rules":null,"attribute":null},"cache":{"title":"是否缓存","type":"boolean","rules":null,"attribute":null},"copyright":{"title":"是否显示版权","type":"boolean","rules":null,"attribute":null},"breadcrumbEnable":{"title":"是否显示面包屑","type":"boolean","rules":null,"attribute":null},"componentPath":{"title":"视图前缀路径","type":"string","rules":null,"attribute":null},"componentSuffix":{"title":"视图文件类型","type":"string","rules":null,"attribute":null},"link":{"title":"链接","type":"string","rules":null,"attribute":null}},"type":"object"},"MenuSchema":{"title":"MenuSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"parent_id":{"title":"父ID","type":"integer","rules":null,"attribute":null},"name":{"title":"菜单名称","type":"string","rules":null,"attribute":null},"path":{"title":"路由地址","type":"string","rules":null,"attribute":null},"component":{"title":"组件路径","type":"string","rules":null,"attribute":null},"redirect":{"title":"重定向地址","type":"string","rules":null,"attribute":null},"type":{"title":"菜单类型, (M菜单 B按钮 L链接 I iframe)","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null},"meta":{"title":"附加属性","type":"object","rules":null,"attribute":null}},"type":"object"},"RoleSchema":{"title":"RoleSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"name":{"title":"角色名称","type":"string","rules":null,"attribute":null},"code":{"title":"角色代码","type":"string","rules":null,"attribute":null},"data_scope":{"title":"数据范围(1:全部数据权限 2:自定义数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:本人数据权限)","type":"integer","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null},"deleted_at":{"title":"","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserLoginLogSchema":{"title":"UserLoginLogSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"ip":{"title":"登录IP地址","type":"string","rules":null,"attribute":null},"ip_location":{"title":"IP所属地","type":"string","rules":null,"attribute":null},"os":{"title":"操作系统","type":"string","rules":null,"attribute":null},"browser":{"title":"浏览器","type":"string","rules":null,"attribute":null},"status":{"title":"登录状态 (1成功 2失败)","type":"integer","rules":null,"attribute":null},"message":{"title":"提示消息","type":"string","rules":null,"attribute":null},"login_time":{"title":"登录时间","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserOperationLogSchema":{"title":"UserOperationLogSchema","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"method":{"title":"请求方式","type":"string","rules":null,"attribute":null},"router":{"title":"请求路由","type":"string","rules":null,"attribute":null},"service_name":{"title":"业务名称","type":"string","rules":null,"attribute":null},"ip":{"title":"请求IP地址","type":"string","rules":null,"attribute":null},"ip_location":{"title":"IP所属地","type":"string","rules":null,"attribute":null},"request_data":{"title":"请求数据","type":"mixed","rules":null,"attribute":null},"response_code":{"title":"响应状态码","type":"string","rules":null,"attribute":null},"response_data":{"title":"响应数据","type":"mixed","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"创建时间","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"更新时间","type":"mixed","rules":null,"attribute":null},"deleted_at":{"title":"删除时间","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserSchema":{"properties":{"id":{"title":"用户ID,主键","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"user_type":{"title":"用户类型:(100系统用户)","type":"string","rules":null,"attribute":null},"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"phone":{"title":"手机","type":"string","rules":null,"attribute":null},"email":{"title":"用户邮箱","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"login_ip":{"title":"最后登陆IP","type":"string","rules":null,"attribute":null},"login_time":{"title":"最后登陆时间","type":"string","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"创建时间","type":"string","rules":null,"attribute":null},"updated_at":{"title":"更新时间","type":"string","rules":null,"attribute":null},"deleted_at":{"title":"删除时间","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"}},"securitySchemes":{"Bearer":{"type":"http","name":"Authorization","bearerFormat":"JWT","scheme":"bearer"},"ApiKey":{"type":"apiKey","name":"token","in":"header"}}},"externalDocs":{"description":"开发文档","url":"https:\/\/v3.doc.mineadmin.com"}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ Potential issue

Remove sensitive JWT tokens from API examples

The OpenAPI specification contains actual JWT tokens in examples that should be replaced with placeholder values. Found JWT tokens in:

  • PassportLoginVo schema example
  • /admin/passport/login response example
  • PassportLoginVo access_token example

Replace all JWT token examples with a placeholder like "eyJhbGciOiJIUzI1NiIs..." to avoid exposing sensitive information.

🔗 Analysis chain

Remove sensitive JWT tokens from examples

The OpenAPI specification contains actual JWT tokens in examples which could pose a security risk. Replace them with placeholder values like "eyJhbGciOiJIUzI1NiIs...".

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for JWT patterns in the specification
rg -i 'eyJ[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*'

Length of output: 35462

🧰 Tools
🪛 Gitleaks

1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 checkov

[HIGH] 0-1: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[HIGH] 0-1: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[HIGH] 0-1: Ensure that API keys are not sent over cleartext

(CKV_OPENAPI_20)


🛠️ Refactor suggestion

Add validation rules to schemas

The MenuSchema and UserSchema lack proper validation rules for required fields and field formats. This could lead to data integrity issues.

Add validation rules to MenuSchema:

"MenuSchema": {
  "properties": {
    "name": {
      "title": "菜单名称",
      "type": "string",
+     "minLength": 1,
+     "maxLength": 50,
+     "pattern": "^[a-zA-Z0-9_\u4e00-\u9fa5]+$"
    },
    "path": {
      "title": "路由地址",
      "type": "string",
+     "pattern": "^\/[a-zA-Z0-9\/_-]*$"
    }
  },
+ "required": ["name", "path", "type"]
}

Committable suggestion was skipped due to low confidence.

🧰 Tools
🪛 Gitleaks

1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 checkov

[HIGH] 0-1: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[HIGH] 0-1: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[HIGH] 0-1: Ensure that API keys are not sent over cleartext

(CKV_OPENAPI_20)


⚠️ Potential issue

Add global security requirements

The API specification should define global security requirements to ensure consistent authentication across all endpoints. This prevents accidentally exposing sensitive endpoints.

Add the following at the root level:

{
  "openapi": "3.0.0",
+ "security": [
+   {
+     "Bearer": [],
+     "ApiKey": []
+   }
+ ],
  ...
}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{"openapi":"3.0.0","info":{"title":"MineAdmin","description":"MineAdmin 是一款基于 Hyperf 开发的开源管理系统,提供了用户管理、权限管理、系统设置、系统监控等功能。","termsOfService":"https:\/\/www.mineadmin.com","contact":{"name":"MineAdmin","url":"https:\/\/www.mineadmin.com\/about"},"license":{"name":"Apache2.0","url":"https:\/\/github.com\/mineadmin\/MineAdmin\/blob\/master\/LICENSE"},"version":"3.0.0"},"servers":[{"url":"http:\/\/127.0.0.1:9501","description":"本地服务"},{"url":"https:\/\/demo.mineadmin.com","description":"演示服务"}],"paths":{"\/admin\/attachment\/list":{"get":{"tags":["数据中心"],"summary":"附件列表","operationId":"AttachmentList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/AttachmentSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/attachment\/upload":{"post":{"tags":["数据中心"],"summary":"上传附件","operationId":"UploadAttachment","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/attachment\/{id}":{"delete":{"operationId":"DeleteAttachment","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}}}},"\/admin\/user-login-log\/list":{"get":{"tags":["系统管理"],"summary":"用户登录日志列表","operationId":"UserLoginLogList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserLoginLogSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-login-log":{"delete":{"tags":["系统管理"],"summary":"删除用户登录日志","operationId":"UserLoginLogDelete","security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-operation-log\/list":{"get":{"tags":["系统管理"],"summary":"用户操作日志列表","operationId":"UserOperationLogList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserOperationLogSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-operation-log":{"delete":{"tags":["系统管理"],"summary":"删除用户操作日志","operationId":"UserOperationLogDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"$ref":"#\/components\/schemas\/Result"},"data":{"$ref":"#\/components\/schemas\/Result"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/login":{"post":{"tags":["admin:passport"],"summary":"系统登录","operationId":"passportLogin","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PassportLoginRequest"},"example":"{\"username\":\"admin\",\"password\":\"123456\"}"}},"_content":{"$ref":"#\/components\/schemas\/PassportLoginRequest"}},"responses":{"200":{"description":"登录成功返回对象","content":{"application\/json":{"schema":{"title":"登录成功","properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/PassportLoginVo"}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"refresh_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"expire_at\":300}}"}}}}}},"\/admin\/passport\/logout":{"post":{"tags":["admin:passport"],"summary":"退出","operationId":"passportLogout","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/getInfo":{"get":{"tags":["admin:passport"],"summary":"获取用户信息","operationId":"getInfo","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/UserSchema"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/refresh":{"post":{"tags":["admin:passport"],"summary":"刷新token","operationId":"refresh","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/PassportLoginVo"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu\/list":{"get":{"tags":["菜单管理"],"summary":"菜单列表","operationId":"menuList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu":{"post":{"tags":["菜单管理"],"summary":"创建菜单","operationId":"menuCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MenuRequest"}}},"_content":{"$ref":"#\/components\/schemas\/MenuRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["菜单管理"],"summary":"删除菜单","operationId":"menuDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu\/{id}":{"put":{"tags":["菜单管理"],"summary":"编辑菜单","operationId":"menuEdit","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MenuRequest"}}},"_content":{"$ref":"#\/components\/schemas\/MenuRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/list":{"get":{"tags":["角色管理"],"summary":"角色列表","operationId":"roleList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoleSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role":{"post":{"tags":["角色管理"],"summary":"创建角色","operationId":"roleCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/RoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["角色管理"],"summary":"删除角色","operationId":"roleDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/{id}":{"put":{"tags":["角色管理"],"summary":"保存角色","operationId":"roleSave","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/RoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/{id}\/permissions":{"get":{"tags":["角色管理"],"summary":"获取角色权限列表","operationId":"setRolePermission","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":59,\"name\":\"xdrljpefIZ\"},{\"id\":60,\"name\":\"GIdOejHL2R\"},{\"id\":61,\"name\":\"ZpEnJv00VG\"}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"put":{"tags":["角色管理"],"summary":"赋予角色权限","operationId":"roleGrantPermissions","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BatchGrantPermissionsForRoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/BatchGrantPermissionsForRoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/list":{"get":{"tags":["用户管理"],"summary":"用户列表","operationId":"userList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user":{"put":{"tags":["用户管理"],"summary":"更新用户信息","operationId":"updateInfo","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"post":{"tags":["用户管理"],"summary":"创建用户","operationId":"userCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["用户管理"],"summary":"删除用户","operationId":"userDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/password":{"put":{"tags":["用户管理"],"summary":"重置密码","operationId":"updatePassword","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/{userId}":{"put":{"tags":["用户管理"],"summary":"更新用户","operationId":"userUpdate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/{userId}\/roles":{"get":{"tags":["用户管理"],"summary":"获取用户角色列表","operationId":"getUserRole","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"put":{"tags":["用户管理"],"summary":"批量授权用户角色","operationId":"batchGrantRolesForUser","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BatchGrantRolesForUserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/menus":{"get":{"tags":["权限"],"summary":"获取当前用户菜单","operationId":"PermissionMenus","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/MenuSchema"},"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":290,\"parent_id\":0,\"name\":\"LAme6dFrlf\",\"code\":\"eNiYagCtJp\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":292,\"parent_id\":0,\"name\":\"mMMSlHc8cv\",\"code\":\"xzobstyEmP\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":294,\"parent_id\":0,\"name\":\"ot8fL3u7QZ\",\"code\":\"kCbrLhgYDj\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/roles":{"get":{"tags":["权限"],"summary":"获取当前用户角色","operationId":"PermissionRoles","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoleSchema"},"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":290,\"parent_id\":0,\"name\":\"LAme6dFrlf\",\"code\":\"eNiYagCtJp\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":292,\"parent_id\":0,\"name\":\"mMMSlHc8cv\",\"code\":\"xzobstyEmP\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":294,\"parent_id\":0,\"name\":\"ot8fL3u7QZ\",\"code\":\"kCbrLhgYDj\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/update":{"post":{"tags":["权限"],"summary":"更新用户信息","operationId":"updateInfo","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/api\/v1\/login":{"post":{"tags":["api"],"summary":"用户登录","operationId":"ApiV1Login"}}},"components":{"schemas":{"PassportLoginRequest":{"title":"登录请求","description":"登录请求参数","properties":{"username":{"description":"用户名","type":"string","rules":null,"attribute":null},"password":{"description":"密码","type":"string","rules":null,"attribute":null}},"type":"object"},"BatchGrantPermissionsForRoleRequest":{"title":"批量授权角色权限","properties":{"permission_ids":{"description":"权限ID","type":"array","example":"[1,2,3]","rules":null,"attribute":null}},"type":"object"},"BatchGrantRolesForUserRequest":{"title":"批量授权用户角色","properties":{"role_ids":{"description":"角色ID","type":"array","example":"[1,2,3]","rules":null,"attribute":null}},"type":"object"},"MenuRequest":{"properties":{"parent_id":{"title":"父ID","type":"integer","rules":null,"attribute":null},"name":{"title":"菜单名称","type":"string","rules":null,"attribute":null},"component":{"title":"组件路径","type":"string","rules":null,"attribute":null},"redirect":{"title":"重定向地址","type":"string","rules":null,"attribute":null},"type":{"title":"菜单类型, (M菜单 B按钮 L链接 I iframe)","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"PermissionRequest":{"properties":{"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null}},"type":"object"},"RoleRequest":{"properties":{"name":{"title":"角色名称","type":"string","rules":null,"attribute":null},"code":{"title":"角色代码","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserRequest":{"title":"创建用户","required":["username","user_type","nickname","phone","email","avatar","signed","status","backend_setting","remark"],"properties":{"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"user_type":{"title":"用户类型:(100系统用户)","type":"string","rules":null,"attribute":null},"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"phone":{"title":"手机","type":"string","rules":null,"attribute":null},"email":{"title":"用户邮箱","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UploadRequest":{"title":"上传附件","properties":{"file":{"description":"文件","type":"file","rules":null,"attribute":null}},"type":"object"},"PassportLoginVo":{"description":"登录成功返回","properties":{"access_token":{"description":"Access Token","type":"string","example":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k","rules":null,"attribute":null},"refresh_token":{"description":"Refresh Token","type":"string","example":"eyJ0eXAiOi","rules":null,"attribute":null},"expire_at":{"description":"过期时间,单位秒","type":"integer","example":300,"rules":null,"attribute":null}},"type":"object","example":"{\"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"expire_at\":300}"},"Result":{"title":"Api Response","description":"Api Response","properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"title":"响应消息","type":"string","nullable":true,"rules":null,"attribute":null},"data":{"title":"响应数据","type":"array","nullable":true,"rules":null,"attribute":null}},"type":"object"},"ResultCode":{"title":"ResultCode","type":"integer","default":200,"enum":[200,500,401,403,404,405,406,422]},"AttachmentSchema":{"title":"AttachmentSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"storage_mode":{"title":"存储模式 (1 本地 2 阿里云 3 七牛云 4 腾讯云)","type":"integer","rules":null,"attribute":null},"origin_name":{"title":"原文件名","type":"string","rules":null,"attribute":null},"object_name":{"title":"新文件名","type":"string","rules":null,"attribute":null},"hash":{"title":"文件hash","type":"string","rules":null,"attribute":null},"mime_type":{"title":"资源类型","type":"string","rules":null,"attribute":null},"storage_path":{"title":"存储目录","type":"string","rules":null,"attribute":null},"suffix":{"title":"文件后缀","type":"string","rules":null,"attribute":null},"size_byte":{"title":"字节数","type":"integer","rules":null,"attribute":null},"size_info":{"title":"文件大小","type":"string","rules":null,"attribute":null},"url":{"title":"url地址","type":"string","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"","type":"mixed","rules":null,"attribute":null},"deleted_at":{"title":"","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"MenuMetaSchema":{"title":"MenuMetaSchema","properties":{"title":{"title":"标题","type":"string","rules":null,"attribute":null},"i18n":{"title":"国际化","type":"string","rules":null,"attribute":null},"badge":{"title":"徽章","type":"string","rules":null,"attribute":null},"icon":{"title":"图标","type":"string","rules":null,"attribute":null},"affix":{"title":"是否固定","type":"boolean","rules":null,"attribute":null},"hidden":{"title":"是否隐藏","type":"boolean","rules":null,"attribute":null},"type":{"title":"类型","type":"string","rules":null,"attribute":null},"cache":{"title":"是否缓存","type":"boolean","rules":null,"attribute":null},"copyright":{"title":"是否显示版权","type":"boolean","rules":null,"attribute":null},"breadcrumbEnable":{"title":"是否显示面包屑","type":"boolean","rules":null,"attribute":null},"componentPath":{"title":"视图前缀路径","type":"string","rules":null,"attribute":null},"componentSuffix":{"title":"视图文件类型","type":"string","rules":null,"attribute":null},"link":{"title":"链接","type":"string","rules":null,"attribute":null}},"type":"object"},"MenuSchema":{"title":"MenuSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"parent_id":{"title":"父ID","type":"integer","rules":null,"attribute":null},"name":{"title":"菜单名称","type":"string","rules":null,"attribute":null},"path":{"title":"路由地址","type":"string","rules":null,"attribute":null},"component":{"title":"组件路径","type":"string","rules":null,"attribute":null},"redirect":{"title":"重定向地址","type":"string","rules":null,"attribute":null},"type":{"title":"菜单类型, (M菜单 B按钮 L链接 I iframe)","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null},"meta":{"title":"附加属性","type":"object","rules":null,"attribute":null}},"type":"object"},"RoleSchema":{"title":"RoleSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"name":{"title":"角色名称","type":"string","rules":null,"attribute":null},"code":{"title":"角色代码","type":"string","rules":null,"attribute":null},"data_scope":{"title":"数据范围(1:全部数据权限 2:自定义数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:本人数据权限)","type":"integer","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null},"deleted_at":{"title":"","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserLoginLogSchema":{"title":"UserLoginLogSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"ip":{"title":"登录IP地址","type":"string","rules":null,"attribute":null},"ip_location":{"title":"IP所属地","type":"string","rules":null,"attribute":null},"os":{"title":"操作系统","type":"string","rules":null,"attribute":null},"browser":{"title":"浏览器","type":"string","rules":null,"attribute":null},"status":{"title":"登录状态 (1成功 2失败)","type":"integer","rules":null,"attribute":null},"message":{"title":"提示消息","type":"string","rules":null,"attribute":null},"login_time":{"title":"登录时间","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserOperationLogSchema":{"title":"UserOperationLogSchema","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"method":{"title":"请求方式","type":"string","rules":null,"attribute":null},"router":{"title":"请求路由","type":"string","rules":null,"attribute":null},"service_name":{"title":"业务名称","type":"string","rules":null,"attribute":null},"ip":{"title":"请求IP地址","type":"string","rules":null,"attribute":null},"ip_location":{"title":"IP所属地","type":"string","rules":null,"attribute":null},"request_data":{"title":"请求数据","type":"mixed","rules":null,"attribute":null},"response_code":{"title":"响应状态码","type":"string","rules":null,"attribute":null},"response_data":{"title":"响应数据","type":"mixed","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"创建时间","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"更新时间","type":"mixed","rules":null,"attribute":null},"deleted_at":{"title":"删除时间","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserSchema":{"properties":{"id":{"title":"用户ID,主键","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"user_type":{"title":"用户类型:(100系统用户)","type":"string","rules":null,"attribute":null},"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"phone":{"title":"手机","type":"string","rules":null,"attribute":null},"email":{"title":"用户邮箱","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"login_ip":{"title":"最后登陆IP","type":"string","rules":null,"attribute":null},"login_time":{"title":"最后登陆时间","type":"string","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"创建时间","type":"string","rules":null,"attribute":null},"updated_at":{"title":"更新时间","type":"string","rules":null,"attribute":null},"deleted_at":{"title":"删除时间","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"}},"securitySchemes":{"Bearer":{"type":"http","name":"Authorization","bearerFormat":"JWT","scheme":"bearer"},"ApiKey":{"type":"apiKey","name":"token","in":"header"}}},"externalDocs":{"description":"开发文档","url":"https:\/\/v3.doc.mineadmin.com"}}
{
"openapi": "3.0.0",
"security": [
{
"Bearer": [],
"ApiKey": []
}
],
"info": {
"title": "MineAdmin",
"description": "MineAdmin 是一款基于 Hyperf 开发的开源管理系统,提供了用户管理、权限管理、系统设置、系统监控等功能。",
...
},
...
}
🧰 Tools
🪛 Gitleaks

1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 checkov

[HIGH] 0-1: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[HIGH] 0-1: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[HIGH] 0-1: Ensure that API keys are not sent over cleartext

(CKV_OPENAPI_20)


⚠️ Potential issue

Enforce HTTPS for API key transmission

API keys should only be transmitted over HTTPS to prevent interception. Update the server configurations to enforce HTTPS.

Update the servers section:

"servers": [
-  {"url": "http://127.0.0.1:9501", "description": "本地服务"},
-  {"url": "https://demo.mineadmin.com", "description": "演示服务"}
+  {"url": "https://127.0.0.1:9501", "description": "本地服务"},
+  {"url": "https://demo.mineadmin.com", "description": "演示服务"}
],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{"openapi":"3.0.0","info":{"title":"MineAdmin","description":"MineAdmin 是一款基于 Hyperf 开发的开源管理系统,提供了用户管理、权限管理、系统设置、系统监控等功能。","termsOfService":"https:\/\/www.mineadmin.com","contact":{"name":"MineAdmin","url":"https:\/\/www.mineadmin.com\/about"},"license":{"name":"Apache2.0","url":"https:\/\/github.com\/mineadmin\/MineAdmin\/blob\/master\/LICENSE"},"version":"3.0.0"},"servers":[{"url":"http:\/\/127.0.0.1:9501","description":"本地服务"},{"url":"https:\/\/demo.mineadmin.com","description":"演示服务"}],"paths":{"\/admin\/attachment\/list":{"get":{"tags":["数据中心"],"summary":"附件列表","operationId":"AttachmentList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/AttachmentSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/attachment\/upload":{"post":{"tags":["数据中心"],"summary":"上传附件","operationId":"UploadAttachment","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/attachment\/{id}":{"delete":{"operationId":"DeleteAttachment","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}}}},"\/admin\/user-login-log\/list":{"get":{"tags":["系统管理"],"summary":"用户登录日志列表","operationId":"UserLoginLogList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserLoginLogSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-login-log":{"delete":{"tags":["系统管理"],"summary":"删除用户登录日志","operationId":"UserLoginLogDelete","security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-operation-log\/list":{"get":{"tags":["系统管理"],"summary":"用户操作日志列表","operationId":"UserOperationLogList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserOperationLogSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user-operation-log":{"delete":{"tags":["系统管理"],"summary":"删除用户操作日志","operationId":"UserOperationLogDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"$ref":"#\/components\/schemas\/Result"},"data":{"$ref":"#\/components\/schemas\/Result"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/login":{"post":{"tags":["admin:passport"],"summary":"系统登录","operationId":"passportLogin","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PassportLoginRequest"},"example":"{\"username\":\"admin\",\"password\":\"123456\"}"}},"_content":{"$ref":"#\/components\/schemas\/PassportLoginRequest"}},"responses":{"200":{"description":"登录成功返回对象","content":{"application\/json":{"schema":{"title":"登录成功","properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/PassportLoginVo"}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":{\"access_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"refresh_token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"expire_at\":300}}"}}}}}},"\/admin\/passport\/logout":{"post":{"tags":["admin:passport"],"summary":"退出","operationId":"passportLogout","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/getInfo":{"get":{"tags":["admin:passport"],"summary":"获取用户信息","operationId":"getInfo","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/UserSchema"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/passport\/refresh":{"post":{"tags":["admin:passport"],"summary":"刷新token","operationId":"refresh","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"$ref":"#\/components\/schemas\/PassportLoginVo"}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu\/list":{"get":{"tags":["菜单管理"],"summary":"菜单列表","operationId":"menuList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu":{"post":{"tags":["菜单管理"],"summary":"创建菜单","operationId":"menuCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MenuRequest"}}},"_content":{"$ref":"#\/components\/schemas\/MenuRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["菜单管理"],"summary":"删除菜单","operationId":"menuDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/menu\/{id}":{"put":{"tags":["菜单管理"],"summary":"编辑菜单","operationId":"menuEdit","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MenuRequest"}}},"_content":{"$ref":"#\/components\/schemas\/MenuRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":{"code":200,"message":"成功","data":[]}},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/list":{"get":{"tags":["角色管理"],"summary":"角色列表","operationId":"roleList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoleSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role":{"post":{"tags":["角色管理"],"summary":"创建角色","operationId":"roleCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/RoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["角色管理"],"summary":"删除角色","operationId":"roleDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/{id}":{"put":{"tags":["角色管理"],"summary":"保存角色","operationId":"roleSave","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/RoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/role\/{id}\/permissions":{"get":{"tags":["角色管理"],"summary":"获取角色权限列表","operationId":"setRolePermission","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":59,\"name\":\"xdrljpefIZ\"},{\"id\":60,\"name\":\"GIdOejHL2R\"},{\"id\":61,\"name\":\"ZpEnJv00VG\"}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"put":{"tags":["角色管理"],"summary":"赋予角色权限","operationId":"roleGrantPermissions","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BatchGrantPermissionsForRoleRequest"}}},"_content":{"$ref":"#\/components\/schemas\/BatchGrantPermissionsForRoleRequest"}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/list":{"get":{"tags":["用户管理"],"summary":"用户列表","operationId":"userList","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserSchema"},"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user":{"put":{"tags":["用户管理"],"summary":"更新用户信息","operationId":"updateInfo","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"post":{"tags":["用户管理"],"summary":"创建用户","operationId":"userCreate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"delete":{"tags":["用户管理"],"summary":"删除用户","operationId":"userDelete","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/password":{"put":{"tags":["用户管理"],"summary":"重置密码","operationId":"updatePassword","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/{userId}":{"put":{"tags":["用户管理"],"summary":"更新用户","operationId":"userUpdate","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/user\/{userId}\/roles":{"get":{"tags":["用户管理"],"summary":"获取用户角色列表","operationId":"getUserRole","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]},"put":{"tags":["用户管理"],"summary":"批量授权用户角色","operationId":"batchGrantRolesForUser","requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BatchGrantRolesForUserRequest"}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/menus":{"get":{"tags":["权限"],"summary":"获取当前用户菜单","operationId":"PermissionMenus","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/MenuSchema"},"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":290,\"parent_id\":0,\"name\":\"LAme6dFrlf\",\"code\":\"eNiYagCtJp\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":292,\"parent_id\":0,\"name\":\"mMMSlHc8cv\",\"code\":\"xzobstyEmP\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":294,\"parent_id\":0,\"name\":\"ot8fL3u7QZ\",\"code\":\"kCbrLhgYDj\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/roles":{"get":{"tags":["权限"],"summary":"获取当前用户角色","operationId":"PermissionRoles","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"total":{"description":"总数量","type":"integer","rules":null,"attribute":null},"list":{"type":"array","items":{"$ref":"#\/components\/schemas\/RoleSchema"},"rules":null,"attribute":null}},"type":"object"},"example":"{\"code\":200,\"message\":\"成功\",\"data\":[{\"id\":290,\"parent_id\":0,\"name\":\"LAme6dFrlf\",\"code\":\"eNiYagCtJp\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":291,\"parent_id\":290,\"name\":\"zFFsqwN3rB\",\"code\":\"isz4eTJANV\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":292,\"parent_id\":0,\"name\":\"mMMSlHc8cv\",\"code\":\"xzobstyEmP\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":293,\"parent_id\":292,\"name\":\"8Sr5vtPSqw\",\"code\":\"9SelwHGooE\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]},{\"id\":294,\"parent_id\":0,\"name\":\"ot8fL3u7QZ\",\"code\":\"kCbrLhgYDj\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]},{\"id\":295,\"parent_id\":294,\"name\":\"6uQFNiMzJa\",\"code\":\"GVvC2iPU92\",\"icon\":\"test\",\"route\":\"test\",\"component\":\"test\",\"redirect\":\"test\",\"is_hidden\":1,\"type\":\"M\",\"status\":1,\"sort\":1,\"created_by\":1,\"updated_by\":1,\"created_at\":\"2024-08-02 00:32:26\",\"updated_at\":\"2024-08-02 00:32:26\",\"deleted_at\":null,\"remark\":\"test\",\"children\":[]}]}"}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/admin\/permission\/update":{"post":{"tags":["权限"],"summary":"更新用户信息","operationId":"updateInfo","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"rules":null,"attribute":null},"data":{"rules":null,"attribute":null}},"type":"object"}}}}},"security":[{"Bearer":[],"ApiKey":[]}]}},"\/api\/v1\/login":{"post":{"tags":["api"],"summary":"用户登录","operationId":"ApiV1Login"}}},"components":{"schemas":{"PassportLoginRequest":{"title":"登录请求","description":"登录请求参数","properties":{"username":{"description":"用户名","type":"string","rules":null,"attribute":null},"password":{"description":"密码","type":"string","rules":null,"attribute":null}},"type":"object"},"BatchGrantPermissionsForRoleRequest":{"title":"批量授权角色权限","properties":{"permission_ids":{"description":"权限ID","type":"array","example":"[1,2,3]","rules":null,"attribute":null}},"type":"object"},"BatchGrantRolesForUserRequest":{"title":"批量授权用户角色","properties":{"role_ids":{"description":"角色ID","type":"array","example":"[1,2,3]","rules":null,"attribute":null}},"type":"object"},"MenuRequest":{"properties":{"parent_id":{"title":"父ID","type":"integer","rules":null,"attribute":null},"name":{"title":"菜单名称","type":"string","rules":null,"attribute":null},"component":{"title":"组件路径","type":"string","rules":null,"attribute":null},"redirect":{"title":"重定向地址","type":"string","rules":null,"attribute":null},"type":{"title":"菜单类型, (M菜单 B按钮 L链接 I iframe)","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"PermissionRequest":{"properties":{"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null}},"type":"object"},"RoleRequest":{"properties":{"name":{"title":"角色名称","type":"string","rules":null,"attribute":null},"code":{"title":"角色代码","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserRequest":{"title":"创建用户","required":["username","user_type","nickname","phone","email","avatar","signed","status","backend_setting","remark"],"properties":{"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"user_type":{"title":"用户类型:(100系统用户)","type":"string","rules":null,"attribute":null},"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"phone":{"title":"手机","type":"string","rules":null,"attribute":null},"email":{"title":"用户邮箱","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UploadRequest":{"title":"上传附件","properties":{"file":{"description":"文件","type":"file","rules":null,"attribute":null}},"type":"object"},"PassportLoginVo":{"description":"登录成功返回","properties":{"access_token":{"description":"Access Token","type":"string","example":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k","rules":null,"attribute":null},"refresh_token":{"description":"Refresh Token","type":"string","example":"eyJ0eXAiOi","rules":null,"attribute":null},"expire_at":{"description":"过期时间,单位秒","type":"integer","example":300,"rules":null,"attribute":null}},"type":"object","example":"{\"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MjIwOTQwNTYsIm5iZiI6MTcyMjA5NDAiwiZXhwIjoxNzIyMDk0MzU2fQ.7EKiNHb_ZeLJ1NArDpmK6sdlP7NsDecsTKLSZn_3D7k\",\"expire_at\":300}"},"Result":{"title":"Api Response","description":"Api Response","properties":{"code":{"$ref":"#\/components\/schemas\/ResultCode"},"message":{"title":"响应消息","type":"string","nullable":true,"rules":null,"attribute":null},"data":{"title":"响应数据","type":"array","nullable":true,"rules":null,"attribute":null}},"type":"object"},"ResultCode":{"title":"ResultCode","type":"integer","default":200,"enum":[200,500,401,403,404,405,406,422]},"AttachmentSchema":{"title":"AttachmentSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"storage_mode":{"title":"存储模式 (1 本地 2 阿里云 3 七牛云 4 腾讯云)","type":"integer","rules":null,"attribute":null},"origin_name":{"title":"原文件名","type":"string","rules":null,"attribute":null},"object_name":{"title":"新文件名","type":"string","rules":null,"attribute":null},"hash":{"title":"文件hash","type":"string","rules":null,"attribute":null},"mime_type":{"title":"资源类型","type":"string","rules":null,"attribute":null},"storage_path":{"title":"存储目录","type":"string","rules":null,"attribute":null},"suffix":{"title":"文件后缀","type":"string","rules":null,"attribute":null},"size_byte":{"title":"字节数","type":"integer","rules":null,"attribute":null},"size_info":{"title":"文件大小","type":"string","rules":null,"attribute":null},"url":{"title":"url地址","type":"string","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"","type":"mixed","rules":null,"attribute":null},"deleted_at":{"title":"","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"MenuMetaSchema":{"title":"MenuMetaSchema","properties":{"title":{"title":"标题","type":"string","rules":null,"attribute":null},"i18n":{"title":"国际化","type":"string","rules":null,"attribute":null},"badge":{"title":"徽章","type":"string","rules":null,"attribute":null},"icon":{"title":"图标","type":"string","rules":null,"attribute":null},"affix":{"title":"是否固定","type":"boolean","rules":null,"attribute":null},"hidden":{"title":"是否隐藏","type":"boolean","rules":null,"attribute":null},"type":{"title":"类型","type":"string","rules":null,"attribute":null},"cache":{"title":"是否缓存","type":"boolean","rules":null,"attribute":null},"copyright":{"title":"是否显示版权","type":"boolean","rules":null,"attribute":null},"breadcrumbEnable":{"title":"是否显示面包屑","type":"boolean","rules":null,"attribute":null},"componentPath":{"title":"视图前缀路径","type":"string","rules":null,"attribute":null},"componentSuffix":{"title":"视图文件类型","type":"string","rules":null,"attribute":null},"link":{"title":"链接","type":"string","rules":null,"attribute":null}},"type":"object"},"MenuSchema":{"title":"MenuSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"parent_id":{"title":"父ID","type":"integer","rules":null,"attribute":null},"name":{"title":"菜单名称","type":"string","rules":null,"attribute":null},"path":{"title":"路由地址","type":"string","rules":null,"attribute":null},"component":{"title":"组件路径","type":"string","rules":null,"attribute":null},"redirect":{"title":"重定向地址","type":"string","rules":null,"attribute":null},"type":{"title":"菜单类型, (M菜单 B按钮 L链接 I iframe)","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null},"meta":{"title":"附加属性","type":"object","rules":null,"attribute":null}},"type":"object"},"RoleSchema":{"title":"RoleSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"name":{"title":"角色名称","type":"string","rules":null,"attribute":null},"code":{"title":"角色代码","type":"string","rules":null,"attribute":null},"data_scope":{"title":"数据范围(1:全部数据权限 2:自定义数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:本人数据权限)","type":"integer","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"sort":{"title":"排序","type":"integer","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"","type":"string","rules":null,"attribute":null},"updated_at":{"title":"","type":"string","rules":null,"attribute":null},"deleted_at":{"title":"","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserLoginLogSchema":{"title":"UserLoginLogSchema","properties":{"id":{"title":"主键","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"ip":{"title":"登录IP地址","type":"string","rules":null,"attribute":null},"ip_location":{"title":"IP所属地","type":"string","rules":null,"attribute":null},"os":{"title":"操作系统","type":"string","rules":null,"attribute":null},"browser":{"title":"浏览器","type":"string","rules":null,"attribute":null},"status":{"title":"登录状态 (1成功 2失败)","type":"integer","rules":null,"attribute":null},"message":{"title":"提示消息","type":"string","rules":null,"attribute":null},"login_time":{"title":"登录时间","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserOperationLogSchema":{"title":"UserOperationLogSchema","properties":{"id":{"title":"","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"method":{"title":"请求方式","type":"string","rules":null,"attribute":null},"router":{"title":"请求路由","type":"string","rules":null,"attribute":null},"service_name":{"title":"业务名称","type":"string","rules":null,"attribute":null},"ip":{"title":"请求IP地址","type":"string","rules":null,"attribute":null},"ip_location":{"title":"IP所属地","type":"string","rules":null,"attribute":null},"request_data":{"title":"请求数据","type":"mixed","rules":null,"attribute":null},"response_code":{"title":"响应状态码","type":"string","rules":null,"attribute":null},"response_data":{"title":"响应数据","type":"mixed","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"创建时间","type":"mixed","rules":null,"attribute":null},"updated_at":{"title":"更新时间","type":"mixed","rules":null,"attribute":null},"deleted_at":{"title":"删除时间","type":"mixed","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"},"UserSchema":{"properties":{"id":{"title":"用户ID,主键","type":"integer","rules":null,"attribute":null},"username":{"title":"用户名","type":"string","rules":null,"attribute":null},"user_type":{"title":"用户类型:(100系统用户)","type":"string","rules":null,"attribute":null},"nickname":{"title":"用户昵称","type":"string","rules":null,"attribute":null},"phone":{"title":"手机","type":"string","rules":null,"attribute":null},"email":{"title":"用户邮箱","type":"string","rules":null,"attribute":null},"avatar":{"title":"用户头像","type":"string","rules":null,"attribute":null},"signed":{"title":"个人签名","type":"string","rules":null,"attribute":null},"status":{"title":"状态 (1正常 2停用)","type":"integer","rules":null,"attribute":null},"login_ip":{"title":"最后登陆IP","type":"string","rules":null,"attribute":null},"login_time":{"title":"最后登陆时间","type":"string","rules":null,"attribute":null},"backend_setting":{"title":"后台设置数据","type":"array","rules":null,"attribute":null},"created_by":{"title":"创建者","type":"integer","rules":null,"attribute":null},"updated_by":{"title":"更新者","type":"integer","rules":null,"attribute":null},"created_at":{"title":"创建时间","type":"string","rules":null,"attribute":null},"updated_at":{"title":"更新时间","type":"string","rules":null,"attribute":null},"deleted_at":{"title":"删除时间","type":"string","rules":null,"attribute":null},"remark":{"title":"备注","type":"string","rules":null,"attribute":null}},"type":"object"}},"securitySchemes":{"Bearer":{"type":"http","name":"Authorization","bearerFormat":"JWT","scheme":"bearer"},"ApiKey":{"type":"apiKey","name":"token","in":"header"}}},"externalDocs":{"description":"开发文档","url":"https:\/\/v3.doc.mineadmin.com"}}
{"openapi":"3.0.0","info":{"title":"MineAdmin","description":"MineAdmin 是一款基于 Hyperf 开发的开源管理系统,提供了用户管理、权限管理、系统设置、系统监控等功能。","termsOfService":"https:\/\/www.mineadmin.com","contact":{"name":"MineAdmin","url":"https:\/\/www.mineadmin.com\/about"},"license":{"name":"Apache2.0","url":"https:\/\/github.com\/mineadmin\/MineAdmin\/blob\/master\/LICENSE"},"version":"3.0.0"},"servers":[{"url":"https:\/\/127.0.0.1:9501","description":"本地服务"},{"url":"https:\/\/demo.mineadmin.com","description":"演示服务"}],"paths":{
🧰 Tools
🪛 Gitleaks

1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)


1-1: Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data.

(jwt)

🪛 checkov

[HIGH] 0-1: Ensure that the global security field has rules defined

(CKV_OPENAPI_4)


[HIGH] 0-1: Ensure that security operations is not empty.

(CKV_OPENAPI_5)


[HIGH] 0-1: Ensure that API keys are not sent over cleartext

(CKV_OPENAPI_20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant