For cases where event schema specify `patternProperties` it would be nice
to give that pattern a "human-readable" form rather than a raw regex. This
is now supported by specifying `x-pattern` in the value part of the specified
pattern e.g. `patternProperties:{ "^.*":{ x-pattern: "$THING", ... } }`
Templating had limited record type descriptions limited to value primitives
e.g. `{string: integer}`. It now supports inspecting the values recursively
if the value is `object`.
Updated `m.receipt` to take both these points into account to make it read
better. Tweak receipt module text.
"description": "The event ids which the receipts relate to.",
"patternProperties": {
"patternProperties": {
"^\\$": {
"^\\$": {
"type": "object",
"type": "object",
"description": "The types of the receipts.",
"x-pattern": "$EVENT_ID",
"description": "The mapping of event ID to receipt type. The event ID is the ID which the receipts relate to and *not* an ID for the receipt itself. The key in the object is an enum which must be ``read``.",
"additionalProperties": {
"additionalProperties": {
"type": "object",
"type": "object",
"description": "User ids of the receipts",
"title": "Users",
"patternProperties": {
"patternProperties": {
"^@": {
"^@": {
"type": "object",
"type": "object",
"title": "Receipt",
"description": "The mapping of user ID to receipt. The user ID is the entity who sent this receipt.",