Closed
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?
antd
Version
5.6.0
Current Behavior
I have a schema of a oneOf
with two options referencing two different objects.
Here is an example:
{
"definitions": {
"foo": {
"type": "object",
"properties": {
"fooProp": {
"type": "string"
},
"fooProp2": {
"type": "string",
"default": "fooProp2"
}
}
},
"bar": {
"type": "object",
"properties": {
"barProp": {
"type": "string"
},
"barProp2": {
"type": "string",
"default": "barProp2"
}
}
}
},
"oneOf": [
{
"$ref": "#/definitions/foo"
},
{
"$ref": "#/definitions/bar"
}
]
}
You can try it out here.
Expected Behavior
I would expect to have a default prop set for the properties that define one.
Steps To Reproduce
- Just go to the playground link provided in the description
- You will be able to see that in the formData we don't have the default value set
Environment
- OS: MacOs
- Node: 18.7.0
- npm: 8.15.0
Anything else?
No response