A patch to a collection or the definition of a new collection to be added. If adding a new collection, a schema must
be provided. If modifying an existing collection, a schema may be omitted.
Properties
name?
optional name: string;
The collection's display name
patch
patch: ItemsPatch;
The patch to apply to the collection
represents?
optional represents: Items[];
What the collection implicitly represents *
schema?
optional schema: SchemaDefinition;
If changing an existing schema only the following changes are allowed:
- Adding a nullable field
- Promoting a type of a field to a union of types (
string
->string | number
) - Adding a new variant to a union type (
string | number
->string | number | boolean
)
- Removing a field is not allowed (just add
| null
and don't provide the field in patches anymore). - Changing a type in a way that any existing legal value is no longer valid for that field is not allowed.