Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support "if" 1-arg shorthand #131

Merged
merged 3 commits into from
Feb 14, 2024
Merged

fix: support "if" 1-arg shorthand #131

merged 3 commits into from
Feb 14, 2024

Conversation

toddbaert
Copy link
Member

Adds schema-support for 1-arg "if" shorthand.

Part of fixing: open-feature/flagd#1205

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@@ -0,0 +1,70 @@
{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these didn't validate before this change, and now they do.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@@ -97,6 +97,22 @@ type: object
- type: array
items:
type: string
ifRule:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, "if" can no longer share the its anatomy with other ops (binaryOrTernaryOp), since it's the only one that takes 1-3 args, so it's implemented as it's own rule now.

@@ -133,6 +133,22 @@
}
}
},
"ifRule": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @austindrenski , the JSON is generated from the YAML, and the CI makes sure they are in sync.

@toddbaert toddbaert merged commit 463d33a into main Feb 14, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request Feb 14, 2024
toddbaert pushed a commit that referenced this pull request Feb 14, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>json/json-schema: 0.2.1</summary>

##
[0.2.1](json/json-schema-v0.2.0...json/json-schema-v0.2.1)
(2024-02-14)


### 🐛 Bug Fixes

* support "if" 1-arg shorthand
([#131](#131))
([463d33a](463d33a))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@toddbaert toddbaert deleted the fix/if-shorthand branch February 15, 2024 17:35
toddbaert added a commit to open-feature/flagd that referenced this pull request Feb 20, 2024
Updates schema to include
open-feature/flagd-schemas#131.

Fixes: #1205

@austindrenski I imagine this is cached quite heavily by IDEs, etc. Not
sure how long it will take to clear.

Preview link:
https://deploy-preview-1215--polite-licorice-3db33c.netlify.app/schema/v0/targeting.json

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants