create function to automatically generate and parse references from a yaml file