init
This commit is contained in:
78
RuoYi-Vue/docs/SysCodeSnippetController.md
Normal file
78
RuoYi-Vue/docs/SysCodeSnippetController.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# API Documentation for SysCodeSnippetController
|
||||
|
||||
This document provides details about the API endpoints managed by `SysCodeSnippetController`.
|
||||
|
||||
## Base Path: `/generator/snippet`
|
||||
|
||||
---
|
||||
|
||||
### 1. List Code Snippets
|
||||
|
||||
* **Description:** Retrieves a paginated list of code snippets.
|
||||
* **Endpoint:** `GET /list`
|
||||
* **Permissions:** `generator:snippet:list`
|
||||
* **Request Parameters:**
|
||||
* `SysCodeSnippet` object (passed as query parameters) - Used for filtering the list.
|
||||
* **Responses:**
|
||||
* `200 OK`: Returns `TableDataInfo` containing a list of `SysCodeSnippet` objects.
|
||||
|
||||
---
|
||||
|
||||
### 2. Export Code Snippets
|
||||
|
||||
* **Description:** Exports the list of code snippets to an Excel file.
|
||||
* **Endpoint:** `POST /export`
|
||||
* **Permissions:** `generator:snippet:export`
|
||||
* **Request Parameters:**
|
||||
* `HttpServletResponse` response
|
||||
* `SysCodeSnippet` object (passed as query parameters) - Used for filtering the list to be exported.
|
||||
* **Responses:**
|
||||
* Triggers a file download with the Excel data.
|
||||
|
||||
---
|
||||
|
||||
### 3. Get Code Snippet Details
|
||||
|
||||
* **Description:** Retrieves detailed information about a specific code snippet.
|
||||
* **Endpoint:** `GET /{snippetId}`
|
||||
* **Permissions:** `generator:snippet:query`
|
||||
* **Path Variables:**
|
||||
* `snippetId` (Long): The ID of the code snippet.
|
||||
* **Responses:**
|
||||
* `200 OK`: Returns `AjaxResult` containing the `SysCodeSnippet` object.
|
||||
|
||||
---
|
||||
|
||||
### 4. Add New Code Snippet
|
||||
|
||||
* **Description:** Creates a new code snippet.
|
||||
* **Endpoint:** `POST /`
|
||||
* **Permissions:** `generator:snippet:add`
|
||||
* **Request Body:**
|
||||
* `SysCodeSnippet` object (JSON)
|
||||
* **Responses:**
|
||||
* `200 OK`: Returns `AjaxResult` indicating success or failure of the operation.
|
||||
|
||||
---
|
||||
|
||||
### 5. Update Code Snippet
|
||||
|
||||
* **Description:** Modifies an existing code snippet.
|
||||
* **Endpoint:** `PUT /`
|
||||
* **Permissions:** `generator:snippet:edit`
|
||||
* **Request Body:**
|
||||
* `SysCodeSnippet` object (JSON)
|
||||
* **Responses:**
|
||||
* `200 OK`: Returns `AjaxResult` indicating success or failure of the operation.
|
||||
|
||||
---
|
||||
|
||||
### 6. Delete Code Snippet(s)
|
||||
|
||||
* **Description:** Deletes one or more code snippets.
|
||||
* **Endpoint:** `DELETE /{snippetIds}`
|
||||
* **Permissions:** `generator:snippet:remove`
|
||||
* **Path Variables:**
|
||||
* `snippetIds` (Long[]): An array of IDs of the code snippets to be deleted.
|
||||
* **Responses:**
|
||||
* `200 OK`: Returns `AjaxResult` indicating success or failure of the operation.
|
||||
Reference in New Issue
Block a user