This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-go.git
The following commit(s) were added to refs/heads/main by this push:
new be2b1cd Log apis missing in layout.go (#63)
be2b1cd is described below
commit be2b1cd16b8c299177a1b87844af8129061b8745
Author: Vishesh <[email protected]>
AuthorDate: Tue May 30 19:39:21 2023 +0530
Log apis missing in layout.go (#63)
---
generate/generate.go | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
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 @@ func getUniqueTypeName(prefix, name string) (string,
bool) {
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 @@ func getAllServices(listApis string) (*allServices,
[]error, error) {
as.services = append(as.services, &service{name: "CustomService"})
sort.Sort(as.services)
+ logMissingApis(ai, as)
+
return as, errors, nil
}