Package dev.dokimos.server.controller.v1
Class AnnotationController
java.lang.Object
dev.dokimos.server.controller.v1.AnnotationController
@RestController
@RequestMapping("/api/v1/runs/{runId}/items/{itemResultId}/annotation")
public class AnnotationController
extends Object
Endpoints for the single human review annotation on a run item result.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Removes the annotation for the item result.Returns the annotation for the item result.upsert(UUID runId, UUID itemResultId, @Valid AnnotationRequest request, jakarta.servlet.http.HttpServletRequest http) Creates or updates the annotation for the item result and returns it.
-
Constructor Details
-
AnnotationController
-
-
Method Details
-
upsert
@PutMapping public AnnotationView upsert(@PathVariable UUID runId, @PathVariable UUID itemResultId, @Valid @RequestBody @Valid AnnotationRequest request, jakarta.servlet.http.HttpServletRequest http) Creates or updates the annotation for the item result and returns it. Responds 200 on success, 404 if the item result does not exist or does not belong to the run, and 400 if the verdict is missing. Thecreated_byfield is taken from the authenticated principal when present. -
get
Returns the annotation for the item result. Responds 200 on success, or 404 if the item result does not belong to the run or has no annotation. -
delete
@DeleteMapping public org.springframework.http.ResponseEntity<Void> delete(@PathVariable UUID runId, @PathVariable UUID itemResultId) Removes the annotation for the item result. Responds 204 on success, or 404 if the item result does not belong to the run.
-