mimaison commented on code in PR #22762:
URL: https://github.com/apache/kafka/pull/22762#discussion_r4616390608


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/RootResource.java:
##########
@@ -58,13 +62,35 @@ public RootResource(Herder herder, RestRequestTimeout 
requestTimeout) {
 
     @GET
     @Operation(summary = "Get details about this Connect worker and the ID of 
the Kafka cluster it is connected to")
+    @ApiResponse(
+        responseCode = "200",
+        description = "Connect worker details retrieved successfully",
+        content = @Content(mediaType = MediaType.APPLICATION_JSON, schema = 
@Schema(implementation = ServerInfo.class))
+    )
     public ServerInfo serverInfo() {
         return new ServerInfo(herder.kafkaClusterId());
     }
 
     @GET
     @Path("/health")
     @Operation(summary = "Health check endpoint to verify worker readiness and 
liveness")
+    @ApiResponses({
+        @ApiResponse(
+            responseCode = "200",
+            description = "Worker has completed startup and is ready to handle 
requests",
+            content = @Content(mediaType = MediaType.APPLICATION_JSON, schema 
= @Schema(implementation = WorkerStatus.class))
+        ),
+        @ApiResponse(
+            responseCode = "503",
+            description = "Worker is still starting up",
+            content = @Content(mediaType = MediaType.APPLICATION_JSON, schema 
= @Schema(implementation = WorkerStatus.class))
+        ),
+        @ApiResponse(
+            responseCode = "500",

Review Comment:
   I think we also reach 500 from `throw e.getCause()`. In that case, I'm 
guessing the schema is `ErrorMessage`?



-- 
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]

Reply via email to