Skip to content

Feature Request: CaseIterable-like support for generating arrays of resources #943

@feixue299

Description

@feixue299

Hi, first of all, thank you for maintaining such a great project!

The generated files themselves work without any issues, but in projects with a large number of resources and a deeply nested directory structure, it can become challenging to work with them programmatically.

I was wondering if R.swift could provide functionality similar to CaseIterable, where all valid files are automatically collected into an array (including their nested hierarchy) within the generated code.

This would allow developers to:

  • Easily iterate over all resources without manually traversing the structure.

  • Simplify tasks such as batch processing, testing, or validation of resources.

  • Reduce boilerplate and improve maintainability for large-scale projects.

Do you think such a feature could be added, or is there perhaps an existing recommended approach to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions