rjsf-team/react-jsonschema-form
View on GitHubDuplicate widgets when rendering OpenAPI's discriminated unions
Open
#4124 opened on Mar 12, 2024
awaiting responsefeaturehelp wanted
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.17.1
Current Behavior
When an OpenAPI schema containing oneOf and a discriminator is provided to rjsf, the discriminator property is rendered twice in the form: once for the discriminator itself and the second time from the definition of the selected option. Also, the discriminator property widget appears outside the object's group.
Expected Behavior
- There is no duplicate widget.
- The widget appears inside of its group.
It would be nice if the rendering when using the discriminator field corresponded to the rendering when using schema dependencies.
Steps To Reproduce
No response
Environment
- OS:
- Node:
- npm:
Anything else?
No response