Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error: schema is invalid: data/properties/required must be object,boolean" does not give line number #219

Open
claybridges opened this issue Sep 6, 2022 · 3 comments

Comments

@claybridges
Copy link

claybridges commented Sep 6, 2022

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 #189 (comment).

@sreerammeka
Copy link

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
Copy link
Author

@claybridges Is this a similar error you are receiving?

Looks pretty similar.

@rap1ds
Copy link

rap1ds commented Jan 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants