Skip to content

Commit d97a41f

Browse files
committed
Simplify expParts
1 parent ff5f34c commit d97a41f

File tree

2 files changed

+93
-207
lines changed

2 files changed

+93
-207
lines changed

test/schemas/v0-0-1/formatted-parts.schema.json

Lines changed: 0 additions & 206 deletions
This file was deleted.

test/schemas/v0-0-1/tests.schema.json

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,99 @@
276276
}
277277
},
278278
"expParts": {
279-
"$ref": "formatted-parts.schema.json"
279+
"description": "The expected result of formatting the message to parts.",
280+
"type": "array",
281+
"items": {
282+
"oneOf": [
283+
{
284+
"description": "Message literal part.",
285+
"type": "object",
286+
"additionalProperties": false,
287+
"required": [
288+
"type",
289+
"value"
290+
],
291+
"properties": {
292+
"type": {
293+
"const": "literal"
294+
},
295+
"value": {
296+
"type": "string"
297+
}
298+
}
299+
},
300+
{
301+
"description": "Message markup part.",
302+
"type": "object",
303+
"additionalProperties": false,
304+
"required": [
305+
"type",
306+
"kind",
307+
"name"
308+
],
309+
"properties": {
310+
"type": {
311+
"const": "markup"
312+
},
313+
"kind": {
314+
"enum": [
315+
"open",
316+
"standalone",
317+
"close"
318+
]
319+
},
320+
"source": {
321+
"type": "string"
322+
},
323+
"name": {
324+
"type": "string"
325+
},
326+
"options": {
327+
"type": "object"
328+
}
329+
}
330+
},
331+
{
332+
"description": "Message expression part.",
333+
"type": "object",
334+
"additionalProperties": "false",
335+
"required": [
336+
"type",
337+
"source"
338+
],
339+
"properties": {
340+
"type": {
341+
"type": "string"
342+
},
343+
"source": {
344+
"type": "string"
345+
},
346+
"locale": {
347+
"type": "string"
348+
},
349+
"parts": {
350+
"type": "array",
351+
"items": {
352+
"type": "object",
353+
"properties": {
354+
"type": {
355+
"type": "string"
356+
},
357+
"source": {
358+
"type": "string"
359+
},
360+
"value": {}
361+
},
362+
"required": [
363+
"type"
364+
]
365+
}
366+
},
367+
"value": {}
368+
}
369+
}
370+
]
371+
}
280372
},
281373
"expErrors": {
282374
"description": "The runtime errors expected to be emitted when formatting the message. If expErrors is either absent or empty, the message must be formatted without errors.",

0 commit comments

Comments
 (0)