Open claybridges opened 2 years ago
I'm also receiving this error with this ajv-validator.
The error is below:
Error: schema is invalid: data.properties['custom'].properties['enterprise'].properties['logAccessIamRole'] should be object,boolean
@claybridges Is this a similar error you are receiving?
@claybridges Is this a similar error you are receiving?
Looks pretty similar.
Got the exact same error: schema is invalid: data/properties/required must be object,boolean
The reason for me was that I had misplaced the required
key in my schema.
So instead of having:
{
"properties": {
"address": {
"type": "string"
}
},
"required": ["address"]
}
...I had this:
{
"properties": {
"address": {
"type": "string"
},
"required": ["address"]
},
}
And after I spotted the error, the error message makes totally sense.
@rap1ds thank you so much, your suggestion helped me a lot. I wish the error message were half as helpful as your answer
None of
--error
options help. I'm not even sure what the actual error is, but a line number would really help.See also #34 , #111 .
It's possible that
json-source-map
can be used to figure this out somehow (see here), but I don't know the exact steps. Moreover, needing to jump through additional hoops makes this tool borderline useless to me.Perhaps adding this functionality to the tool would be possible? For instance, see (at time of this writing, year-old) PR https://github.com/ajv-validator/ajv-cli/pull/189#issue-980783689.