Skip to content

Commit be2b1cd

Browse files
authored
Log apis missing in layout.go (#63)
1 parent 1b7c54e commit be2b1cd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

generate/generate.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,6 +2005,22 @@ func getUniqueTypeName(prefix, name string) (string, bool) {
20052005
return getUniqueTypeName(prefix, name+"Internal")
20062006
}
20072007

2008+
func logMissingApis(ai map[string]*API, as *allServices) {
2009+
asMap := make(map[string]*API)
2010+
for _, svc := range as.services {
2011+
for _, api := range svc.apis {
2012+
asMap[api.Name] = api
2013+
}
2014+
}
2015+
2016+
for apiName, _ := range ai {
2017+
_, found := asMap[apiName]
2018+
if !found {
2019+
log.Printf("Api missing in layout: %s", apiName)
2020+
}
2021+
}
2022+
}
2023+
20082024
func getAllServices(listApis string) (*allServices, []error, error) {
20092025
// Get a map with all API info
20102026
ai, err := getAPIInfo(listApis)
@@ -2036,6 +2052,8 @@ func getAllServices(listApis string) (*allServices, []error, error) {
20362052
as.services = append(as.services, &service{name: "CustomService"})
20372053
sort.Sort(as.services)
20382054

2055+
logMissingApis(ai, as)
2056+
20392057
return as, errors, nil
20402058
}
20412059

0 commit comments

Comments
 (0)