Describe the Bug
Kaoto renders oneOf Json schema with a choice field in the forms. This mechanism is not working when the oneOf schema array contains non-object items such as seen in this example:
"message": {
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"data": {
"type": "string",
"title": "Data",
"description": "The message body content as inline data."
},
"resource": {
},
"script": {
}
},
"additionalProperties": false,
"anyOf": [
{
"oneOf": [
{
"required": [
"data"
]
},
{
"type": "object",
"properties": {
"resource": {
"type": "object",
"properties": {
"charset": {
"type": "string",
"title": "Charset",
"$comment": "group:advanced"
},
"file": {
"type": "string",
"title": "File"
}
},
"additionalProperties": false,
"title": "Resource",
"description": "The message body loaded from a file resource."
}
}
},
{
"type": "object",
"properties": {
"script": {
"type": "object",
"properties": {
"charset": {
"type": "string",
"title": "Charset",
"description": "The charset used to load the file resource.",
"$comment": "group:advanced"
},
"content": {
"type": "string",
"title": "Content",
"description": "The script content as inline data."
},
"file": {
"type": "string",
"title": "File",
"description": "The script content loaded as a file resource."
},
"type": {
"type": "string",
"title": "Type",
"description": "The script type.",
"default": "groovy"
}
},
"additionalProperties": false,
"title": "Script",
"description": "The message body set via script."
}
}
},
{
"not": {
"anyOf": [
{
"required": [
"data"
]
},
{
"required": [
"resource"
]
},
{
"required": [
"script"
]
}
]
}
}
]
}
],
"title": "Body",
"description": "The message body."
}
}
}
Kaoto should render the oneOf schema with a forms field representing the choice.
Steps to Reproduce the Bug or Issue
- use given schema in Kaoto catalog for the Citrus send operation message element
- create a new test entity with a send test action
- add a message body in the forms
Screenshots or Videos
Given this oneOf schema the Kaoto rendered form looks like this (with error):
Platform
- OS: [macOS]
- Browser: [Chrome]
- Version: latest
Describe the Bug
Kaoto renders oneOf Json schema with a choice field in the forms. This mechanism is not working when the oneOf schema array contains non-object items such as seen in this example:
Kaoto should render the oneOf schema with a forms field representing the choice.
Steps to Reproduce the Bug or Issue
Screenshots or Videos
Given this oneOf schema the Kaoto rendered form looks like this (with error):
Platform