Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement][api] Fix typo for controllers #15438

Merged
merged 4 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class AlertGroupController extends BaseController {
* @param description description
* @return create result code
*/
@Operation(summary = "createAlertgroup", description = "CREATE_ALERT_GROUP_NOTES")
@Operation(summary = "createAlertGroup", description = "CREATE_ALERT_GROUP_NOTES")
@Parameters({
@Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema = @Schema(implementation = String.class)),
@Parameter(name = "description", description = "DESC", schema = @Schema(implementation = String.class)),
Expand All @@ -100,7 +100,7 @@ public Result<AlertGroup> createAlertGroup(@Parameter(hidden = true) @RequestAtt
* @param loginUser login user
* @return alert group list
*/
@Operation(summary = "listAlertgroupById", description = "QUERY_ALERT_GROUP_LIST_NOTES")
@Operation(summary = "listAlertGroupById", description = "QUERY_ALERT_GROUP_LIST_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ALL_ALERTGROUP_ERROR)
Expand All @@ -116,7 +116,7 @@ public Result<List<AlertGroup>> list(@Parameter(hidden = true) @RequestAttribute
* @param loginUser login user
* @return normal alert group list
*/
@Operation(summary = "listNormalAlertgroupById", description = "QUERY_ALERT_GROUP_LIST_NOTES")
@Operation(summary = "listNormalAlertGroupById", description = "QUERY_ALERT_GROUP_LIST_NOTES")
@GetMapping(value = "/normal-list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_ALL_ALERTGROUP_ERROR)
Expand Down Expand Up @@ -155,7 +155,7 @@ public Result<PageInfo<AlertGroup>> listPaging(@Parameter(hidden = true) @Reques
}

/**
* check alarm group detail by Id
* check alarm group detail by id
*
* @param loginUser login user
* @param id alert group id
Expand Down Expand Up @@ -185,7 +185,7 @@ public Result<AlertGroup> queryAlertGroupById(@Parameter(hidden = true) @Request
* @param description description
* @return update result code
*/
@Operation(summary = "updateAlertgroup", description = "UPDATE_ALERT_GROUP_NOTES")
@Operation(summary = "updateAlertGroup", description = "UPDATE_ALERT_GROUP_NOTES")
@Parameters({
@Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema = @Schema(implementation = int.class, example = "100")),
@Parameter(name = "groupName", description = "GROUP_NAME", required = true, schema = @Schema(implementation = String.class)),
Expand All @@ -212,7 +212,7 @@ public Result<AlertGroup> updateAlertGroupById(@Parameter(hidden = true) @Reques
* @param id alert group id
* @return delete result code
*/
@Operation(summary = "delAlertgroupById", description = "DELETE_ALERT_GROUP_BY_ID_NOTES")
@Operation(summary = "delAlertGroupById", description = "DELETE_ALERT_GROUP_BY_ID_NOTES")
@Parameters({
@Parameter(name = "id", description = "ALERT_GROUP_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public Result success(Object list) {

/**
* return the data use Map format, for example, passing the value of key, value, passing a value
* eg. "/user/add" then return user name: zhangsan
* e.g. "/user/add" then return username: zhangsan
*
* @param msg message
* @param object success object data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public class CloudController extends BaseController {
private CloudService cloudService;

/**
* get datafactory list
* get data factory list
*
* @param loginUser login user
* @return datafactory name list
* @return data factory name list
*/
@Operation(summary = "listDataFactory", description = "LIST_DATA_FACTORY")
@GetMapping(value = "/azure/datafactory/factories")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class ClusterController extends BaseController {
@PostMapping(value = "/create")
@ResponseStatus(HttpStatus.CREATED)
@ApiException(CREATE_CLUSTER_ERROR)
public Result<Long> createProject(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
public Result<Long> createCluster(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("name") String name,
@RequestParam("config") String config,
@RequestParam(value = "description", required = false) String description) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public Result<Boolean> deleteDataSource(@Parameter(hidden = true) @RequestAttrib
*
* @param loginUser login user
* @param name data source name
* @return true if data source name not exists.otherwise return false
* @return true if data source name not exists, otherwise return false
*/
@Operation(summary = "verifyDataSourceName", description = "VERIFY_DATA_SOURCE_NOTES")
@Parameters({
Expand All @@ -281,9 +281,9 @@ public Result<Boolean> verifyDataSourceName(@Parameter(hidden = true) @RequestAt
*
* @param loginUser login user
* @param userId user id
* @return unauthed data source result code
* @return unauthorized data source result code
*/
@Operation(summary = "unauthDatasource", description = "UNAUTHORIZED_DATA_SOURCE_NOTES")
@Operation(summary = "unauthorizedDatasource", description = "UNAUTHORIZED_DATA_SOURCE_NOTES")
@Parameters({
@Parameter(name = "userId", description = "USER_ID", required = true, schema = @Schema(implementation = int.class, example = "100"))
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class DynamicTaskTypeController extends BaseController {
* @param loginUser login user
* @return dynamic task category list
*/
@Operation(summary = "listTaskCates", description = "LIST_TASK_TYPE_CATES")
@Operation(summary = "listTaskCategories", description = "LIST_TASK_TYPE_CATEGORIES")
@GetMapping(value = "/taskCategories")
@ResponseStatus(HttpStatus.OK)
@ApiException(LIST_TASK_TYPE_ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public Result delNamespaceById(@Parameter(hidden = true) @RequestAttribute(value
*
* @param loginUser login user
* @param userId user id
* @return the namespaces which user have not permission to see
* @return the namespaces which user have no permission to see
*/
@Operation(summary = "queryUnauthorizedNamespace", description = "QUERY_UNAUTHORIZED_NAMESPACE_NOTES")
@Parameters({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public Result ssoLogin(HttpServletRequest request) {
return Result.success();
}

@Operation(summary = "signOut", description = "SIGNOUT_NOTES")
@Operation(summary = "signOut", description = "SIGN_OUT_NOTES")
@PostMapping(value = "/signOut")
@ApiException(SIGN_OUT_ERROR)
public Result signOut(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Result<List<WorkerServerModel>> listWorker(@Parameter(hidden = true) @Req
* query database state
*
* @param loginUser login user
* @return data base state
* @return database state
*/
@Operation(summary = "queryDatabaseState", description = "QUERY_DATABASE_STATE_NOTES")
@GetMapping(value = "/databases")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public Result deleteProject(@Parameter(hidden = true) @RequestAttribute(value =
*
* @param loginUser login user
* @param userId user id
* @return the projects which user have not permission to see
* @return the projects which user have no permission to see
*/
@Operation(summary = "queryUnauthorizedProject", description = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
@Parameters({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public Result<Object> queryResourceJarList(@Parameter(hidden = true) @RequestAtt
*
* @param loginUser login user
* @param fileName resource full name
* @param tenantCode tenantcode of the owner of the resource
* @param tenantCode tenantCode of the owner of the resource
* @param type resource type
* @return true if the resource name not exists, otherwise return false
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public Result queryScheduleListPaging(@Parameter(hidden = true) @RequestAttribut
*
* @param loginUser login user
* @param projectCode project code
* @param id scheule id
* @param id schedule id
* @return delete result code
*/
@Operation(summary = "deleteScheduleById", description = "DELETE_SCHEDULE_NOTES")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ public class TaskGroupController extends BaseController {
@ApiException(CREATE_TASK_GROUP_ERROR)
public Result createTaskGroup(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam("name") String name,
@RequestParam(value = "projectCode", required = false, defaultValue = "0") Long projectcode,
@RequestParam(value = "projectCode", required = false, defaultValue = "0") Long projectCode,
@RequestParam("description") String description,
@RequestParam("groupSize") Integer groupSize) {
Map<String, Object> result =
taskGroupService.createTaskGroup(loginUser, projectcode, name, description, groupSize);
taskGroupService.createTaskGroup(loginUser, projectCode, name, description, groupSize);
return returnDataList(result);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Result<Tenant> createTenant(@Parameter(hidden = true) @RequestAttribute(v
* @param pageSize page size
* @return tenant list page
*/
@Operation(summary = "queryTenantlistPaging", description = "QUERY_TENANT_LIST_PAGING_NOTES")
@Operation(summary = "queryTenantListPaging", description = "QUERY_TENANT_LIST_PAGING_NOTES")
@Parameters({
@Parameter(name = "searchVal", description = "SEARCH_VAL", schema = @Schema(implementation = String.class)),
@Parameter(name = "pageNo", description = "PAGE_NO", required = true, schema = @Schema(implementation = int.class, example = "1")),
Expand All @@ -110,7 +110,7 @@ public Result<Tenant> createTenant(@Parameter(hidden = true) @RequestAttribute(v
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TENANT_LIST_PAGING_ERROR)
public Result<PageInfo<Tenant>> queryTenantlistPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
public Result<PageInfo<Tenant>> queryTenantListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
Expand All @@ -126,11 +126,11 @@ public Result<PageInfo<Tenant>> queryTenantlistPaging(@Parameter(hidden = true)
* @param loginUser login user
* @return tenant list
*/
@Operation(summary = "queryTenantlist", description = "QUERY_TENANT_LIST_NOTES")
@Operation(summary = "queryTenantList", description = "QUERY_TENANT_LIST_NOTES")
@GetMapping(value = "/list")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TENANT_LIST_ERROR)
public Result<List<Tenant>> queryTenantlist(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
public Result<List<Tenant>> queryTenantList(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
List<Tenant> tenants = tenantService.queryTenantList(loginUser);
return Result.success(tenants);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public Result<Map<String, Object>> queryWorkFlowLineage(@Parameter(hidden = true
* @param projectCode project codes which taskCode belong
* @param processDefinitionCode project code which taskCode belong
* @param taskCode task definition code
* @return Result of task can be delete or not
* @return Result of task can be deleted or not
*/
@Operation(summary = "verifyTaskCanDelete", description = "VERIFY_TASK_CAN_DELETE")
@Parameters({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class WorkerGroupController extends BaseController {
@Parameter(name = "name", description = "WORKER_GROUP_NAME", required = true, schema = @Schema(implementation = String.class)),
@Parameter(name = "addrList", description = "WORKER_ADDR_LIST", required = true, schema = @Schema(implementation = String.class)),
@Parameter(name = "description", description = "WORKER_DESC", required = false, schema = @Schema(implementation = String.class)),
@Parameter(name = "otherParamsJson", description = "WORKER_PARMS_JSON", required = false, schema = @Schema(implementation = String.class)),
@Parameter(name = "otherParamsJson", description = "WORKER_PARAMS_JSON", required = false, schema = @Schema(implementation = String.class)),
})
@PostMapping()
@ResponseStatus(HttpStatus.OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public Result deleteTaskRelation(@Parameter(hidden = true) @RequestAttribute(val
*/
@Operation(summary = "update", description = "UPDATE_PROCESS_TASK_RELATION_NOTES")
@Parameters({
@Parameter(name = "code", description = "DOWMSTREAM_TASK_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
@Parameter(name = "code", description = "DOWNSTREAM_TASK_DEFINITION_CODE", schema = @Schema(implementation = long.class, example = "123456", required = true))
})
@PutMapping(value = "/{code}")
@ResponseStatus(HttpStatus.OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public ProjectDeleteResponse deleteProject(@Parameter(hidden = true) @RequestAtt
*
* @param loginUser login user
* @param userId user id
* @return the projects which user have not permission to see
* @return the projects which user have no permission to see
*/
@Operation(summary = "queryUnauthorizedProject", description = "QUERY_UNAUTHORIZED_PROJECT_NOTES")
@Parameters({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ PROCESS_DEFINITION_DESC=process definition desc
PROCESS_DEFINITION_TAG=process definition related opertation
PROCESS_DEFINITION_CODE=process definition code
PROCESS_DEFINITION_CODE_LIST=process definition code list
SIGNOUT_NOTES=logout
SIGN_OUT_NOTES=logout
USER_PASSWORD=user password
UPDATE_PROCESS_INSTANCE_NOTES=update process instance
QUERY_PROCESS_INSTANCE_LIST_NOTES=query process instance list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ PROCESS_DEFINITION_CONNECTS=process definition node connects info (json format)
PROCESS_INSTANCE_CONNECTS=process instance node connects info (json format)
PROCESS_DEFINITION_DESC=process definition desc
PROCESS_DEFINITION_TAG=process definition related operation
SIGNOUT_NOTES=logout
SIGN_OUT_NOTES=logout
USER_PASSWORD=user password
UPDATE_PROCESS_INSTANCE_NOTES=update process instance
QUERY_PROCESS_INSTANCE_LIST_NOTES=query process instance list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ PROCESS_DEFINITION_CONNECTS=流程定义节点图标连接信息(json格式)
PROCESS_INSTANCE_CONNECTS=流程实例节点图标连接信息(json格式)
PROCESS_DEFINITION_DESC=流程定义描述信息
PROCESS_DEFINITION_TAG=流程定义相关操作
SIGNOUT_NOTES=退出登录
SIGN_OUT_NOTES=退出登录
USER_PASSWORD=用户密码
UPDATE_PROCESS_INSTANCE_NOTES=更新流程实例
QUERY_PROCESS_INSTANCE_LIST_NOTES=查询流程实例列表
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testCreateTenant() throws Exception {
}

@Test
public void testQueryTenantlistPaging() throws Exception {
public void testQueryTenantListPaging() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("pageNo", "1");
paramsMap.add("searchVal", "tenant");
Expand Down Expand Up @@ -145,7 +145,7 @@ public void testVerifyTenantCodeExists() throws Exception {
}

@Test
public void testQueryTenantlist() throws Exception {
public void testQueryTenantList() throws Exception {

MvcResult mvcResult = mockMvc.perform(get("/tenants/list")
.header(SESSION_ID, sessionId))
Expand Down
Loading