-
-
Notifications
You must be signed in to change notification settings - Fork 311
A way to descibe enumeration values #520
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
Comments
One way to achieve this is to use a {
"oneOf": [
{"const": "choice1", "title": "this is choice 1"},
{"const": "choice2", "title": "this is choice 2"}
]
} See #57 for reference. |
And for v4 JSON schema this probably means I could do something like: {
"oneOf": [
{"enum": ["choice1"], "title": "this is choice 1"},
{"enum": ["choice2"], "title": "this is choice 2"}
]
} No? Hm, maybe this can be an approach. Thanks. |
@mitar yes, that's the correct option in draft-04. |
Thanks! |
So enumeration can be a long list of values, which are often some constants used by a machine. I think there should be a way to attach description to each of those values.
The text was updated successfully, but these errors were encountered: