Copilot commented on code in PR #4537:
URL: https://github.com/apache/solr/pull/4537#discussion_r3789973260


##########
solr/api/src/java/org/apache/solr/client/api/endpoint/TasksApi.java:
##########
@@ -30,18 +30,23 @@
 @Path(INDEX_PATH_PREFIX + "/tasks")
 public interface TasksApi {
 
-  @GET
-  @StoreApiParameters
-  @Operation(
-      summary = "Lists all the active tasks",
-      tags = {"tasks"})
-  ListActiveTaskResponse listAllActiveTasks() throws Exception;
+  @Path("")
+  interface List {
+    @GET
+    @StoreApiParameters
+    @Operation(
+        summary = "Lists all the active tasks.",
+        tags = {"tasks"})
+    ListActiveTaskResponse listAllActiveTasks() throws Exception;
+  }
 
-  @GET
   @Path("/{taskID}")
-  @StoreApiParameters
-  @Operation(
-      summary = "Status of a specific task",
-      tags = {"tasks"})
-  TaskStatusResponse getTaskStatus(@PathParam("taskID") String taskID) throws 
Exception;
+  interface Status {
+    @GET
+    @StoreApiParameters
+    @Operation(
+        summary = "Status of a specific task.",
+        tags = {"tasks"})
+    TaskStatusResponse getTaskStatus(@PathParam("taskID") String taskID) 
throws Exception;
+  }

Review Comment:
   `TasksApi.List` and `TasksApi.Status` are nested interfaces but they do not 
appear to inherit the enclosing `TasksApi` type-level `@Path`. Since the 
implementing resources now implement `TasksApi.List`/`TasksApi.Status` (not 
`TasksApi`), the base `INDEX_PATH_PREFIX + "/tasks"` path will be lost and 
these endpoints may no longer be registered under `/tasks`. Other nested 
endpoint interfaces in this codebase typically declare the full `@Path` 
directly on the nested interface (e.g., `GetSchemaApi.Fields` and 
`ConfigsetsApi.List`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to