24 lines
732 B
Go
24 lines
732 B
Go
package proposal_generation
|
|
|
|
import "encoding/json"
|
|
|
|
// RepairFinding contains safe validator feedback for the current correction.
|
|
type RepairFinding struct {
|
|
Status string `json:"status,omitempty"`
|
|
Validator string `json:"validator"`
|
|
Reason string `json:"reason"`
|
|
Explanation string `json:"explanation,omitempty"`
|
|
}
|
|
|
|
// RepairRequest identifies the proposal version and its ordered findings.
|
|
type RepairRequest struct {
|
|
ProposalRef int `json:"proposal_ref"`
|
|
Correction StructuredCorrectionProposal `json:"correction"`
|
|
Findings []RepairFinding `json:"findings"`
|
|
}
|
|
|
|
func (r RepairRequest) JSON() (string, error) {
|
|
data, err := json.Marshal(r)
|
|
return string(data), err
|
|
}
|