JsonTreeSchema TypeAlias
JSON Schema representation of a tree schema.
To use, import via fluid-framework/alpha
.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export type JsonTreeSchema = JsonFieldSchema & {
readonly $defs: Record<JsonSchemaId, JsonNodeSchema>;
};
Remarks
Includes the complete set of definitions reachable from the "root" schema.
Note: This representation only uses a limited subset of supported JSON Schema features. It is scoped to a format that can be used to sufficiently represent supported SharedTree schema.
Also note that this schema format contains Fluid-specific extensions, such as the _treeNodeSchemaKind property, meaning that it is not a *strict* subset. When using these schemas with validation tools (for example, https://ajv.js.org/), you will need to opt out of *strict* validation to ensure extra properties are allowed.