You can control the shape and contents of documents in a collection by defining a schema. Schemas let you require specific fields, control the type of a field's value, and validate changes before committing write operations.
This guide shows you how to define, configure, and deploy a schema for a linked MongoDB Atlas collection.
Federated data sources do not support rules or schemas. You can only access a Federated data source from a system function.
App Services's default behavior is to only accept a single type for each field.
Schema fields are not nullable by default because
null is a unique
You can configure App Services to pass schema validation when you use
values with optional fields.
Enabling null type validation allows the value for a field to be persisted as
the type in the schema or the BSON null type.
If you do not enable null type schema validation, App Services rejects
values passed to optional fields. Even if you enable null type validation,
required fields are never nullable.
To enable null type schema validation in the App Services UI:
In the left navigation menu below the Manage header, select App Settings.
On the General tab, navigate to the Null Type Schema Validation section. Toggle the switch to ON.
Click the Save button.