Skip to content

Commit

Permalink
Blocks: Update schema to require either a type or an enum (#36267)
Browse files Browse the repository at this point in the history
Part of #35902.

Update the block.json schema to require either a `type` or an `enum` prop.
  • Loading branch information
Petter Walbø Johnsgård authored Nov 5, 2021
1 parent 787fd3e commit 63630f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion schemas/json/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@
"description": "TA block attribute can contain a default value, which will be used if the type and source do not match anything within the block content.\n\nThe value is provided by the default field, and the value should match the expected format of the attribute."
}
},
"required": [ "type" ]
"anyOf": [
{
"required": [ "type" ]
},
{
"required": [ "enum" ]
}
]
}
},
"additionalProperties": false
Expand Down

0 comments on commit 63630f3

Please sign in to comment.