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

feat: add doc gen, move schema path, add tests, fix react gen #68

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

beeme1mr
Copy link
Member

@beeme1mr beeme1mr commented Jan 6, 2025

This PR

  • moves JSON schema to a dedicated directory
  • added schema validation tests
  • fixed React code gen (and tests)
  • automate CLI doc generation
  • Loosen JSON schema
  • Rename default value

Related Issues

Fixes #66, #60

Notes

It's a big PR that I could break into smaller changes if necessary.

@beeme1mr beeme1mr requested a review from anghelflorinm January 6, 2025 22:15
@beeme1mr beeme1mr changed the title feat: add doc gen, move schema path, add tests, fix react gen feat!: add doc gen, move schema path, add tests, fix react gen Jan 6, 2025
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
@@ -1,4 +1,5 @@
{
"$id": "https://raw.githubusercontent.com/open-feature/cli/refs/heads/main/schema/v0/flag_manifest.json",
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if we need/want and ID. FYI @toddbaert

schema/v0/flag_manifest.json Outdated Show resolved Hide resolved
@@ -2,27 +2,27 @@
"flags": {
"enableFeatureA": {
"flagType": "boolean",
"defaultValue": false,
"codeDefault": false,
Copy link
Member

@toddbaert toddbaert Jan 21, 2025

Choose a reason for hiding this comment

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

I think we should revert this.

I understand why you'd change it, defaultValue seems a bit confusing right next to defaultVariant (in flagd, for example) but I think that's just because there's a bit of a conceptual hurdle around "code default" vs "no targeting matched fallthrough" anyway, and that hurdle is somewhat inevitable and can only be address with good descriptions, docs and education.

"defaultValue" is what this parameter is called in code, and I think for consistency we should use that here, or we risk even more confusion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, good point. I've reverted this change. Please re-review when you have a moment.

Signed-off-by: Michael Beemer <[email protected]>
@beeme1mr beeme1mr changed the title feat!: add doc gen, move schema path, add tests, fix react gen feat: add doc gen, move schema path, add tests, fix react gen Jan 23, 2025
@beeme1mr beeme1mr removed the breaking label Jan 23, 2025
Signed-off-by: Michael Beemer <[email protected]>
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.

Loosen JSON schema
3 participants