Skip to content

Commit

Permalink
fixup: remove unsupported directive
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert committed Jan 3, 2024
1 parent 5f297f0 commit 6e420b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 0 additions & 2 deletions json/flagd-definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"additionalProperties": false,
"patternProperties": {
"^.{1,}$": {
"$comment": "'unevaluatedProperties': 'false' prevents additional props on a flag (ie: targetting)",
"unevaluatedProperties": false,
"oneOf": [
{
"title": "Boolean flag",
Expand Down
11 changes: 4 additions & 7 deletions json/flagd-definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ properties:
title: Flags
description: Top-level flags object. All flags are defined here.
type: object
"$comment": flag objects are one of the 4 flag types defined in $defs
$comment: flag objects are one of the 4 flag types defined in $defs
additionalProperties: false
patternProperties:
"^.{1,}$":
"$comment": "'unevaluatedProperties': 'false' prevents additional props on
a flag (ie: targetting)"
unevaluatedProperties: false
oneOf:
- title: Boolean flag
description: A flag having boolean values.
Expand All @@ -35,12 +32,12 @@ properties:
additionalProperties: false
patternProperties:
"^.{1,}$":
"$comment": this relative ref means that targeting.json MUST be in the same
$comment: this relative ref means that targeting.json MUST be in the same
dir, or available on the same HTTP path
$ref: "./targeting.json#/$defs/targeting"
"$defs":
flag:
"$comment": base flag object; no title/description here, allows for better UX,
$comment: base flag object; no title/description here, allows for better UX,
keep it in the overrides
type: object
properties:
Expand Down Expand Up @@ -101,7 +98,7 @@ properties:
patternProperties:
"^.{1,}$":
type: object
"$comment": merge the variants with the base flag to build our typed flags
$comment: merge the variants with the base flag to build our typed flags
booleanFlag:
allOf:
- $ref: "#/$defs/flag"
Expand Down
6 changes: 3 additions & 3 deletions json/targeting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type: object
used as a targeting key, or null (to fall back to defaultVariant). If targeting
returns a value which is not a variant key, it's considered an error.
anyOf:
- "$comment": we need this to support empty targeting
- $comment: we need this to support empty targeting
type: object
additionalProperties: false
properties: {}
Expand Down Expand Up @@ -242,7 +242,7 @@ type: object
description: Simple boolean test, with 1 or more arguments. At a more sophisticated
level, "and" returns the first falsy argument, or the last argument.
$ref: "#/$defs/variadicOp"
"$comment": "< and <= can be used with up to 3 ops (between)"
$comment: "< and <= can be used with up to 3 ops (between)"
"<":
title: Less-Than/Between Operation. Can be used to test that one value is
between two others.
Expand Down Expand Up @@ -323,7 +323,7 @@ type: object
- $ref: "#/$defs/semVerString"
- $ref: "#/$defs/varRule"
fractionalWeightArg:
"$comment": if we remove the "some to 100" restriction, update the descriptions
$comment: if we remove the "some to 100" restriction, update the descriptions
below!
description: Distribution for all possible variants, with their associated weighting
out of 100.
Expand Down

0 comments on commit 6e420b9

Please sign in to comment.