Skip to content

JSON schema draft 2020-12 not supported ? #2043

@gordielachance

Description

@gordielachance

Describe the bug

Hi,

I'm using @jsonforms/react in my app.

I've read the JSON schema docs for the latest draft (2020-12) and they say that the JSON definitions should be defined using $defs property, not definitions (as it was once).

But using $defs, I got errors fired by JSONforms, like

can't resolve reference #/$defs/selector from id #.

I've noticed it IS working when I'm using definitions, but then it' does not match the 2020-12 specs.

Looking at the AVJ doc, they say draft 2020-12 should be loaded in a specific manner:

const Ajv2020 = require("ajv/dist/2020")
const ajv = new Ajv2020()

So, how should I do if I want to use draft 2020-12 with JSONforms ?

Thanks

Expected behavior

Should not fire errors when using draft 2020-12

Steps to reproduce the issue

Use JSONforms with some $defs

Screenshots

No response

In which browser are you experiencing the issue?

Chromium Version 106.0.5249.91

Framework

React

RendererSet

Material

Additional context

No response

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