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

Should we allow FeatureFlag.enabled to be "true"/"false" (string type)? #918

Closed
Eskibear opened this issue May 20, 2024 · 6 comments
Closed
Assignees
Labels
bug Something isn't working docs

Comments

@Eskibear
Copy link
Member

Given FeatureFlag.enabled is defined as boolean type in the schema, is it proper to support "true"/"false" of string type, especially in official samples?

Schema:

"enabled": {
"$id": "#/properties/enabled",
"type": "boolean",
"title": "Enabled State",

Samples:

"id": "StringTrue",
"description": "A feature flag with no Filters where enabled is a string, that returns true.",
"enabled": "true",
"conditions": {
"client_filters": []
}
},
{
"id": "StringFalse",
"description": "A feature flag with no Filters where enabled is a string, that returns false.",
"enabled": "false",
"conditions": {
"client_filters": []
}
},

@zhenlan
Copy link
Contributor

zhenlan commented May 20, 2024

Looks like an oversight in the samples.

@zhenlan zhenlan added bug Something isn't working docs labels May 20, 2024
@mrm9084
Copy link
Member

mrm9084 commented May 20, 2024

These were added as we don't say we support String. But all of our libraries support Strings.

@zhenlan
Copy link
Contributor

zhenlan commented May 20, 2024

Implementation for different platforms can vary, sometimes, for compatibility reasons, but the official samples shouldn't violate the schema.

@jimmyca15
Copy link
Member

@mrm9084 can you take the fix for this?

@mrm9084
Copy link
Member

mrm9084 commented May 28, 2024

I have it fixed locally, just haven't got the PR up yet. Was trying to finish something else first.

@mrm9084
Copy link
Member

mrm9084 commented May 28, 2024

Fixed in this PR #923

@mrm9084 mrm9084 closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs
Projects
None yet
Development

No branches or pull requests

4 participants