Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable glob-based paths for ConfigSchemas #440

Open
rannn505 opened this issue Jul 31, 2024 · 0 comments
Open

Enable glob-based paths for ConfigSchemas #440

rannn505 opened this issue Jul 31, 2024 · 0 comments
Labels
feat New feature or request

Comments

@rannn505
Copy link
Contributor

Suggestion

Enable glob-based paths for ConfigSchemas in the .configu file and with the --schema flag on the CLI. When a glob path is used, the interface will expand it, and if multiple schemas are found, it will combine them. If a key is in multiple schemas, the "deepest" one takes precedence.

Motivation

Simplifies managing multiple schemas by allowing pattern-based file selection. Useful for projects with hierarchical or scattered configurations. Ensures specific configurations override general ones.

Context

Currently, users must specify each schema file individually, which can be cumbersome and error-prone, especially in large projects with many configuration files. By allowing glob-based paths, we streamline the process, making it easier to manage and apply multiple schemas. This is particularly useful in environments where schemas are organized in a directory structure that reflects their scope and specificity.

For instance, a user might have a directory structure where common schemas are in a top-level directory, and more specific schemas are nested deeper. By using a glob pattern, such as schemas/**/*.yaml, the interface will automatically include all relevant schemas. If a key is declared in multiple schemas, the rule that the "deepest" one wins ensures that the most specific configuration is applied.

@rannn505 rannn505 added the feat New feature or request label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant