s
anyOf
in specs?
{
"prop_name": {
"type": "object",
"oneOf": [
{
"required": ["option_title"],
"properties": {
"option_title": {
"type": "string",
"constant": "choice_1"
}
}
},
{
"required": [
"option_title",
"extra_option_1"
],
"properties": {
"option_title": {
"type": "string",
"constant": "choice_2"
},
"extra_option_1": {
// these are just "normal" JSON Schema type definitions, can be integer, object, they can have "description" and "required" fields etc...
"title": "Extra Option 1",
"type": "integer"
}
}
}
]
}
}
Artem Astapenko
07/29/2021, 7:18 PManyOf
? Do not think that we support anyOf
, probably you mixed it with oneOf
π
prop_name
should have a type object. This is how prop looked like for postgres
"replication_method": {
"type": "object",
"title": "Replication Method",
"description": "Replication method to use for extracting data from the database.",
"order": 6,
"oneOf": [
{
"title": "Standard",
"additionalProperties": false,
"description": "Standard replication requires no setup on the DB side but will not be able to represent deletions incrementally.",
"required": ["method"],
"properties": {
"method": {
"type": "string",
"const": "Standard",
"order": 0
}
}
},
Also note that it should be const
and not constant
s
oneOf
Artem Astapenko
07/29/2021, 7:29 PMs
Artem Astapenko
07/29/2021, 8:33 PMs