Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Patch ¶
type Patch struct {
Op Op
Path string // JSON Pointer (RFC 6901) into the published document
Value *yaml.Node // fragment to add/replace, copied from the code doc; nil for remove
Match map[string]string // identify an array element (parameters: name+in)
CreatePath bool // for add: create missing map ancestors (new operations)
Description string // prose slot, filled by the later LLM stage
Reason string // provenance: which drift this resolves (for review)
Severity diff.Severity
}
Patch is a single, reviewable INTENT to change the published document. It is data, not an edit: a later applier executes it only after human approval. Value comes from the code side; Description is a slot the LLM stage fills later (empty here, since this generator is fully deterministic).
func FromReport ¶
FromReport turns detected drift into a deterministic list of patch intents. The code document supplies the authoritative values (code-first authority).
A shared schema drifts once per direction (request/response) for severity, but a document edit is direction-agnostic, so identical patches are deduped here.
Click to show internal directories.
Click to hide internal directories.