diff --git a/documentation/README.md b/documentation/README.md index fd9f6ec..2b1430a 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -328,6 +328,11 @@ A collection is a group of records/data of same modality (schema). Collections a Each collection has a schema that defines its modality and how data in that collection should be structured. In wunderDb schema for a collection is defined using [JSON Schema](https://json-schema.org/) and at the time when collections are created. JSON Schema defines the structure, type and various other standards of the data. Read more on how to define schema using JSON Schema [here](https://json-schema.org/learn/getting-started-step-by-step.html). +Please note + +- wunderDB expects that the schema definition contains the primary key as a part of the required array, else it will throw error. +- wunderDB also expects the [`additionalFields`](https://json-schema.org/understanding-json-schema/reference/object#additionalproperties) schema properties to be set, so as to specify if any additional fields other than the ones in schema should be allowed. If this property is not set, then wunderDB adds it to the schema definition with the default value `false`, i.e no extra fields allowed. + ### Create Collection To create a collection in a database, use the following endpoint, passing the schema of the data (in JSON Schema notations) in the body. User must have the `createCollection` access granted on the database where the collection is to be created.