You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an object property can take multiple values specified by "oneOf", the resulting view for selection contains only the "description" and no other fields such as "type" or constraints like "minimum".
Context
When used in the JSON Scheme, the view for the object property is seriously limited. If the "oneOf" option has "title" defined, it is not even possible to know the property type.
Minimal working example schema:
{
"type": "object",
"properties": {
"test": {
"oneOf": [
{
"type": "integer",
"minimum": 5,
"description": "The minimum is not displayed."
},
{
"type": "string",
"title": "Guess type",
"description": "The type is not displayed."
}
]
}
},
"title": "Test",
"description": "Demonstrates the shortcomings of the 'oneOf' view in the object."
}
Current Behavior
Only the descriptions are displayed instead of full schema information.
Expected Behavior
Full information shall be displayed, such as if the "oneOf" is used in top level.
Minimal working example schema:
{
"oneOf": [
{
"type": "integer",
"minimum": 5,
"description": "The minimum is not displayed."
},
{
"type": "string",
"title": "Guess type",
"description": "The type is not displayed."
}
]
}
Possible Workaround
The only workaround I know of as for now is to not define "title", so the type is visible at least in the options select. I know of no workaround for constraints other than writing them in description.
Moreover, when I use "$ref" in any of the options, the "type" is not used in the options select when no "title" is defined and the name of the reference (the URI part after last / ) is used instead.
When an object property can take multiple values specified by "oneOf", the resulting view for selection contains only the "description" and no other fields such as "type" or constraints like "minimum".
Context
When used in the JSON Scheme, the view for the object property is seriously limited. If the "oneOf" option has "title" defined, it is not even possible to know the property type.
Minimal working example schema:
Current Behavior
Only the descriptions are displayed instead of full schema information.
Expected Behavior
Full information shall be displayed, such as if the "oneOf" is used in top level.
Minimal working example schema:
Possible Workaround
The only workaround I know of as for now is to not define "title", so the type is visible at least in the options select. I know of no workaround for constraints other than writing them in description.
Moreover, when I use "$ref" in any of the options, the "type" is not used in the options select when no "title" is defined and the name of the reference (the URI part after last / ) is used instead.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: