Skip to content

Commit 715e99e

Browse files
authored
Fix merge of markup PR (#591)
* Fix merge of #574 and #585 * Fix JSON Schema options definition
1 parent a5d2d89 commit 715e99e

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

spec/data-model/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,20 @@ interface CatchallKey {
111111

112112
Each `Pattern` contains a linear sequence of text and placeholders corresponding to potential output of a message.
113113

114-
Each element of the `Pattern` MUST either be a non-empty string or an `Expression` object.
114+
Each element of the `Pattern` MUST either be a non-empty string, an `Expression`, or a `Markup` object.
115115
String values represent literal _text_.
116116
String values include all processing of the underlying _text_ values,
117117
including escape sequence processing.
118-
`Expression` values wrap each of the _expression_ shapes.
118+
`Expression` wraps each of the potential _expression_ shapes.
119+
`Markup` wraps each of the potential _markup_ shapes.
119120

120121
Implementations MUST NOT rely on the set of `Expression` and
121122
`Markup` interfaces defined in this document being exhaustive.
122123
Future versions of this specification might define additional
123124
expressions or markup.
124125

125126
```ts
126-
type Pattern = Array<string | Expression>;
127+
type Pattern = Array<string | Expression | Markup>;
127128

128129
type Expression =
129130
| LiteralExpression

spec/data-model/message.json

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@
2222
},
2323
"required": ["type", "name"]
2424
},
25-
"option": {
26-
"type": "object",
27-
"properties": {
28-
"name": { "type": "string" },
29-
"value": {
30-
"oneOf": [
31-
{ "$ref": "#/$defs/literal" },
32-
{ "$ref": "#/$defs/variable" }
33-
]
34-
}
35-
},
36-
"required": ["name", "value"]
25+
"options": {
26+
"type": "array",
27+
"items": {
28+
"type": "object",
29+
"properties": {
30+
"name": { "type": "string" },
31+
"value": {
32+
"oneOf": [
33+
{ "$ref": "#/$defs/literal" },
34+
{ "$ref": "#/$defs/variable" }
35+
]
36+
}
37+
},
38+
"required": ["name", "value"]
39+
}
3740
},
3841

3942
"function-annotation": {
@@ -146,7 +149,11 @@
146149
"pattern": {
147150
"type": "array",
148151
"items": {
149-
"oneOf": [{ "type": "string" }, { "$ref": "#/$defs/expression" }]
152+
"oneOf": [
153+
{ "type": "string" },
154+
{ "$ref": "#/$defs/expression" },
155+
{ "$ref": "#/$defs/markup" }
156+
]
150157
}
151158
},
152159

0 commit comments

Comments
 (0)