Skip to content

Unable to generate uischema for null type #2207

@buremba

Description

@buremba

Describe the bug

When the JSON Schema has the following null type, uischema can't get generated and it fails with the following error:

> Generate.uiSchema(schema)
Error: Unknown type: {"type":"null"}
type: object
properties:
  examplefield:
     type: null

Expected behavior

I expect the fields with a null type (and type not defined) to be rendered in the form in a custom renderer or with a fallback component.

Steps to reproduce the issue

Skip defining a schema and uischema and try to render the following data:

<JsonForms data={{examplefield: null}}

Note that Generate.jsonSchema generates the schema above.

Screenshots

No response

In which browser are you experiencing the issue?

Google Chrome

Which Version of JSON Forms are you using?

v.3.1.0

Framework

Core, React

RendererSet

Material

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions