open-feature / open-feature/cli
Code Generation
Open
@anghelflorinm is already working on this.
Since Oct 17, 2024.
epic
- Dominant language
- Go
- Stars
- 63
- Forks
- 22
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 19
Description
Description
Feature flags typically rely on hard coded strings to reference specific feature flags. This can be tedious to maintain in a codebase. Code generation can address this shortcoming by creating strongly typed flag accessors, minimizing configuration errors and providing a better developer experience. By generating these accessors, developers can avoid issues related to incorrect flag names or types, resulting in more reliable and maintainable code.
Goals
- Establish a standardized flag manifest format that can be easily converted from existing configurations.
- JSON Schema (source of truth)
- Auto-gen docs from schema and clarifying docs
- Develop a CLI tool to generate strongly typed flag accessors for multiple programming languages.
- Create support for Java, JavaScript, Go, and Markdown
- Create a format that allows for future extensions and modularization of flags.
- Simply adding support for new languages
- Reduce boilerplate
- Standardize templates format
- Simply adding support for new languages
- Create contributing documentation
Non-goals
- The initial scope does not include creating tools to convert provider-specific configurations to the new flag manifest format.
- The project won't initially focus on validating flag configurations for consistency with the flag manifest.
- Create prototype prior to a stable release
- The project does not aim to create a general-purpose configuration tool for feature flags beyond the scope of the codegen tool.
Resources
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.