You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The design pattern for composites needs to be expanded beyond it's original scope for dynamic reports. To support this, the /analyses/composite endpoints and associated REST resources should be renamed using report.
Each report is named based on the subject is collated.
Proposed reports explained:
/analyses/report/rules - Issues collated by ruleset/rule. Returns: []RuleReport.
//
// RuleReport REST resource.
type RuleReport struct {
RuleSet string `json:"ruleset"`
Rule string `json:"rule"`
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
Effort int `json:"effort"`
Labels []string `json:"labels"`
Applications int `json:"applications"`
}
/analyses/report/issues - Issues collated by application (but filtered by ruleset/rule). Returns: []IssueReport.
Hint: from selected row of /analyses/report/rules, should filter on:
ruleset
rule.
//
// IssueReport REST resource.
type IssueReport struct {
Issue
Incidents int `json:"incidents"`
Files int `json:"files"`
Application Ref `json:"application"`
}
/analyses/report/issues/:id/files - Incidents collated by file. Returns: []FileReport.
hint: from selected row of: /analyses/report/issues :id= selected issue ID
//
// FileReport REST resource.
type FileReport struct {
IssueID uint `json:"issueId" yaml:",issueId"`
File string `json:"file"`
Incidents int `json:"incidents"`
}
/analyses/report/dependencies - dependencies collated by name, SHA. Returns: []DepReport.
//
// DepReport REST resource.
type DepReport struct {
Name string `json:"name"`
Version string `json:"version"`
SHA string `json:"sha"`
Labels []string `json:"labels"`
Applications int `json:"applications"`
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The design pattern for composites needs to be expanded beyond it's original scope for dynamic reports. To support this, the /analyses/composite endpoints and associated REST resources should be renamed using report.
Each report is named based on the subject is collated.
Proposed reports explained:
/analyses/report/rules - Issues collated by ruleset/rule. Returns:
[]RuleReport
./analyses/report/issues - Issues collated by application (but filtered by ruleset/rule). Returns:
[]IssueReport
.Hint: from selected row of /analyses/report/rules, should filter on:
/analyses/report/issues/:id/files - Incidents collated by file. Returns:
[]FileReport
.hint: from selected row of: /analyses/report/issues :id= selected issue ID
/analyses/report/dependencies - dependencies collated by name, SHA. Returns:
[]DepReport
.Beta Was this translation helpful? Give feedback.
All reactions