Skip to content

Commit

Permalink
message_fmt2: Make schema more consistent with schema in WG repo (uni…
Browse files Browse the repository at this point in the history
…code-org#337)

* Add `bidiIsolation` property that was recently added
* Remove `expCleanSrc` property that is no longer used
* Add "Bidi isolation part" variant to `expParts`
* Remove `unsupported-statement` and `unsupported-expression` from
  enum in `expErrors`
  • Loading branch information
catamorphism authored Nov 5, 2024
1 parent 18653e9 commit 396128b
Showing 1 changed file with 31 additions and 18 deletions.
49 changes: 31 additions & 18 deletions schema/message_fmt2/testgen_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@
"src": {
"$ref": "#/$defs/src"
},
"bidiIsolation": {
"$ref": "#/$defs/bidiIsolation"
},
"params": {
"$ref": "#/$defs/params"
},
"exp": {
"$ref": "#/$defs/exp"
},
"expCleanSrc": {
"$ref": "#/$defs/expCleanSrc"
},
"expParts": {
"$ref": "#/$defs/expParts"
},
Expand All @@ -150,6 +150,9 @@
"src": {
"$ref": "#/$defs/src"
},
"bidiIsolation": {
"$ref": "#/$defs/bidiIsolation"
},
"params": {
"$ref": "#/$defs/params"
},
Expand All @@ -159,9 +162,6 @@
"exp": {
"$ref": "#/$defs/exp"
},
"expCleanSrc": {
"$ref": "#/$defs/expCleanSrc"
},
"expParts": {
"$ref": "#/$defs/expParts"
},
Expand Down Expand Up @@ -203,6 +203,10 @@
}
]
},
"bidiIsolation": {
"description": "The bidi isolation strategy.",
"enum": ["default", "none"]
},
"params": {
"description": "Parameters to pass in to the formatter for resolving external variables.",
"type": "array",
Expand Down Expand Up @@ -256,10 +260,6 @@
"description": "The expected result of formatting the message to a string.",
"type": "string"
},
"expCleanSrc": {
"description": "The expected normalized form of `src`, for testing stringifiers.",
"type": "string"
},
"expParts": {
"description": "The expected result of formatting the message to parts.",
"type": "array",
Expand All @@ -282,6 +282,23 @@
}
}
},
{
"description": "Bidi isolation part.",
"type": "object",
"additionalProperties": false,
"required": [
"type",
"value"
],
"properties": {
"type": {
"const": "bidiIsolation"
},
"value": {
"enum": ["\u2066", "\u2067", "\u2068", "\u2069"]
}
}
},
{
"description": "Message markup part.",
"type": "object",
Expand All @@ -308,6 +325,9 @@
"name": {
"type": "string"
},
"id": {
"type": "string"
},
"options": {
"type": "object"
}
Expand Down Expand Up @@ -384,12 +404,10 @@
"duplicate-variant",
"unresolved-variable",
"unknown-function",
"unsupported-expression",
"bad-selector",
"bad-operand",
"bad-option",
"bad-variant-key",
"unsupported-statement"
"bad-variant-key"
]
}
}
Expand Down Expand Up @@ -418,11 +436,6 @@
"exp"
]
},
{
"required": [
"expCleanSrc"
]
},
{
"required": [
"expParts"
Expand Down

0 comments on commit 396128b

Please sign in to comment.