Skip to content

Commit

Permalink
fix(internal/ext): add 1.1 to versions and validate explicit 1.2 (#2042)
Browse files Browse the repository at this point in the history
* fix(internal/ext): add 1.1 to versions and validate explicit 1.2

* chore(internal/ext): remove redundent idGen field

* chore: skip unparam for function receiving constant

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and markphelps committed Aug 23, 2023
1 parent b22c3a5 commit 9ee3c21
Show file tree
Hide file tree
Showing 6 changed files with 617 additions and 113 deletions.
4 changes: 2 additions & 2 deletions internal/cue/flipt.cue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
close({
version: "1.0" | *"1.1"
version: "1.0" | "1.1" | *"1.2"
namespace: string & =~"^[-_,A-Za-z0-9]+$" | *"default"
flags: [...{_version: version} & #Flag]
segments: [...#Segment]
Expand All @@ -13,7 +13,7 @@ close({
enabled: bool | *false
variants: [...#Variant]
rules: [...#Rule]
if _version == "1.1" {
if _version == "1.1" || _version == "1.2" {
type: "BOOLEAN_FLAG_TYPE" | *"VARIANT_FLAG_TYPE"
#FlagBoolean | *{}
}
Expand Down
1 change: 1 addition & 0 deletions internal/cue/testdata/valid_segments_v2.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: "1.2"
namespace: default
flags:
- key: flipt
Expand Down
1 change: 1 addition & 0 deletions internal/ext/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var (
latestVersion = semver.Version{Major: 1, Minor: 2}
supportedVersions = semver.Versions{
{Major: 1},
{Major: 1, Minor: 1},
latestVersion,
}
)
Expand Down
Loading

0 comments on commit 9ee3c21

Please sign in to comment.