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
If I read e.g. a JSON file as input, or some -p variables, what is the best way for me to validate what I have and produce meaningful errors to the user? I suppose I can just write it myself and throw exceptions, but it would tedious and I wish I didn't have to write too much code, or if there was a documented patter that I could copy instead of having to invent something.
The text was updated successfully, but these errors were encountered:
I guess to me it's be handy if I could declare parameters with a schema of some sort, and get validation from just calling param.String("foo", "bar", "(bar|foo)").
Another thing that does trip me up right now is that when I read YAML or JSON in TypeScript, I cannot assert it agains a particular type and non-optional fields come out as undefined.
If I read e.g. a JSON file as input, or some
-p
variables, what is the best way for me to validate what I have and produce meaningful errors to the user? I suppose I can just write it myself and throw exceptions, but it would tedious and I wish I didn't have to write too much code, or if there was a documented patter that I could copy instead of having to invent something.The text was updated successfully, but these errors were encountered: