Skip to content

default value not working when a schema item extends a definition ($ref ) #3335

Open
@gordielachance

Description

@gordielachance

Prerequisites

What theme are you using?

core

Version

https://rjsf-team.github.io/react-jsonschema-form/

Current Behavior

I've carefully read the JSON forms documentation and I've seen that JSON schema 2020-12 (AJV 8) can have an item defined using the $ref property, then extended by adding its props

"item":{
	"$ref": "#/$defs/mydefinition",
	"properties":{
		...more props
	}
}

But when testing my schema (I pasted it here) in your playground, it does not work; default values are not loaded, for instance I get :

Unsupported field schema for field root_selectors_playlist_title_path: Unknown field type undefined.

{
  "default": "head title"
}

Expected Behavior

Default values should be loaded correctly.

Steps To Reproduce

  1. Head to the playground
  2. Paste this JSON schema
  3. Check the rendered form

Environment

- OS:(web playground)
- Node:(web playground)
- npm:(web playground)

Anything else?

Thanks for your help !

Metadata

Metadata

Assignees

No one assigned

    Labels

    $refAll issues related to reffeatureIs a feature requesthelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions