open-feature / open-feature/cli

Code Generation

Open
#32 0 comments 0 reactions 2 assignees View on GitHub

@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
  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.