Package ai.chatur.cortex.spring.graph
Class DescribeEditController
java.lang.Object
ai.chatur.cortex.spring.graph.DescribeEditController
JSON API consumed by
describe.js to propose edits to an already-approved resource from
the describe page.
Unlike BranchEditController, which applies a reviewer's
edits to a branch in place, this one changes nothing: it stages the edit on a branch of its own
and hands the branch name back, so the caller can send the author to the review page. The
approved assertions are only ever reached by approving that branch.
-
Constructor Summary
ConstructorsConstructorDescriptionDescribeEditController(ai.chatur.cortex.CortexIngestor ingestor) Creates the controller. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ai.chatur.cortex.IngestResult> revise(ai.chatur.cortex.ResourceEdit edit) Stages a proposed edit to an approved resource on a branch for review.
-
Constructor Details
-
DescribeEditController
public DescribeEditController(ai.chatur.cortex.CortexIngestor ingestor) Creates the controller.- Parameters:
ingestor- the ingestor role the proposed edit is staged through
-
-
Method Details
-
revise
@PostMapping("/describe/revise") public org.springframework.http.ResponseEntity<ai.chatur.cortex.IngestResult> revise(@RequestBody ai.chatur.cortex.ResourceEdit edit) Stages a proposed edit to an approved resource on a branch for review.- Parameters:
edit- the proposed edit, as JSON- Returns:
- 200 OK with the outcome — carrying the name of the branch to review, or no branch if the edit would change nothing — or 422 Unprocessable Content with the lint or validation errors if the edit was rejected
-