Flagsmith / Flagsmith/flagsmith

flagsmith-cli export to avoid escaping nested json in multiline flag configs

Open
#6,303 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

### Is your feature request related to a problem?

Yes, I want to make my environment config exports be directly diffable between environments without need for post processing expansion of nested json and other multiline strings.

### Describe the solution you'd like.

Have an option in the flagsmith cli tool to expand nested json to be part of the files lines rather than condensed to the json escaped multi "\n" encoded thing we find presently.

### Describe alternatives you've considered

I post process the file in python to do the multi line expansion, or just a crude `sed s/\\\\n/\n/g` to break out whatever values I can to their own line to make the diffs readable.

### Additional context

In order to facilitate arbitrary config diffs it would be convenient to have the flagsmith CLI have an option to permit the user to take nested json flag configs and rather than collapsing them to a single line value do the pretty print expansion in the output file itself. This may be schema breaking but it will also make diffs segregated to their own lines to make spotting inconsistencies a breeze.

This would bias the user to only do json valued configs, which for this benefit I think would be acceptable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.