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.

Sealed

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 interface JsonObjectNodeSchema extends JsonNodeSchemaBase<NodeKind.Object, "object">

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

Properties

PropertyAlertsModifiersTypeDescription
additionalPropertiesAlphaoptional, readonlybooleanWhether or not additional properties (properties not specified by the schema) are allowed in objects of this type.
propertiesAlphareadonlyRecord<string, JsonFieldSchema>Object fields.
requiredAlphaoptional, readonlystring[]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.

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.

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.

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. \