-
Notifications
You must be signed in to change notification settings - Fork 918
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
Enumeration values are not valid for labelOrientation #57
Comments
FYI, it looks like this similar issue may apply to other properties like Try doing a find on integer enums:
My search found 34 occurrences that need to be updated for these properties. |
The error is correct, 0 and 1 are the only allowed values for If you spot another issue, please let me know. I'll work on making this a bit more descriptive; the values of 0 and 1 are hard to discern. I'll probably end up following the convention described here, but this likely won't make it until the May Desktop release. |
The whole point of a string enum is because 0 and 1 don't mean anything in this context. Just look at any of the other string enums and you'll see that these should be string enums too. If you can tell without looking it up, keep them as integer, but I have no clue what barShape = 0 could possibly mean. Thankfully almost every other enum is descriptive like this one:
At a minimum, if you could add descriptions to the schema, it would help. I can find no documentation anywhere for these enums. Maybe in the
Though I'd even be happy if you could just give the meanings here for |
Sorry, just saw the link. Yes, adding a title on each integer would work. I think strings would match what is being used elsewhere, but I'm guessing that requires code changes elsewhere that won't happen for a long time. Thanks for taking this up! |
I've prototyped something for the May release, it'll look something like this (have to hover over the value to get the explanation, unfortunately): Schema snippet: "labelOrientation": {
"type": "integer",
"oneOf": [
{
"const": 0,
"title": "Vertical"
},
{
"const": 1,
"title": "Horizontal"
}
],
"title": "Orientation"
}, |
this shipped awhile ago, please let me know if you see any instances of numeric enums that don't have an explanation / English display name! |
When using the enumeration for labelOrientation, it yields an error.
The Schema should have something like:
(Not sure if your convention is caps or lower, and not sure which value is 0 and which is 1!)
The text was updated successfully, but these errors were encountered: