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

The "better-ajv-errors" package fails to report a schema error #441

Open
escattone opened this issue Nov 10, 2020 · 0 comments
Open

The "better-ajv-errors" package fails to report a schema error #441

escattone opened this issue Nov 10, 2020 · 0 comments
Labels
idle Issues and pull requests with no activity for three months.

Comments

@escattone
Copy link
Contributor

escattone commented Nov 10, 2020

When linting https://github.com/mdn/data/blob/master/css/at-rules.json, a schema error was detected for the @property object (

"@property": {
):

  "@property": {
    "syntax": "@property <custom-property-name> {\n  <declaration-list>\n}",
    "status": "experimental",
    "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/@property"
  },

because it was missing the groups property per

"minitems": 1,

Although the error output reports JSON Schema – 1 error(s), the detailed error message is blank:

...
css/at-rules.json
  Style – OK
  JSON Schema – 1 error(s)



css/at-rules.schema.json
  Style – OK
...

This seems to be a problem in the better-ajv-errors npm package.

NOTE (to self): The value of ajv.errors at

ajv.errors.forEach(function(error) {
was:

[
  {
    keyword: 'required',
    dataPath: '/@property',
    schemaPath: '#/additionalProperties/required',
    params: { missingProperty: 'groups' },
    message: "should have required property 'groups'"
  }
]
@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

No branches or pull requests

1 participant