Commit fdfff43
Shared Tree: Simple Schema codec (#25741)
Introduces new APIs for encoding and decoding view schemas. Also adds
new fields to Simple Schemas to support compatibility checking
scenarios.
## Description
New APIs (in alpha):
- `encodeSimpleSchema(simpleSchema: SimpleTreeSchema):
JsonCompatibleReadOnly` - Encodes a Simple Schema into a JSON-compatible
object format.
- `decodeSimpleSchema(encodedSchema: JsonCompatibleReadOnly, validator?:
FormatValidator): SimpleTreeSchema` - Decodes a Simple Schema from a
JSON-compatible object format.
Other changes:
- Updated `toSimpleTreeSchema` to include `compatibility-related fields.
These include:
- On SimpleAllowedTypeAttributes: `isStaged`
- On object schemas: `allowUnknownOptionalTypes`
---------
Co-authored-by: Noah Encke <[email protected]>1 parent b85efc0 commit fdfff43
File tree
28 files changed
+1621
-342
lines changed- packages
- common/core-utils/src
- dds/tree
- api-report
- src
- simple-tree
- api
- test
- simple-tree/api
- snapshots/output/get-simple-schema
- framework/fluid-framework/api-report
28 files changed
+1621
-342
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
| |||
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
| |||
1071 | 1077 | | |
1072 | 1078 | | |
1073 | 1079 | | |
| 1080 | + | |
1074 | 1081 | | |
1075 | 1082 | | |
1076 | 1083 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
| 287 | + | |
286 | 288 | | |
287 | 289 | | |
288 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
| 938 | + | |
| 939 | + | |
938 | 940 | | |
939 | 941 | | |
940 | 942 | | |
| |||
951 | 953 | | |
952 | 954 | | |
953 | 955 | | |
954 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
955 | 963 | | |
956 | 964 | | |
957 | 965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
0 commit comments