Skip to content

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

Description

@escattone

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'"
  }
]

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    idleIssues and pull requests with no activity for three months.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions