Error: no schema with key or ref "http://json-schema.org/Draft/2019-09/schema"

Full error:
ERROR Error: no schema with key or ref “http://json-schema.org/Draft/2019-09/schema
validate core.js:147
validateSchema core.js:260
_addSchema core.js:460
compile core.js:158
coreReducer jsonforms-core.esm.js:430

I implemented a simple angular app (a POC) that loads a schema and a test json payload using both the default generate as well as a custom uischema and in both instances we get the above error in the browser console. The fields still seem to populate, but it doesn’t look like any schema validations are happening (probably because of the above error). I also tried the jsonforms-angular-seed app from github and while the default schema.json doesn’t thrown any errors, when I add the below line to the schema (even though I don’t use any draft 2019 features), I get the same error:

“$schema”: “http://json-schema.org/Draft/2019-09/schema”,

I also tried the below code (overriding the ajv creation; using the example provided here: JSON Schema | Ajv JSON schema validator ) but that didn’t seem to make any difference either.

app.component.ts:

import Ajv2019 from “ajv/dist/2019”

ajv2019 = new Ajv2019()

app.component.html:

<jsonforms
[data]=“data”
[schema]=“schema”
[renderers]=“renderers”
[uischema]=“uischema”
[i18n]=“i18n”
[ajv]=“ajv2019
validationMode=‘ValidateAndShow’

Any pointers?

Amateur mistake - I assumed that the team that did the specification for the schema were right. They were missing the “s” in http as well as “cAsE” sensitive issue with “Draft” instead of “draft”. 5 hours I won’t get back. :slight_smile:

1 Like