Idiomatic way of specifying string enum schema (use only schemas.json, needs_extra_options, or both?) #1536
MrChocolateMoose
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys,
In the new schemas feature, there are two ways offered to do enum schema validation (from docs):
In my own worked example, if I include both of these then I would get two schema violation errors (i.e.
[sn_schema.extra_option_fail]for the toml based input method and[sn_schema.local_fail]for the json based input).Since my primary means of writing schema violations would be in the schema json, I assume I should omit adding it to extra_options? Beyond rudimentary schema validation w/o wanting a dedicated schemas.json, it wasn't clear the benefit of adding it to extra_options.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions