Skip to content

Commit

Permalink
fix(reports): rename badValue to value (#318)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Feb 24, 2024
1 parent 4aa02d8 commit 860033d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/commands/scan/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ type ViolationReport struct {
}

type ErrorReport struct {
Type string `json:"type,omitempty"`
Field string `json:"field,omitempty"`
BadValue any `json:"badValue,omitempty"`
Detail string `json:"detail,omitempty"`
Type string `json:"type,omitempty"`
Field string `json:"field,omitempty"`
Value any `json:"value,omitempty"`
Detail string `json:"detail,omitempty"`
}

func ToReport(response jsonengine.Response) Report {
Expand All @@ -57,10 +57,10 @@ func ToReport(response jsonengine.Response) Report {
for _, err := range violation.ErrorList {
if err != nil {
violationReport.Errors = append(violationReport.Errors, ErrorReport{
Type: string(err.Type),
Field: err.Field,
BadValue: err.BadValue,
Detail: err.Detail,
Type: string(err.Type),
Field: err.Field,
Value: err.BadValue,
Detail: err.Detail,
})
}
}
Expand Down

0 comments on commit 860033d

Please sign in to comment.