Generate YAML collection properly