You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a part of our json schema which prescribes values based on what's supported now. ex.
"os": {
"title": "OS",
"description": "OS is the supported operating system (runtime.GOOS)",
"type": "string",
"enum": [
"darwin",
"linux",
"windows"
]
},
However, if we added another value later, we would want old code to not fail. Right now enums are validated by default.. We still want to know what the constants should be... Any advise?
The text was updated successfully, but these errors were encountered:
I think this is more a question for JSON schemas. I think the "right" way is to use a choice, either a "closed" enum or an open string for future values: json-schema-org/json-schema-spec#665
We have a part of our json schema which prescribes values based on what's supported now. ex.
However, if we added another value later, we would want old code to not fail. Right now enums are validated by default.. We still want to know what the constants should be... Any advise?
The text was updated successfully, but these errors were encountered: