Expand description
This module contains the BSON schema typings used to express a validation on MongoDB like the following:
{
"bsonType": "object",
"required": ["_id"],
"properties": {
"_id": {"bsonType": "objectId"}
}
}type and bsonType can be used interchangeably when they
both make sense (i.e. when bsonType maps onto JSON type).
The main [MongodbJsonSchema] struct maps the following cases:
- BsonTypedJsonSchema a full BSON typed schema
- MultipleBsonTypedJsonSchema a full BSON typed schema with multiple types
- AllOfJsonSchema a list of schemas in AND
- AnyOfJsonSchema a list of schemas in OR
- OneOfJsonSchema a list of mutually exclusive schemas
- BsonSchema::Exists when a field exist but no validation is imposed
Structs§
- AllOf
Json Schema - AnyOf
Json Schema - Array
Schema - Multiple
Bson Typed Json Schema - Number
Schema - Object
Schema - OneOf
Json Schema - Shared
Schema - String
Schema
Enums§
- Additional
- Bson
Schema - Bson
Typed Json Schema - Bson Type representation from spec
- Bson
Types - Items
- Number