rjsf-team/react-jsonschema-form

if/then inside allOf blocks at different levels: No resolver found for key if

クローズ

#2,927 opened on 2022/07/14

 (5 件のコメント) (7 件のリアクション) (3 人の担当者)TypeScript (2,136 件のフォーク)batch import
any-one-all-ofbughelp wantedif-then-else

Repository metrics

Stars
 (13,175 個のスター)
PR merge metrics
 (平均マージ 3d 17h) (30d で 32 merged PRs)

説明

Prerequisites

What theme are you using?

core

Version

4.2.0

Current Behavior

I have a schema that makes extensive use of if/then constructs (often inside allOf blocks). Unfortunately it does not work in rjsf and throws the following error in the console:

could not merge subschemas in allOf:
Error: No resolver found for key if. You can provide a resolver for this keyword in the options, or provide a default resolver.

I have prepared a shortened example of the problematic schema: catalog.txt

Using it in https://rjsf-team.github.io/react-jsonschema-form/ reproduces the issue.

When any of the two allOf blocks is deleted, the schema starts to work just fine.

I think it might be related to #2752 .

Expected Behavior

I would like rjsf to properly render the schema.

Steps To Reproduce

  1. Have a schema with if's inside allOf blocks at different levels in the schema
  2. Try to render it
  3. Observe that it doesnt work and throws an error

Environment

irrelevant (I guess)

Anything else?

No response

コントリビューターガイド