rjsf-team/react-jsonschema-form
在 GitHub 查看Duplicate widgets when rendering OpenAPI's discriminated unions
Open
#4,124 建立於 2024年3月12日
awaiting responsefeaturehelp wanted
描述
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