NYPL / ami-metadata

14 stars 2 forks source link

JSON-Schema Versions and AJV Support #136

Open bturkus opened 3 years ago

bturkus commented 3 years ago

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.

nkrabben commented 3 years ago

@genfhk is this the prompt to kick us up to v0.7? or whatever version they have now...

genfhk commented 3 years ago

@genfhk is this the prompt to kick us up to v0.7? or whatever version they have now...

seems like that would be the way to go, yeah. Meeting invite to follow.

genfhk commented 3 years ago

@bturkus install v6 for now. we'll resolve before the deadline.

nkrabben commented 3 years ago

Flagging that we'll need to regression test against whatever ajv version they deploy on the media ingest servers. Currently, they're running 0.9 from 2016.

genfhk commented 3 years ago

@bturkus resolved on pre-ingest side by https://github.com/NYPL/ami-metadata/pull/140

genfhk commented 2 years ago

@nkrabben has this been regression tested yet on ingest side?