Unknown Property Violations #36
donmstewart
started this conversation in
General
Replies: 1 comment
-
Hi @donmstewart 42209 is the code for 'Unknown property' (the violations should be giving the name of the properties that were unknown). Perhaps your JSON If you want to ignore unknown properties, set the IgnoreUnknownProperties to true on your validator... e.g.
Thank you hth |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Quick question for clarification on usage.
I have added
v8n
tags to my go structs alongside existingjson
tags.When I run the validator on the JSON output as a
map[string]interface{}
I get violations for all the attributes I have added tags for i.e. all the attributes on the struct. The code in the violations is42209
. ThePath
is empty &BadRequest
isfalse
.Thanks for creating valix it looks like it is going to be super useful.
Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions