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
When using a schema generated by genericJsonSchema on a case class, is there a way to have it fail or warn on unrecognized keys? The use case is detecting if the end user typod one of the keys in their json - e.g. if they were supposed to submit {"name": "foo"}, and instead submitted {"nme": "foo"}, it might be nice to tell them "unrecognized key: 'nme'" (as well as "missing key": 'name'"), instead of just "missing key": 'name'".
Or perhaps a way to get access to the list of fields on that case class from the JsonSchema, so we could do that check ourselves?
The text was updated successfully, but these errors were encountered:
When using a schema generated by
genericJsonSchema
on a case class, is there a way to have it fail or warn on unrecognized keys? The use case is detecting if the end user typod one of the keys in their json - e.g. if they were supposed to submit{"name": "foo"}
, and instead submitted{"nme": "foo"}
, it might be nice to tell them "unrecognized key: 'nme'" (as well as "missing key": 'name'"), instead of just "missing key": 'name'".Or perhaps a way to get access to the list of fields on that case class from the
JsonSchema
, so we could do that check ourselves?The text was updated successfully, but these errors were encountered: