Skip to main content

JsonTreeSchema TypeAlias

JSON Schema representation of a tree schema.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/alpha.

For more information about our API support guarantees, see here.

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.