gen/api15gen/api_analyzer.go
func (a *APIAnalyzer) Analyze() *gen.APIDescriptor {
	a.AnalyzeAliases()
	var descriptor = &gen.APIDescriptor{
		Resources: make(map[string]*gen.Resource),
		Types:     make(map[string]*gen.ObjectDataType),
	}
	var rawResourceNames = make([]string, len(a.rawResources))
	var idx = 0
	for n := range a.rawResources {
		rawResourceNames[idx] = n
		idx++
	}
	sort.Strings(rawResourceNames)
	for _, name := range rawResourceNames {
		var resource = a.rawResources[name]
		a.AnalyzeResource(name, resource, descriptor)
	}
	descriptor.FinalizeTypeNames(a.rawTypes)
	return descriptor
}
func (a *APIAnalyzer) Analyze() *gen.APIDescriptor {
	a.AnalyzeAliases()
	var descriptor = &gen.APIDescriptor{
		Resources: make(map[string]*gen.Resource),
		Types:     make(map[string]*gen.ObjectDataType),
	}
	var rawResourceNames = make([]string, len(a.rawResources))
	var idx = 0
	for n := range a.rawResources {
		rawResourceNames[idx] = n
		idx++
	}
	sort.Strings(rawResourceNames)
	for _, name := range rawResourceNames {
		var resource = a.rawResources[name]
		a.AnalyzeResource(name, resource, descriptor)
	}
	descriptor.FinalizeTypeNames(a.rawTypes)
	return descriptor
}
// Analyze iterate through all resources and initializes the Resources and ParamTypes fields of
// the APIAnalyzer struct accordingly.