Skip to content

ajv-cli dies when evaluating yaml with duplicate object keys #211

@Qstick

Description

@Qstick

When running on yml with duplicate object keys, ajv fails and errors out with the following error. Let me know if this is something I'm missing on my side?

Command

ajv validate -d "definitions/v3/*.yml" -s "definitions/v3/schema.json" --verbose 

Error:

error:  Invalid left-hand side expression in prefix operation

Example Yaml

---
id: example
name: Example

caps:
  date: pass
  date: other

Version: 5.0.0 (installed via npm)
Scemas: Tested with a draft07 and draft2020

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions