Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TanmoySG committed May 13, 2024
1 parent 11207d8 commit 5d0d32f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5d0d32f

Please sign in to comment.