|
1316 | 1316 | type: object |
1317 | 1317 | properties: |
1318 | 1318 | component: {const: "Column"} |
1319 | | - children: {type: array, items: {type: string}} |
| 1319 | + children: |
| 1320 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList" |
1320 | 1321 | required: ["component"] |
1321 | 1322 | Text: |
1322 | 1323 | type: object |
|
1328 | 1329 | type: object |
1329 | 1330 | properties: |
1330 | 1331 | component: {const: "Row"} |
1331 | | - children: {type: array, items: {type: string}} |
| 1332 | + children: |
| 1333 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList" |
1332 | 1334 | required: ["component"] |
1333 | 1335 | $defs: |
1334 | 1336 | anyComponent: |
|
1448 | 1450 | type: object |
1449 | 1451 | properties: |
1450 | 1452 | component: {const: "Card"} |
1451 | | - child: {type: string} |
| 1453 | + child: |
| 1454 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId" |
1452 | 1455 | required: ["component"] |
1453 | 1456 | $defs: |
1454 | 1457 | anyComponent: |
|
1523 | 1526 | Card: |
1524 | 1527 | type: object |
1525 | 1528 | properties: |
1526 | | - child: {type: string} |
| 1529 | + child: |
| 1530 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId" |
1527 | 1531 | $defs: |
1528 | 1532 | anyComponent: |
1529 | 1533 | oneOf: |
|
1549 | 1553 | Card: |
1550 | 1554 | type: object |
1551 | 1555 | properties: |
1552 | | - child: {type: string} |
| 1556 | + child: |
| 1557 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId" |
1553 | 1558 | $defs: |
1554 | 1559 | anyComponent: |
1555 | 1560 | oneOf: |
|
1769 | 1774 | type: object |
1770 | 1775 | properties: |
1771 | 1776 | component: {const: "Card"} |
1772 | | - child: {type: string} |
| 1777 | + child: |
| 1778 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId" |
1773 | 1779 | required: ["component"] |
1774 | 1780 | $defs: |
1775 | 1781 | anyComponent: |
|
1822 | 1828 | properties: |
1823 | 1829 | component: {const: "List"} |
1824 | 1830 | children: |
1825 | | - type: object |
1826 | | - properties: |
1827 | | - componentId: {type: string} |
1828 | | - path: {type: string} |
1829 | | - required: ["componentId", "path"] |
| 1831 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList" |
1830 | 1832 | required: ["component"] |
1831 | 1833 | $defs: |
1832 | 1834 | anyComponent: |
|
2079 | 2081 | type: object |
2080 | 2082 | properties: |
2081 | 2083 | component: {const: "Card"} |
2082 | | - child: {type: string} |
| 2084 | + child: |
| 2085 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId" |
2083 | 2086 | required: ["component"] |
2084 | 2087 | $defs: |
2085 | 2088 | anyComponent: |
|
2209 | 2212 | component: "Text" |
2210 | 2213 | text: "hi" |
2211 | 2214 |
|
2212 | | -- name: test_data_model_after_components_v09 |
2213 | | - description: Tests that data model after components works. |
2214 | | - catalog: |
2215 | | - version: "0.9" |
2216 | | - common_types_schema: "test_data/simplified_common_types_v09.json" |
2217 | | - s2c_schema: "test_data/simplified_s2c_v09.json" |
2218 | | - catalog_schema: |
2219 | | - catalogId: "test_catalog" |
2220 | | - components: |
2221 | | - Text: |
2222 | | - type: object |
2223 | | - properties: |
2224 | | - component: {const: "Text"} |
2225 | | - text: |
2226 | | - oneOf: |
2227 | | - - {type: string} |
2228 | | - - type: object |
2229 | | - properties: |
2230 | | - path: {type: string} |
2231 | | - required: ["component"] |
2232 | | - $defs: |
2233 | | - anyComponent: |
2234 | | - oneOf: |
2235 | | - - {$ref: "#/components/Text"} |
2236 | | - discriminator: {propertyName: "component"} |
2237 | | - action: process_chunk |
2238 | | - steps: |
2239 | | - - input: "<a2ui-json>[" |
2240 | | - expect: [] |
2241 | | - - input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}, ' |
2242 | | - expect: |
2243 | | - - a2ui: |
2244 | | - - version: "v0.9" |
2245 | | - createSurface: |
2246 | | - surfaceId: "s1" |
2247 | | - catalogId: "test_catalog" |
2248 | | - - input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": {"path": "/name"}}]}}, ' |
2249 | | - expect: |
2250 | | - - a2ui: |
2251 | | - - version: "v0.9" |
2252 | | - updateComponents: |
2253 | | - surfaceId: "s1" |
2254 | | - components: |
2255 | | - - id: "root" |
2256 | | - component: "Text" |
2257 | | - text: {path: "/name"} |
2258 | | - - input: '{"version": "v0.9", "updateDataModel": {"surfaceId": "s1", "value": {"name": "Alice"}}}]</a2ui-json>' |
2259 | | - expect: |
2260 | | - - a2ui: |
2261 | | - - version: "v0.9" |
2262 | | - updateDataModel: |
2263 | | - surfaceId: "s1" |
2264 | | - value: {name: "Alice"} |
2265 | | - |
2266 | | -- name: test_partial_paths_v09 |
2267 | | - description: Tests that partial paths are handled correctly. |
2268 | | - catalog: |
2269 | | - version: "0.9" |
2270 | | - common_types_schema: "test_data/simplified_common_types_v09.json" |
2271 | | - s2c_schema: "test_data/simplified_s2c_v09.json" |
2272 | | - catalog_schema: |
2273 | | - catalogId: "test_catalog" |
2274 | | - components: |
2275 | | - Text: |
2276 | | - type: object |
2277 | | - properties: |
2278 | | - component: {const: "Text"} |
2279 | | - text: |
2280 | | - oneOf: |
2281 | | - - {type: string} |
2282 | | - - type: object |
2283 | | - properties: |
2284 | | - path: {type: string} |
2285 | | - required: ["component"] |
2286 | | - $defs: |
2287 | | - anyComponent: |
2288 | | - oneOf: |
2289 | | - - {$ref: "#/components/Text"} |
2290 | | - discriminator: {propertyName: "component"} |
2291 | | - action: process_chunk |
2292 | | - steps: |
2293 | | - - input: "<a2ui-json>[" |
2294 | | - expect: [] |
2295 | | - - input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}, ' |
2296 | | - expect: |
2297 | | - - a2ui: |
2298 | | - - version: "v0.9" |
2299 | | - createSurface: |
2300 | | - surfaceId: "s1" |
2301 | | - catalogId: "test_catalog" |
2302 | | - - input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": {"path": "/loca' |
2303 | | - expect: [] |
2304 | | - - input: 'tion"}]}}]</a2ui-json>' |
2305 | | - expect: |
2306 | | - - a2ui: |
2307 | | - - version: "v0.9" |
2308 | | - updateComponents: |
2309 | | - surfaceId: "s1" |
2310 | | - components: |
2311 | | - - id: "root" |
2312 | | - component: "Text" |
2313 | | - text: {path: "/location"} |
2314 | | - |
2315 | | -- name: test_cut_atomic_id_v09 |
2316 | | - description: Tests that cutting atomic ID buffers the component. |
2317 | | - catalog: |
2318 | | - version: "0.9" |
2319 | | - common_types_schema: "test_data/simplified_common_types_v09.json" |
2320 | | - s2c_schema: "test_data/simplified_s2c_v09.json" |
2321 | | - catalog_schema: |
2322 | | - catalogId: "test_catalog" |
2323 | | - components: |
2324 | | - Text: |
2325 | | - type: object |
2326 | | - properties: |
2327 | | - component: {const: "Text"} |
2328 | | - text: {type: string} |
2329 | | - required: ["component"] |
2330 | | - Card: |
2331 | | - type: object |
2332 | | - properties: |
2333 | | - component: {const: "Card"} |
2334 | | - child: {type: string} |
2335 | | - required: ["component"] |
2336 | | - $defs: |
2337 | | - anyComponent: |
2338 | | - oneOf: |
2339 | | - - {$ref: "#/components/Text"} |
2340 | | - - {$ref: "#/components/Card"} |
2341 | | - discriminator: {propertyName: "component"} |
2342 | | - action: process_chunk |
2343 | | - steps: |
2344 | | - - input: "<a2ui-json>[" |
2345 | | - expect: [] |
2346 | | - - input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "contact' |
2347 | | - expect: [] |
2348 | | - - input: '-card"}}, {"version": "v0.9", "updateComponents": {"surfaceId": "contact-card", "components": [{"id": "button' |
2349 | | - expect: |
2350 | | - - a2ui: |
2351 | | - - version: "v0.9" |
2352 | | - createSurface: |
2353 | | - surfaceId: "contact-card" |
2354 | | - catalogId: "test_catalog" |
2355 | | - - input: '-text"' |
2356 | | - expect: [] |
2357 | | - - input: ', "component": "Text", "text": "hi"}, {"id": "root", "component": "Card", "child": "button-text"}]}}]</a2ui-json>' |
2358 | | - expect: |
2359 | | - - a2ui: |
2360 | | - - version: "v0.9" |
2361 | | - updateComponents: |
2362 | | - surfaceId: "contact-card" |
2363 | | - components: |
2364 | | - - id: "button-text" |
2365 | | - component: "Text" |
2366 | | - text: "hi" |
2367 | | - - id: "root" |
2368 | | - component: "Card" |
2369 | | - child: "button-text" |
2370 | | - |
2371 | | -- name: test_cut_cuttable_text_v09 |
2372 | | - description: Tests that cutting cuttable text yields partial text. |
2373 | | - catalog: |
2374 | | - version: "0.9" |
2375 | | - common_types_schema: "test_data/simplified_common_types_v09.json" |
2376 | | - s2c_schema: "test_data/simplified_s2c_v09.json" |
2377 | | - catalog_schema: |
2378 | | - catalogId: "test_catalog" |
2379 | | - components: |
2380 | | - Text: |
2381 | | - type: object |
2382 | | - properties: |
2383 | | - component: {const: "Text"} |
2384 | | - text: {type: string} |
2385 | | - required: ["component"] |
2386 | | - $defs: |
2387 | | - anyComponent: |
2388 | | - oneOf: |
2389 | | - - {$ref: "#/components/Text"} |
2390 | | - discriminator: {propertyName: "component"} |
2391 | | - action: process_chunk |
2392 | | - steps: |
2393 | | - - input: "<a2ui-json>[" |
2394 | | - expect: [] |
2395 | | - - input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}, ' |
2396 | | - expect: |
2397 | | - - a2ui: |
2398 | | - - version: "v0.9" |
2399 | | - createSurface: |
2400 | | - surfaceId: "s1" |
2401 | | - catalogId: "test_catalog" |
2402 | | - - input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": "Em' |
2403 | | - expect: |
2404 | | - - a2ui: |
2405 | | - - version: "v0.9" |
2406 | | - updateComponents: |
2407 | | - surfaceId: "s1" |
2408 | | - components: |
2409 | | - - id: "root" |
2410 | | - component: "Text" |
2411 | | - text: "Em" |
2412 | | - - input: 'ail"}]}}]</a2ui-json>' |
2413 | | - expect: |
2414 | | - - a2ui: |
2415 | | - - version: "v0.9" |
2416 | | - updateComponents: |
2417 | | - surfaceId: "s1" |
2418 | | - components: |
2419 | | - - id: "root" |
2420 | | - component: "Text" |
2421 | | - text: "Email" |
2422 | | - |
2423 | | -- name: test_message_ordering_buffering_v09 |
2424 | | - description: Tests that updateComponents before createSurface is buffered. |
2425 | | - catalog: |
2426 | | - version: "0.9" |
2427 | | - common_types_schema: "test_data/simplified_common_types_v09.json" |
2428 | | - s2c_schema: "test_data/simplified_s2c_v09.json" |
2429 | | - catalog_schema: |
2430 | | - catalogId: "test_catalog" |
2431 | | - components: |
2432 | | - Text: |
2433 | | - type: object |
2434 | | - properties: |
2435 | | - component: {const: "Text"} |
2436 | | - text: {type: string} |
2437 | | - required: ["component"] |
2438 | | - $defs: |
2439 | | - anyComponent: |
2440 | | - oneOf: |
2441 | | - - {$ref: "#/components/Text"} |
2442 | | - discriminator: {propertyName: "component"} |
2443 | | - action: process_chunk |
2444 | | - steps: |
2445 | | - - input: "<a2ui-json>[" |
2446 | | - expect: [] |
2447 | | - - input: '{"version": "v0.9", "updateComponents": {"surfaceId": "s1", "components": [{"id": "root", "component": "Text", "text": "hi"}]}}, ' |
2448 | | - expect: [] |
2449 | | - - input: '{"version": "v0.9", "createSurface": {"catalogId": "test_catalog", "surfaceId": "s1"}}]</a2ui-json>' |
2450 | | - expect: |
2451 | | - - a2ui: |
2452 | | - - version: "v0.9" |
2453 | | - createSurface: |
2454 | | - surfaceId: "s1" |
2455 | | - catalogId: "test_catalog" |
2456 | | - - version: "v0.9" |
2457 | | - updateComponents: |
2458 | | - surfaceId: "s1" |
2459 | | - components: |
2460 | | - - id: "root" |
2461 | | - component: "Text" |
2462 | | - text: "hi" |
2463 | | - |
2464 | 2215 | - name: test_delete_surface_buffering_v09 |
2465 | 2216 | description: Tests that deleteSurface before createSurface is ignored. |
2466 | 2217 | catalog: |
|
2654 | 2405 | type: object |
2655 | 2406 | properties: |
2656 | 2407 | component: {const: "Container"} |
2657 | | - children: {type: array, items: {type: string}} |
| 2408 | + children: |
| 2409 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList" |
2658 | 2410 | required: ["component"] |
2659 | 2411 | Text: |
2660 | 2412 | type: object |
|
2729 | 2481 | properties: |
2730 | 2482 | component: {const: "List"} |
2731 | 2483 | children: |
2732 | | - type: object |
2733 | | - properties: |
2734 | | - componentId: {type: string} |
2735 | | - path: {type: string} |
| 2484 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList" |
2736 | 2485 | required: ["component"] |
2737 | 2486 | Text: |
2738 | 2487 | type: object |
|
3010 | 2759 | properties: |
3011 | 2760 | component: {const: "Column"} |
3012 | 2761 | children: |
3013 | | - type: object |
3014 | | - properties: |
3015 | | - componentId: {type: string} |
3016 | | - path: {type: string} |
| 2762 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList" |
3017 | 2763 | required: ["component"] |
3018 | 2764 | Text: |
3019 | 2765 | type: object |
|
3109 | 2855 | type: object |
3110 | 2856 | properties: |
3111 | 2857 | component: {const: "Card"} |
3112 | | - child: {type: string} |
| 2858 | + child: |
| 2859 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ComponentId" |
3113 | 2860 | required: ["component"] |
3114 | 2861 | Text: |
3115 | 2862 | type: object |
|
3121 | 2868 | type: object |
3122 | 2869 | properties: |
3123 | 2870 | component: {const: "Row"} |
3124 | | - children: {type: array, items: {type: string}} |
| 2871 | + children: |
| 2872 | + $ref: "https://a2ui.org/specification/v0_9/common_types.json#/$defs/ChildList" |
3125 | 2873 | required: ["component"] |
3126 | 2874 | $defs: |
3127 | 2875 | anyComponent: |
|
0 commit comments