@@ -6,8 +6,6 @@ package core
66import (
77 "encoding/json"
88 "os"
9-
10- "github.com/pb33f/libopenapi/datamodel/high/base"
119)
1210
1311type API struct {
@@ -19,26 +17,20 @@ type API struct {
1917}
2018
2119type apiReport struct {
22- ClusterId int `json:"clusterId"`
23- TenantId int `json:"tenantId"`
24- SpecTitle string `json:"specTitle"`
25- SpecVersion string `json:"specVersion"`
26- OASVersion string `json:"oasVersion"`
27- ShadowAPIs []API `json:"shadowApis,omitempty"`
28- ZombieAPIs []API `json:"zombieApis,omitempty"`
29- OrphanAPIs []API `json:"orphanApis,omitempty"`
20+ TenantId int `json:"tenantId"`
21+ ScanName string `json:"scan_name"`
22+ ShadowAPIs []API `json:"shadowApis,omitempty"`
23+ ZombieAPIs []API `json:"zombieApis,omitempty"`
24+ OrphanAPIs []API `json:"orphanApis,omitempty"`
3025}
3126
32- func (m * Manager ) exportJsonReport (reportFilePath string , shadowApis , zombieApis , orphanApis []API , specInfo * base. Info , openApiVersion string ) error {
27+ func (m * Manager ) exportJsonReport (reportFilePath string , shadowApis , zombieApis , orphanApis []API ) error {
3328 report := apiReport {
34- ClusterId : m .Cfg .Environment .ClusterId ,
35- TenantId : m .Cfg .Environment .TenantId ,
36- SpecTitle : specInfo .Title ,
37- SpecVersion : specInfo .Version ,
38- OASVersion : openApiVersion ,
39- ShadowAPIs : shadowApis ,
40- ZombieAPIs : zombieApis ,
41- OrphanAPIs : orphanApis ,
29+ TenantId : m .Cfg .Environment .TenantId ,
30+ ScanName : m .Cfg .ScanName ,
31+ ShadowAPIs : shadowApis ,
32+ ZombieAPIs : zombieApis ,
33+ OrphanAPIs : orphanApis ,
4234 }
4335
4436 f , err := os .OpenFile (reportFilePath , os .O_CREATE | os .O_WRONLY | os .O_TRUNC , 0o666 )
0 commit comments