Log apis missing in layout.go (#63)
diff --git a/generate/generate.go b/generate/generate.go
index 3f693ec..8e823bc 100644
--- a/generate/generate.go
+++ b/generate/generate.go
@@ -2005,6 +2005,22 @@
return getUniqueTypeName(prefix, name+"Internal")
}
+func logMissingApis(ai map[string]*API, as *allServices) {
+ asMap := make(map[string]*API)
+ for _, svc := range as.services {
+ for _, api := range svc.apis {
+ asMap[api.Name] = api
+ }
+ }
+
+ for apiName, _ := range ai {
+ _, found := asMap[apiName]
+ if !found {
+ log.Printf("Api missing in layout: %s", apiName)
+ }
+ }
+}
+
func getAllServices(listApis string) (*allServices, []error, error) {
// Get a map with all API info
ai, err := getAPIInfo(listApis)
@@ -2036,6 +2052,8 @@
as.services = append(as.services, &service{name: "CustomService"})
sort.Sort(as.services)
+ logMissingApis(ai, as)
+
return as, errors, nil
}