Input.Toggle values are bool of type string
The values presented in the schema are that of type string for properties, value, valueOn and valueOff.
These should either be an enum field with additional values or strictly bool types.
Hi there, do you mean something like this:
"Input.Toggle": {
"additionalProperties": true,
"type": "object",
"description": "Input.Toggle collects a true/false response from the user",
"allOf": [
{
"$ref": "#/definitions/CardElement"
}
],
"properties": {
"id": {
"type": "string",
"description": "Id for the value (will be used to identify collected input when SUBMIT is clicked)"
},
"title": {
"type": "string",
"description": "Title for the toggle"
},
"type": {
"type": "string",
"description": "Input.Toggle",
"enum": [
"Input.Toggle"
]
},
"value": {
"type": "string",
"description": "The current selected value",
"default": "false",
"enum": [
"true",
"false"
],
"additionalProperties": true
},
"valueOff": {
"type": "string",
"description": "The value when toggle is off (default:false)",
"enum": [
"false"
],
"additionalProperties": true
},
"valueOn": {
"type": "string",
"description": "The value when toggle is on (default:true)",
"enum": [
"true"
],
"additionalProperties": true
}
},
"required": [
"id",
"title"
]
},
Sorry Matt - I didn't mean that what is clearly a bool should be turned into an enum - what I mean is that if it string for a particular reason (you want to insert further values other than true and false) then the property type should be an enum. If not and it is planned to remain TRUE or FALSE - then it should be a type of bool as opposed to string.
Closing as this is intentional that these properties are of type string