func (reg *TypeRegistry) FinalizeTypeNames(d *gen.APIDescriptor) {
	for n, named := range reg.NamedTypes {
		reg.InlineTypes[n] = append(reg.InlineTypes[n], named)
	}
	d.FinalizeTypeNames(reg.InlineTypes)
}
func (reg *TypeRegistry) FinalizeTypeNames(d *gen.APIDescriptor) {
	for n, named := range reg.NamedTypes {
		reg.InlineTypes[n] = append(reg.InlineTypes[n], named)
	}
	d.FinalizeTypeNames(reg.InlineTypes)
}
// FinalizeTypeNames makes sure type names are unique, it should be called after analysis
// has completed.