Skip to content

JSON-Schema Versions and AJV Support #136

@bturkus

Description

@bturkus

Hi,

I just installed ajv via npm on a iMac Pro, and I'm getting a weird error that I believe has something to do with this latest release of ajv. It's all a little unclear to me, but the release notes state the following:

the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "$id" (or continue using Ajv v6 that will be supported until 02/28/2021).

And the error I'm receiving is:

MY-PAMI-038536:ami-metadata benjaminturkus$ ajv validate -s /Users/benjaminturkus/Desktop/ami-metadata/versions/2.0/schema/digitized_audioreelanalog.json -r versions/2.0/schema/fields.json -d /Users/benjaminturkus/Desktop/mao_305356_v01f01_pm.json 

schema versions/2.0/schema/fields.json is invalid

error: no schema with key or ref "http://json-schema.org/draft-04/schema#"

I think there's a connection here, but it absolutely could be user error. And if I'm reading this correctly, we'll need to either update the schema OR continue use ajv v6 until support drops in February.

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