Schema Inaccuracy
#/components/schemas/custom-property-value includes an inconsistent type definition for the value field. The type includes array, string, and null while the oneOf only includes string and "array of string". This causes the custom_property_values event with action updated to fail validation when updating a custom property from or to an empty value.
Expected
When using oneOf where each option includes a type constraint, there shouldn't be a type constraint in the base schema. Or at a minimum the options in oneOf and in the list of valid types should match.
Schema as it exists now:
{
"title": "Custom Property Value",
"description": "Custom property name and associated value",
"type": "object",
"properties": {
"property_name": {
"type": "string",
"description": "The name of the property"
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "The value assigned to the property",
"type": [
"null",
"string",
"array"
]
}
},
"required": [
"property_name",
"value"
]
}
Desired schema:
{
"title": "Custom Property Value",
"description": "Custom property name and associated value",
"type": "object",
"properties": {
"property_name": {
"type": "string",
"description": "The name of the property"
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "The value assigned to the property"
}
},
"required": [
"property_name",
"value"
]
}
Schema Inaccuracy
#/components/schemas/custom-property-valueincludes an inconsistent type definition for thevaluefield. Thetypeincludesarray,string, andnullwhile theoneOfonly includesstringand "array of string". This causes thecustom_property_valuesevent with actionupdatedto fail validation when updating a custom property from or to an empty value.Expected
When using
oneOfwhere each option includes a type constraint, there shouldn't be atypeconstraint in the base schema. Or at a minimum the options inoneOfand in the list of validtypes should match.Schema as it exists now:
{ "title": "Custom Property Value", "description": "Custom property name and associated value", "type": "object", "properties": { "property_name": { "type": "string", "description": "The name of the property" }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ], "description": "The value assigned to the property", "type": [ "null", "string", "array" ] } }, "required": [ "property_name", "value" ] }Desired schema:
{ "title": "Custom Property Value", "description": "Custom property name and associated value", "type": "object", "properties": { "property_name": { "type": "string", "description": "The name of the property" }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "description": "The value assigned to the property" } }, "required": [ "property_name", "value" ] }