DefDescriptor<TypeDef> type = DefDescriptorImpl.getInstance("String", TypeDef.class);
attributeDefs.put(DefDescriptorImpl.getInstance("whatToDo", AttributeDef.class), new AttributeDefImpl(
DefDescriptorImpl.getInstance("whatToDo", AttributeDef.class), null, type, null, true,
AttributeDef.SerializeToType.BOTH, null, null));
builder.attributeDefs = attributeDefs;
ComponentDef cmpDef = builder.build();
AuraContext context = Aura.getContextService().getCurrentContext();
//add dynamic namespace to MasterDefRegistry so later we can getDef from it during the injectComponent();
MasterDefRegistry mdr = context.getDefRegistry();
mdr.addLocalDef(cmpDef);
config.setDescriptor(cmpDef.getDescriptor());
}
return config;
}