Skip to main content

JsonObjectNodeSchema Interface

JSON Schema for an object node.

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

To use, import via @fluidframework/tree/alpha.

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

Signature

/** @sealed */
export interface JsonObjectNodeSchema extends JsonNodeSchemaBase<NodeKind.Object, "object">

Extends: JsonNodeSchemaBase<NodeKind.Object, "object">

Properties

Property Alerts Modifiers Type Description
additionalProperties Alpha optional, readonly boolean Whether or not additional properties (properties not specified by the schema) are allowed in objects of this type.
properties Alpha readonly Record<string, JsonFieldSchema> Object fields.
required Alpha optional, readonly string[] List of keys for required fields.

Property Details

additionalProperties

Whether or not additional properties (properties not specified by the schema) are allowed in objects of this type.

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

To use, import via @fluidframework/tree/alpha.

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

Signature

readonly additionalProperties?: boolean;

Type: boolean

See Also

https://json-schema.org/draft/2020-12/json-schema-core#name-additionalproperties.

properties

Object fields.

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

To use, import via @fluidframework/tree/alpha.

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

Signature

readonly properties: Record<string, JsonFieldSchema>;

Type: Record<string, JsonFieldSchema>

Remarks

Required fields should have a corresponding entry in required.

See Also

https://json-schema.org/draft/2020-12/json-schema-core#name-properties.

required

List of keys for required fields.

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

To use, import via @fluidframework/tree/alpha.

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

Signature

readonly required?: string[];

Type: string[]

Remarks

Optional fields should not be included in this list. Each key specified must have an entry in properties.

See Also

https://json-schema.org/draft/2020-12/json-schema-core#name-instance-data-model.