3.3 KiB
3.3 KiB
API Documentation for TemplateFileController
This document provides details about the API endpoints exposed by the TemplateFileController.
Base Path: /generator/templateFile
1. Query Code Template File List
- HTTP Method:
GET - Path:
/list - Permissions:
generator:template:list - Description: Retrieves a paginated list of code template files.
- Request Parameters:
templateFile(Query Param,TemplateFileobject): Object containing filter criteria for template files.
- Responses:
200 OK: ReturnsTableDataInfocontaining a list ofTemplateFileobjects.
2. Query Code Template File List by Template ID
- HTTP Method:
GET - Path:
/listByTemplateId/{templateId} - Permissions:
generator:template:list - Description: Retrieves a paginated list of code template files for a specific template ID.
- Path Variables:
templateId(Long): The ID of the template.
- Responses:
200 OK: ReturnsTableDataInfocontaining a list ofTemplateFileobjects.
3. Get Code Template File Details
- HTTP Method:
GET - Path:
/{templateFileId} - Permissions:
generator:template:query - Description: Retrieves detailed information about a specific code template file.
- Path Variables:
templateFileId(Long): The ID of the code template file.
- Responses:
200 OK: ReturnsAjaxResultcontaining theTemplateFileobject.
4. Add New Code Template File
- HTTP Method:
POST - Path:
/ - Permissions:
generator:template:add - Description: Creates a new code template file.
- Request Body:
templateFile(TemplateFileobject, validated): The code template file data to be created.
- Responses:
200 OK: ReturnsAjaxResultindicating the success or failure of the operation.
5. Modify Code Template File
- HTTP Method:
PUT - Path:
/ - Permissions:
generator:template:edit - Description: Updates an existing code template file.
- Request Body:
templateFile(TemplateFileobject, validated): The code template file data to be updated.
- Responses:
200 OK: ReturnsAjaxResultindicating the success or failure of the operation.
6. Delete Code Template File(s)
- HTTP Method:
DELETE - Path:
/{templateFileIds} - Permissions:
generator:template:remove - Description: Deletes one or more code template files by their IDs.
- Path Variables:
templateFileIds(Array of Long): An array of code template file IDs to be deleted.
- Responses:
200 OK: ReturnsAjaxResultindicating the success or failure of the operation.
7. Delete Code Template Files by Template ID
- HTTP Method:
DELETE - Path:
/deleteByTemplateId/{templateId} - Permissions:
generator:template:remove - Description: Deletes all code template files associated with a specific template ID.
- Path Variables:
templateId(Long): The ID of the template whose files are to be deleted.
- Responses:
200 OK: ReturnsAjaxResultindicating the success or failure of the operation.